diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-10-16 11:49:00 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-10-16 11:55:33 -0700 |
commit | 140f6c6cf705f020c0ee6a2843cf1691cc68e729 (patch) | |
tree | 4a4297ccdbb8453ff77063b2b5ac3c5ab5c704b0 | |
parent | f9eca2e0e0dc31fde40cc731c50c3f522f578c69 (diff) | |
download | packages_apps_settings-140f6c6cf705f020c0ee6a2843cf1691cc68e729.zip packages_apps_settings-140f6c6cf705f020c0ee6a2843cf1691cc68e729.tar.gz packages_apps_settings-140f6c6cf705f020c0ee6a2843cf1691cc68e729.tar.bz2 |
Fix issue #5460725: Crespo does not fully boot after a wipe
Add a hack to relaunch whatever was supposed to be launched
(presumably home) when CryptKeeper discovers it shouldn't be
running.
Change-Id: I1406b8d6e8d484ed1c169fa4908a9e05e8c7c2ad
-rw-r--r-- | AndroidManifest.xml | 1 | ||||
-rw-r--r-- | src/com/android/settings/CryptKeeper.java | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 15bb878..1da79f8 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1155,6 +1155,7 @@ <activity android:name=".CryptKeeper" android:immersive="true" android:launchMode="singleTop" + android:excludeFromRecents="true" android:theme="@android:style/Theme.Holo.NoActionBar" android:configChanges="mcc|mnc|keyboard|keyboardHidden|uiMode" android:windowSoftInputMode="stateVisible|adjustResize"> diff --git a/src/com/android/settings/CryptKeeper.java b/src/com/android/settings/CryptKeeper.java index 8968de4..d58dddb 100644 --- a/src/com/android/settings/CryptKeeper.java +++ b/src/com/android/settings/CryptKeeper.java @@ -221,7 +221,20 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList // Disable the crypt keeper. PackageManager pm = getPackageManager(); ComponentName name = new ComponentName(this, CryptKeeper.class); - pm.setComponentEnabledSetting(name, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0); + pm.setComponentEnabledSetting(name, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, + PackageManager.DONT_KILL_APP); + // Typically CryptKeeper is launched as the home app. We didn't + // want to be running, so need to finish this activity and re-launch + // its intent now that we are not in the way of doing what is really + // supposed to happen. + // NOTE: This is really grungy. I think it would be better for the + // activity manager to explicitly launch the crypt keeper instead of + // home in the situation where we need to decrypt the device + finish(); + Intent intent = getIntent(); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + intent.setComponent(null); + startActivity(intent); return; } |