diff options
| author | Paul Lawrence <paullawrence@google.com> | 2015-05-14 15:49:08 -0700 |
|---|---|---|
| committer | Paul Lawrence <paullawrence@google.com> | 2015-05-27 20:34:14 +0000 |
| commit | 2a6552ed502cfa60fec71a9d41a11faa1e4be963 (patch) | |
| tree | 07a771dc2213c43d01de3c5b1e5297d0f01ddbf7 /src/com/android/settings/CryptKeeper.java | |
| parent | c04420ce2581627478b59cc5d8b453f1fa329e02 (diff) | |
| download | packages_apps_Settings-2a6552ed502cfa60fec71a9d41a11faa1e4be963.tar.gz packages_apps_Settings-2a6552ed502cfa60fec71a9d41a11faa1e4be963.tar.bz2 packages_apps_Settings-2a6552ed502cfa60fec71a9d41a11faa1e4be963.zip | |
Disable back button on crypto screen
The back button cannot do anything from this activity as it is
only ever launched first thing at boot. So do not permit going back.
Note that screens launched from here (emergency dialer, keyboard config)
still work and their back buttons still work.
Bug: 20730074
Change-Id: I939e05450e5fbd61d12890325c4afe9dcad35c1e
Diffstat (limited to 'src/com/android/settings/CryptKeeper.java')
| -rw-r--r-- | src/com/android/settings/CryptKeeper.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/com/android/settings/CryptKeeper.java b/src/com/android/settings/CryptKeeper.java index b4f19ddd7..45b4ff134 100644 --- a/src/com/android/settings/CryptKeeper.java +++ b/src/com/android/settings/CryptKeeper.java @@ -116,7 +116,6 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList /** If gone bad, should we show encryption failed (false) or corrupt (true)*/ private boolean mCorrupt; /** A flag to indicate when the back event should be ignored */ - private boolean mIgnoreBack = false; /** When set, blocks unlocking. Set every COOL_DOWN_ATTEMPTS attempts, only cleared by power cycling phone. */ private boolean mCooldown = false; @@ -390,15 +389,11 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList } /** - * Ignore back events after the user has entered the decrypt screen and while the device is - * encrypting. + * Ignore back events from this activity always - there's nowhere to go back + * to */ @Override public void onBackPressed() { - // In the rare case that something pressed back even though we were disabled. - if (mIgnoreBack) - return; - super.onBackPressed(); } @Override @@ -516,6 +511,8 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList passwordEntryInit(); + findViewById(android.R.id.content).setSystemUiVisibility(View.STATUS_BAR_DISABLE_BACK); + if (mLockPatternView != null) { mLockPatternView.setInStealthMode(!pattern_visible); } @@ -694,7 +691,6 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList * @param isEnabled true if back is enabled, false otherwise. */ private final void setBackFunctionality(boolean isEnabled) { - mIgnoreBack = !isEnabled; if (isEnabled) { mStatusBar.disable(sWidgetsToDisable); } else { |
