Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 079dfef1 authored by Pat Erley's avatar Pat Erley Committed by Gerrit Code Review
Browse files

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
parent ad97956f
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -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);
    }