From 0bc7b4dc4c8d01569d3ec1be81d9fca6bd482744 Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 22 Sep 2023 13:21:19 +0930 Subject: [PATCH] Remove unused RecoveryPhraseRestoreActivity --- app/src/main/AndroidManifest.xml | 5 - .../RecoveryPhraseRestoreActivity.kt | 114 ------------------ .../activity_recovery_phrase_restore.xml | 78 ------------ .../activity_recovery_phrase_restore.xml | 78 ------------ 4 files changed, 275 deletions(-) delete mode 100644 app/src/main/java/org/thoughtcrime/securesms/onboarding/RecoveryPhraseRestoreActivity.kt delete mode 100644 app/src/main/res/layout-sw400dp/activity_recovery_phrase_restore.xml delete mode 100644 app/src/main/res/layout/activity_recovery_phrase_restore.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cc63ab6a87..c0e06f0a89 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -104,11 +104,6 @@ android:name="org.thoughtcrime.securesms.onboarding.RegisterActivity" android:screenOrientation="portrait" android:theme="@style/Theme.Session.DayNight.FlatActionBar" /> - String = { fileName -> - MnemonicUtilities.loadFileContents(this, fileName) - } - val hexEncodedSeed = MnemonicCodec(loadFileContents).decode(mnemonic) - val seed = Hex.fromStringCondensed(hexEncodedSeed) - val keyPairGenerationResult = KeyPairUtilities.generate(seed) - val x25519KeyPair = keyPairGenerationResult.x25519KeyPair - KeyPairUtilities.store(this, seed, keyPairGenerationResult.ed25519KeyPair, x25519KeyPair) - configFactory.keyPairChanged() - val userHexEncodedPublicKey = x25519KeyPair.hexEncodedPublicKey - val registrationID = KeyHelper.generateRegistrationId(false) - TextSecurePreferences.setLocalRegistrationId(this, registrationID) - TextSecurePreferences.setLocalNumber(this, userHexEncodedPublicKey) - val intent = Intent(this, DisplayNameActivity::class.java) - push(intent) - } catch (e: Exception) { - val message = if (e is MnemonicCodec.DecodingError) e.description else MnemonicCodec.DecodingError.Generic.description - return Toast.makeText(this, message, Toast.LENGTH_SHORT).show() - } - } - - private fun openURL(url: String) { - try { - val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) - startActivity(intent) - } catch (e: Exception) { - Toast.makeText(this, R.string.invalid_url, Toast.LENGTH_SHORT).show() - } - } - // endregion -} \ No newline at end of file diff --git a/app/src/main/res/layout-sw400dp/activity_recovery_phrase_restore.xml b/app/src/main/res/layout-sw400dp/activity_recovery_phrase_restore.xml deleted file mode 100644 index 88d90f5aaf..0000000000 --- a/app/src/main/res/layout-sw400dp/activity_recovery_phrase_restore.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - -