summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/applications
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2016-05-03 15:37:46 -0700
committerRoman Birg <roman@cyngn.com>2016-05-04 14:40:29 -0700
commit6f391f8c134cf79cbd1c7e90e501715935c36a0f (patch)
tree8280ba6ee16de3022cb4b6a9916eea4114c26d27 /src/com/android/settings/applications
parentbdc83b4a556e5b74e6f6d3160e01adf45c29b877 (diff)
downloadpackages_apps_Settings-6f391f8c134cf79cbd1c7e90e501715935c36a0f.zip
packages_apps_Settings-6f391f8c134cf79cbd1c7e90e501715935c36a0f.tar.gz
packages_apps_Settings-6f391f8c134cf79cbd1c7e90e501715935c36a0f.tar.bz2
Protected apps: fix rotation states
Don't try to relaunch the activity if it's already been launched. Ticket: FEIJ-224 Change-Id: I597417570f2f937afb0195fecd7dc406ff2508f3 Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'src/com/android/settings/applications')
-rw-r--r--src/com/android/settings/applications/ProtectedAppsActivity.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/com/android/settings/applications/ProtectedAppsActivity.java b/src/com/android/settings/applications/ProtectedAppsActivity.java
index a1c6cd5..5089f19 100644
--- a/src/com/android/settings/applications/ProtectedAppsActivity.java
+++ b/src/com/android/settings/applications/ProtectedAppsActivity.java
@@ -56,6 +56,7 @@ public class ProtectedAppsActivity extends Activity {
private static final int REQ_RESET_PATTERN = 2;
private static final String NEEDS_UNLOCK = "needs_unlock";
+ private static final String TARGET_INTENT = "target_intent";
private ListView mListView;
@@ -100,16 +101,17 @@ public class ProtectedAppsActivity extends Activity {
if (savedInstanceState != null) {
mUserIsAuth = savedInstanceState.getBoolean(NEEDS_UNLOCK);
- }
-
- if (!mUserIsAuth) {
- // Require unlock
- Intent lockPattern = new Intent(this, LockPatternActivity.class);
- startActivityForResult(lockPattern, REQ_ENTER_PATTERN);
+ mTargetIntent = savedInstanceState.getParcelable(TARGET_INTENT);
} else {
- //LAUNCH
- if (mTargetIntent != null) {
- launchTargetActivityInfoAndFinish();
+ if (!mUserIsAuth) {
+ // Require unlock
+ Intent lockPattern = new Intent(this, LockPatternActivity.class);
+ startActivityForResult(lockPattern, REQ_ENTER_PATTERN);
+ } else {
+ //LAUNCH
+ if (mTargetIntent != null) {
+ launchTargetActivityInfoAndFinish();
+ }
}
}
}
@@ -118,6 +120,7 @@ public class ProtectedAppsActivity extends Activity {
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean(NEEDS_UNLOCK, mUserIsAuth);
+ outState.putParcelable(TARGET_INTENT, mTargetIntent);
}
@Override