Flag secure in all activities that extends BaseActionBarActivity

Closes #4152
Fixes #3327
This commit is contained in:
Jodson Leandro
2015-09-30 20:42:39 -03:00
committed by Moxie Marlinspike
parent e808ae0ddc
commit a930ec5404
2 changed files with 19 additions and 11 deletions
@@ -56,7 +56,6 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
protected void onResume() {
Log.w(TAG, "onResume()");
super.onResume();
initializeScreenshotSecurity();
KeyCachingService.registerPassphraseActivityStarted(this);
MessageRetrievalService.registerActivityStarted(this);
isVisible = true;
@@ -193,16 +192,6 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
return new Intent(this, ConversationListActivity.class);
}
private void initializeScreenshotSecurity() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH &&
TextSecurePreferences.isScreenSecurityEnabled(this))
{
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
} else {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
}
}
private void initializeClearKeyReceiver() {
Log.w(TAG, "initializeClearKeyReceiver()");
this.clearKeyReceiver = new BroadcastReceiver() {