diff --git a/res/values/strings.xml b/res/values/strings.xml index 89298a953d..c10b2aae5e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -6,7 +6,7 @@ Delete - Currently: %s + Currently: %s You need to have entered your passphrase before managing keys... You haven\'t set a passphrase yet! messages per conversation @@ -33,7 +33,7 @@ Picture Video Audio - + Message size: %d KB Expires: %s @@ -90,7 +90,7 @@ Sender: %1$s\nTransport: %2$s\nSent: %3$s\nReceived:%4$s Confirm Message Delete Are you sure that you want to permanently delete this message? - + Key exchange message... @@ -99,7 +99,7 @@ Are you sure you wish to delete ALL selected conversation threads? Deleting Deleting selected threads... - + Key exchange message... @@ -173,7 +173,6 @@ No encrypted backup found! Restore complete! - No scanned key found! @@ -189,19 +188,19 @@ Passphrases Don\'t Match! Incorrect old passphrase! - + Passphrases don\'t match You must specify a password - + Invalid Passphrase! - + You must specify an MMSC URL for your carrier. MMS Settings Updated You can modify these values from the TextSecure settings menu at any time. - + The signature on this key exchange is different than what you\'ve previously received from this @@ -313,7 +312,7 @@ NOT Verified! Their key is correct. It is also necessary to get your fingerprint scanned as well. Verified! - + You do not have an identity key. Scan to compare @@ -328,7 +327,7 @@ Initiate Despite Existing Request? You\'ve already sent a session initiation request to this recipient, are you sure you\'d like to send another? This will invalidate the first request. Send - + Bad encrypted message... Decrypting, please wait... @@ -346,22 +345,22 @@ Bad encrypted MMS message... MMS message encrypted for non-existing session... - + Currently unable to send your MMS message. - + Import in progress Importing Text Messages - + Touch to open. Touch to open, or touch the lock to close. TextSecure is unlocked Lock with passphrase - + %d new messages - Most recent from: %s + Most recent from: %s Encrypted message... (No Subject) Message delivery failed. @@ -385,7 +384,6 @@ Cancel Continue - Currently unable to send your SMS message. It will be sent once service becomes available. @@ -395,12 +393,12 @@ You have received a message from someone who supports TextSecure encrypted sessions. Would you like to initiate a secure session? Initiate Exchange - + OLD PASSPHRASE: NEW PASSPHRASE: REPEAT NEW PASSPHRASE: - + No contacts. @@ -411,23 +409,23 @@ Select for - + No recent calls. - + Send a message Send - Remove - + Remove + Download Downloading Download - Downloading - + Downloading + Batch Selection Mode @@ -489,18 +487,17 @@ Manual MMS settings are required for your phone. - TEXTSECURE PASSPHRASE Unlock - + TextSecure requires MMS settings to deliver media and group messages through your wireless carrier. Your device does not make this information available, which is occasionally true for locked devices and other restrictive configurations. To send media and group messages, click \'OK\' and complete the requested settings. The MMS settings for your carrier can generally be located by searching for \'your carrier APN\'. You will only need to do this once. MMSC URL (REQUIRED): MMS PROXY HOST (OPTIONAL): MMS PROXY PORT (OPTIONAL): - + Complete @@ -596,19 +593,19 @@ Their identity (they read): Your identity (you read): - + Identity name:\\n Imported identity:\\n Verified! Compare - + They read this: You read this: - + Create Passphrase Enter Passphrase Select Contacts @@ -630,7 +627,7 @@ General Use for all SMS - Use for all MMS + Use for all MMS Use TextSecure for viewing and storing all incoming text messages Use TextSecure for viewing and storing all incoming multimedia messages Enable Enter key @@ -645,7 +642,9 @@ Complete key exchanges Disable passphrase Disable local encryption of messages and keys + Screen security Automatically complete key exchanges for new sessions or for existing sessions with the same identity key + Disable screen security to allow screen shots Forget passphrase from memory after some interval Timeout passphrase Select Passphrase Timeout @@ -715,38 +714,37 @@ Refresh Push Directory Submit debug log - - + Select All Unselect All - + Finished - + Send unencrypted - + Call - + - Message details + Message details Copy text Delete message Forward message Resend message - + Start Secure Session - + Delete Selected Select All - + Search Open navigation drawer @@ -757,14 +755,14 @@ No Identity Available Verify Recipient End Secure Session - + Add attachment Update Group Leave Group Add contact info Delete thread - + Recipients list Delivery @@ -775,10 +773,10 @@ Compare Get scanned to compare Scan to compare - + Unlock - + New Message New Group diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index e6fb46eeef..cdb7eb49e6 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -31,7 +31,7 @@ android:key="pref_delivery_report_sms" android:summary="@string/preferences__request_a_delivery_report_for_each_sms_message_you_send" android:title="@string/preferences__sms_delivery_reports" /> - + - - - + @@ -119,13 +117,13 @@ android:title="@string/preferences__conversation_length_limit" android:inputType="number" android:dependency="pref_trim_threads" /> - + - + @@ -162,7 +160,6 @@ android:dependency="pref_timeout_passphrase" android:dialogTitle="@string/preferences__pref_timeout_interval_dialogtitle" /> - @@ -171,6 +168,11 @@ 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" /> + + diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index 11fb1b0f00..7904921c80 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -270,7 +270,7 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi } else { inflater.inflate(R.menu.conversation_secure_no_identity, menu); } - + inflater.inflate(R.menu.conversation_secure_sms, menu.findItem(R.id.menu_security).getSubMenu()); } else if (isSingleConversation() && !pushRegistered) { inflater.inflate(R.menu.conversation_insecure, menu); @@ -477,7 +477,6 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi startActivityForResult(intent, GROUP_EDIT); } - private void handleDistributionBroadcastEnabled(MenuItem item) { distributionType = ThreadDatabase.DistributionTypes.BROADCAST; item.setChecked(true); @@ -749,7 +748,7 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi 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); } @@ -806,7 +805,6 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi new IntentFilter(GroupDatabase.DATABASE_UPDATE_ACTION)); } - //////// Helper Methods private void addAttachment(int type) { diff --git a/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java b/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java index 18cd3f885f..24301b740b 100644 --- a/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java +++ b/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java @@ -29,6 +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"; 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"; @@ -134,6 +135,10 @@ public class TextSecurePreferences { 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) { return getBooleanPreference(context, ENABLE_MANUAL_MMS_PREF, false); }