Enable incognito keyboard by default

This commit is contained in:
Niels Andriesse 2019-10-24 10:38:51 +11:00
parent 3c5ef19ca7
commit 9fc43cb16d
4 changed files with 8 additions and 3 deletions

View File

@ -42,7 +42,7 @@
android:summary="@string/preferences__disable_screen_security_to_allow_screen_shots" /> android:summary="@string/preferences__disable_screen_security_to_allow_screen_shots" />
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat <org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="true"
android:key="pref_incognito_keyboard" android:key="pref_incognito_keyboard"
android:title="@string/preferences__incognito_keyboard" android:title="@string/preferences__incognito_keyboard"
android:summary="@string/preferences__request_keyboard_to_disable_personalized_learning"/> android:summary="@string/preferences__request_keyboard_to_disable_personalized_learning"/>

View File

@ -136,7 +136,11 @@ public class ComposeText extends EmojiEditText {
} }
setInputType(inputType); setInputType(inputType);
setImeOptions(imeOptions); if (isIncognito) {
setImeOptions(imeOptions | 16777216);
} else {
setImeOptions(imeOptions);
}
/* /*
setHint(transport.getComposeHint(), setHint(transport.getComposeHint(),
transport.getSimName().isPresent() transport.getSimName().isPresent()

View File

@ -50,6 +50,7 @@ class SeedActivity : BaseActionBarActivity(), DeviceLinkingDialogDelegate {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_seed) setContentView(R.layout.activity_seed)
setUpLanguageFileDirectory() setUpLanguageFileDirectory()
mnemonicEditText.input.imeOptions = mnemonicEditText.input.imeOptions or 16777216 // Always use incognito keyboard for this
updateSeed() updateSeed()
copyButton.setOnClickListener { copy() } copyButton.setOnClickListener { copy() }
toggleRegisterModeButton.setOnClickListener { mode = Mode.Register } toggleRegisterModeButton.setOnClickListener { mode = Mode.Register }

View File

@ -346,7 +346,7 @@ public class TextSecurePreferences {
} }
public static boolean isIncognitoKeyboardEnabled(Context context) { public static boolean isIncognitoKeyboardEnabled(Context context) {
return getBooleanPreference(context, INCOGNITO_KEYBORAD_PREF, false); return getBooleanPreference(context, INCOGNITO_KEYBORAD_PREF, true);
} }
public static boolean isReadReceiptsEnabled(Context context) { public static boolean isReadReceiptsEnabled(Context context) {