mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 17:27:45 +00:00
Merge pull request #794 from SamWhited/issue788
Add option to disable screen security
This commit is contained in:
commit
a3e900ecbe
@ -173,7 +173,6 @@
|
|||||||
<string name="ImportFragment_no_encrypted_backup_found">No encrypted backup found!</string>
|
<string name="ImportFragment_no_encrypted_backup_found">No encrypted backup found!</string>
|
||||||
<string name="ImportFragment_restore_complete">Restore complete!</string>
|
<string name="ImportFragment_restore_complete">Restore complete!</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- KeyScanningActivity -->
|
<!-- KeyScanningActivity -->
|
||||||
<string name="KeyScanningActivity_no_scanned_key_found_exclamation">No scanned key found!</string>
|
<string name="KeyScanningActivity_no_scanned_key_found_exclamation">No scanned key found!</string>
|
||||||
|
|
||||||
@ -385,7 +384,6 @@
|
|||||||
<string name="ViewLocalIdentityActivity_cancel">Cancel</string>
|
<string name="ViewLocalIdentityActivity_cancel">Cancel</string>
|
||||||
<string name="ViewLocalIdentityActivity_continue">Continue</string>
|
<string name="ViewLocalIdentityActivity_continue">Continue</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- SmsReceiver -->
|
<!-- SmsReceiver -->
|
||||||
<string name="SmsReceiver_currently_unable_to_send_your_sms_message">Currently unable to send your SMS message. It will be sent once service becomes available.</string>
|
<string name="SmsReceiver_currently_unable_to_send_your_sms_message">Currently unable to send your SMS message. It will be sent once service becomes available.</string>
|
||||||
|
|
||||||
@ -489,7 +487,6 @@
|
|||||||
<!-- mms_preferences_activity -->
|
<!-- mms_preferences_activity -->
|
||||||
<string name="mms_preferences_activity__manual_mms_settings_are_required">Manual MMS settings are required for your phone.</string>
|
<string name="mms_preferences_activity__manual_mms_settings_are_required">Manual MMS settings are required for your phone.</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- prompt_passphrase_activity -->
|
<!-- prompt_passphrase_activity -->
|
||||||
<string name="prompt_passphrase_activity__textsecure_passphrase">TEXTSECURE PASSPHRASE</string>
|
<string name="prompt_passphrase_activity__textsecure_passphrase">TEXTSECURE PASSPHRASE</string>
|
||||||
<string name="prompt_passphrase_activity__unlock">Unlock</string>
|
<string name="prompt_passphrase_activity__unlock">Unlock</string>
|
||||||
@ -645,7 +642,9 @@
|
|||||||
<string name="preferences__complete_key_exchanges">Complete key exchanges</string>
|
<string name="preferences__complete_key_exchanges">Complete key exchanges</string>
|
||||||
<string name="preferences__disable_passphrase">Disable passphrase</string>
|
<string name="preferences__disable_passphrase">Disable passphrase</string>
|
||||||
<string name="preferences__disable_local_encryption_of_messages_and_keys">Disable local encryption of messages and keys</string>
|
<string name="preferences__disable_local_encryption_of_messages_and_keys">Disable local encryption of messages and keys</string>
|
||||||
|
<string name="preferences__screen_security">Screen security</string>
|
||||||
<string name="preferences__automatically_complete_key_exchanges_for_new_sessions_or_for_existing_sessions_with_the_same_identity_key">Automatically complete key exchanges for new sessions or for existing sessions with the same identity key</string>
|
<string name="preferences__automatically_complete_key_exchanges_for_new_sessions_or_for_existing_sessions_with_the_same_identity_key">Automatically complete key exchanges for new sessions or for existing sessions with the same identity key</string>
|
||||||
|
<string name="preferences__disable_screen_security_to_allow_screen_shots">Disable screen security to allow screen shots</string>
|
||||||
<string name="preferences__forget_passphrase_from_memory_after_some_interval">Forget passphrase from memory after some interval</string>
|
<string name="preferences__forget_passphrase_from_memory_after_some_interval">Forget passphrase from memory after some interval</string>
|
||||||
<string name="preferences__timeout_passphrase">Timeout passphrase</string>
|
<string name="preferences__timeout_passphrase">Timeout passphrase</string>
|
||||||
<string name="preferences__pref_timeout_interval_dialogtitle">Select Passphrase Timeout</string>
|
<string name="preferences__pref_timeout_interval_dialogtitle">Select Passphrase Timeout</string>
|
||||||
@ -715,7 +714,6 @@
|
|||||||
<string name="preferences__refresh_push_directory">Refresh Push Directory</string>
|
<string name="preferences__refresh_push_directory">Refresh Push Directory</string>
|
||||||
<string name="preferences__submit_debug_log">Submit debug log</string>
|
<string name="preferences__submit_debug_log">Submit debug log</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- **************************************** -->
|
<!-- **************************************** -->
|
||||||
<!-- menus -->
|
<!-- menus -->
|
||||||
<!-- **************************************** -->
|
<!-- **************************************** -->
|
||||||
|
@ -54,7 +54,6 @@
|
|||||||
android:entries="@array/pref_led_blink_pattern_entries"
|
android:entries="@array/pref_led_blink_pattern_entries"
|
||||||
android:entryValues="@array/pref_led_blink_pattern_values" />
|
android:entryValues="@array/pref_led_blink_pattern_values" />
|
||||||
|
|
||||||
|
|
||||||
<RingtonePreference android:layout="?android:attr/preferenceLayoutChild"
|
<RingtonePreference android:layout="?android:attr/preferenceLayoutChild"
|
||||||
android:dependency="pref_key_enable_notifications"
|
android:dependency="pref_key_enable_notifications"
|
||||||
android:key="pref_key_ringtone"
|
android:key="pref_key_ringtone"
|
||||||
@ -77,7 +76,6 @@
|
|||||||
android:title="@string/preferences__vibrate"
|
android:title="@string/preferences__vibrate"
|
||||||
android:summary="@string/preferences__also_vibrate_when_notified" />
|
android:summary="@string/preferences__also_vibrate_when_notified" />
|
||||||
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory android:title="Input Settings">
|
<PreferenceCategory android:title="Input Settings">
|
||||||
@ -162,7 +160,6 @@
|
|||||||
android:dependency="pref_timeout_passphrase"
|
android:dependency="pref_timeout_passphrase"
|
||||||
android:dialogTitle="@string/preferences__pref_timeout_interval_dialogtitle" />
|
android:dialogTitle="@string/preferences__pref_timeout_interval_dialogtitle" />
|
||||||
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory android:title="@string/preferences__advanced">
|
<PreferenceCategory android:title="@string/preferences__advanced">
|
||||||
@ -171,6 +168,11 @@
|
|||||||
android:title="@string/preferences__complete_key_exchanges"
|
android:title="@string/preferences__complete_key_exchanges"
|
||||||
android:summary="@string/preferences__automatically_complete_key_exchanges_for_new_sessions_or_for_existing_sessions_with_the_same_identity_key" />
|
android:summary="@string/preferences__automatically_complete_key_exchanges_for_new_sessions_or_for_existing_sessions_with_the_same_identity_key" />
|
||||||
|
|
||||||
|
<CheckBoxPreference android:defaultValue="true"
|
||||||
|
android:key="pref_screen_security"
|
||||||
|
android:title="@string/preferences__screen_security"
|
||||||
|
android:summary="@string/preferences__disable_screen_security_to_allow_screen_shots" />
|
||||||
|
|
||||||
<Preference android:key="pref_mms_preferences"
|
<Preference android:key="pref_mms_preferences"
|
||||||
android:title="@string/preferences__advanced_mms_access_point_names"/>
|
android:title="@string/preferences__advanced_mms_access_point_names"/>
|
||||||
|
|
||||||
|
@ -479,7 +479,6 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi
|
|||||||
startActivityForResult(intent, GROUP_EDIT);
|
startActivityForResult(intent, GROUP_EDIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void handleDistributionBroadcastEnabled(MenuItem item) {
|
private void handleDistributionBroadcastEnabled(MenuItem item) {
|
||||||
distributionType = ThreadDatabase.DistributionTypes.BROADCAST;
|
distributionType = ThreadDatabase.DistributionTypes.BROADCAST;
|
||||||
item.setChecked(true);
|
item.setChecked(true);
|
||||||
@ -756,7 +755,7 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi
|
|||||||
|
|
||||||
registerForContextMenu(sendButton);
|
registerForContextMenu(sendButton);
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && TextSecurePreferences.isScreenSecurityEnabled(this)) {
|
||||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
|
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -813,7 +812,6 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi
|
|||||||
new IntentFilter(GroupDatabase.DATABASE_UPDATE_ACTION));
|
new IntentFilter(GroupDatabase.DATABASE_UPDATE_ACTION));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//////// Helper Methods
|
//////// Helper Methods
|
||||||
|
|
||||||
private void addAttachment(int type) {
|
private void addAttachment(int type) {
|
||||||
|
@ -29,6 +29,7 @@ public class TextSecurePreferences {
|
|||||||
private static final String PASSPHRASE_TIMEOUT_INTERVAL_PREF = "pref_timeout_interval";
|
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 PASSPHRASE_TIMEOUT_PREF = "pref_timeout_passphrase";
|
||||||
private static final String AUTO_KEY_EXCHANGE_PREF = "pref_auto_complete_key_exchange";
|
private static final String AUTO_KEY_EXCHANGE_PREF = "pref_auto_complete_key_exchange";
|
||||||
|
private static final String SCREEN_SECURITY_PREF = "pref_screen_security";
|
||||||
private static final String ENTER_SENDS_PREF = "pref_enter_sends";
|
private static final String ENTER_SENDS_PREF = "pref_enter_sends";
|
||||||
private static final String ENTER_PRESENT_PREF = "pref_enter_key";
|
private static final String ENTER_PRESENT_PREF = "pref_enter_key";
|
||||||
private static final String SMS_DELIVERY_REPORT_PREF = "pref_delivery_report_sms";
|
private static final String SMS_DELIVERY_REPORT_PREF = "pref_delivery_report_sms";
|
||||||
@ -134,6 +135,10 @@ public class TextSecurePreferences {
|
|||||||
return getBooleanPreference(context, AUTO_KEY_EXCHANGE_PREF, true);
|
return getBooleanPreference(context, AUTO_KEY_EXCHANGE_PREF, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isScreenSecurityEnabled(Context context) {
|
||||||
|
return getBooleanPreference(context, SCREEN_SECURITY_PREF, true);
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isUseLocalApnsEnabled(Context context) {
|
public static boolean isUseLocalApnsEnabled(Context context) {
|
||||||
return getBooleanPreference(context, ENABLE_MANUAL_MMS_PREF, false);
|
return getBooleanPreference(context, ENABLE_MANUAL_MMS_PREF, false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user