Loading src/com/android/settings/CryptKeeper.java +11 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,8 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList private static final String FORCE_VIEW_ERROR = "error"; private static final String FORCE_VIEW_PASSWORD = "password"; private static final String STATE_COOLDOWN = "cooldown"; /** When encryption is detected, this flag indicates whether or not we've checked for errors. */ private boolean mValidationComplete; private boolean mValidationRequested; Loading Loading @@ -426,6 +428,10 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList mStatusBar = (StatusBarManager) getSystemService(Context.STATUS_BAR_SERVICE); mStatusBar.disable(sWidgetsToDisable); if (savedInstanceState != null) { mCooldown = savedInstanceState.getBoolean(STATE_COOLDOWN); } setAirplaneModeIfNecessary(); mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); // Check for (and recover) retained instance data Loading @@ -437,6 +443,11 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList } } @Override public void onSaveInstanceState(Bundle savedInstanceState) { savedInstanceState.putBoolean(STATE_COOLDOWN, mCooldown); } /** * Note, we defer the state check and screen setup to onStart() because this will be * re-run if the user clicks the power button (sleeping/waking the screen), and this is Loading Loading
src/com/android/settings/CryptKeeper.java +11 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,8 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList private static final String FORCE_VIEW_ERROR = "error"; private static final String FORCE_VIEW_PASSWORD = "password"; private static final String STATE_COOLDOWN = "cooldown"; /** When encryption is detected, this flag indicates whether or not we've checked for errors. */ private boolean mValidationComplete; private boolean mValidationRequested; Loading Loading @@ -426,6 +428,10 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList mStatusBar = (StatusBarManager) getSystemService(Context.STATUS_BAR_SERVICE); mStatusBar.disable(sWidgetsToDisable); if (savedInstanceState != null) { mCooldown = savedInstanceState.getBoolean(STATE_COOLDOWN); } setAirplaneModeIfNecessary(); mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); // Check for (and recover) retained instance data Loading @@ -437,6 +443,11 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList } } @Override public void onSaveInstanceState(Bundle savedInstanceState) { savedInstanceState.putBoolean(STATE_COOLDOWN, mCooldown); } /** * Note, we defer the state check and screen setup to onStart() because this will be * re-run if the user clicks the power button (sleeping/waking the screen), and this is Loading