mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 18:43:49 +00:00
Merge pull request #1272 from mcginty/flag-secure
hide screen security when unsupported
This commit is contained in:
commit
73e2f6ce59
@ -156,7 +156,7 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/preferences__advanced">
|
||||
<PreferenceCategory android:key="advanced_category" android:title="@string/preferences__advanced">
|
||||
<CheckBoxPreference android:defaultValue="true"
|
||||
android:key="pref_auto_complete_key_exchange"
|
||||
android:title="@string/preferences__complete_key_exchanges"
|
||||
|
@ -193,10 +193,12 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredSherlockPr
|
||||
}
|
||||
|
||||
private void initializePlatformSpecificOptions() {
|
||||
PreferenceGroup pushSmsCategory = (PreferenceGroup) findPreference("push_sms_category");
|
||||
Preference defaultPreference = findPreference(KITKAT_DEFAULT_PREF);
|
||||
Preference allSmsPreference = findPreference(TextSecurePreferences.ALL_SMS_PREF);
|
||||
Preference allMmsPreference = findPreference(TextSecurePreferences.ALL_MMS_PREF);
|
||||
PreferenceGroup pushSmsCategory = (PreferenceGroup) findPreference("push_sms_category");
|
||||
PreferenceGroup advancedCategory = (PreferenceGroup) findPreference("advanced_category");
|
||||
Preference defaultPreference = findPreference(KITKAT_DEFAULT_PREF);
|
||||
Preference allSmsPreference = findPreference(TextSecurePreferences.ALL_SMS_PREF);
|
||||
Preference allMmsPreference = findPreference(TextSecurePreferences.ALL_MMS_PREF);
|
||||
Preference screenSecurityPreference = findPreference(TextSecurePreferences.SCREEN_SECURITY_PREF);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && pushSmsCategory != null) {
|
||||
if (allSmsPreference != null) pushSmsCategory.removePreference(allSmsPreference);
|
||||
@ -216,6 +218,13 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredSherlockPr
|
||||
} else if (pushSmsCategory != null && defaultPreference != null) {
|
||||
pushSmsCategory.removePreference(defaultPreference);
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 &&
|
||||
advancedCategory != null &&
|
||||
screenSecurityPreference != null)
|
||||
{
|
||||
advancedCategory.removePreference(screenSecurityPreference);
|
||||
}
|
||||
}
|
||||
|
||||
private void initializeEditTextSummary(final EditTextPreference preference) {
|
||||
|
@ -29,7 +29,7 @@ public class TextSecurePreferences {
|
||||
private static final String PASSPHRASE_TIMEOUT_INTERVAL_PREF = "pref_timeout_interval";
|
||||
private static final String PASSPHRASE_TIMEOUT_PREF = "pref_timeout_passphrase";
|
||||
private static final String AUTO_KEY_EXCHANGE_PREF = "pref_auto_complete_key_exchange";
|
||||
private static final String SCREEN_SECURITY_PREF = "pref_screen_security";
|
||||
public static final String SCREEN_SECURITY_PREF = "pref_screen_security";
|
||||
private static final String ENTER_SENDS_PREF = "pref_enter_sends";
|
||||
private static final String ENTER_PRESENT_PREF = "pref_enter_key";
|
||||
private static final String SMS_DELIVERY_REPORT_PREF = "pref_delivery_report_sms";
|
||||
|
Loading…
x
Reference in New Issue
Block a user