diff options
author | Pat Erley <perley@cyngn.com> | 2016-05-09 14:35:00 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-05-16 13:29:11 -0700 |
commit | 079dfef1ddf7843425522fbaf6233b6166db44dd (patch) | |
tree | 368e8c4538866792f58e081ba25f5c549a7ecba1 /services | |
parent | ad97956f82215357c50158b2384d527a96cce0d1 (diff) | |
download | frameworks_base-079dfef1ddf7843425522fbaf6233b6166db44dd.zip frameworks_base-079dfef1ddf7843425522fbaf6233b6166db44dd.tar.gz frameworks_base-079dfef1ddf7843425522fbaf6233b6166db44dd.tar.bz2 |
ShutdownThread: Decrypt before stopping storage manager
uncrypt needs access to the file to uncrypt it. If we stop the
storage manager service, uncrypting fails, leading to failed
updates.
Change-Id: Ifc75c990ebf8f0a2f11b340cd39cd469b46c6f68
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/power/ShutdownThread.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java index 34b6e2b..4eda3dc 100644 --- a/services/core/java/com/android/server/power/ShutdownThread.java +++ b/services/core/java/com/android/server/power/ShutdownThread.java @@ -630,6 +630,13 @@ public final class ShutdownThread extends Thread { } }; + if (mRebootUpdate) { + sInstance.setRebootProgress(MOUNT_SERVICE_STOP_PERCENT, null); + + // If it's to reboot to install update, invoke uncrypt via init service. + uncrypt(); + } + Log.i(TAG, "Shutting down MountService"); // Set initial variables and time out time. @@ -665,12 +672,6 @@ public final class ShutdownThread extends Thread { } } } - if (mRebootUpdate) { - sInstance.setRebootProgress(MOUNT_SERVICE_STOP_PERCENT, null); - - // If it's to reboot to install update, invoke uncrypt via init service. - uncrypt(); - } rebootOrShutdown(mContext, mReboot, mRebootReason); } |