Skip to content
Snippets Groups Projects
Commit 4c11355e authored by Mohammad Samiul Islam's avatar Mohammad Samiul Islam Committed by Android (Google) Code Review
Browse files

Merge "Prevent sessions from resuming once boot is completed" into rvc-dev

parents 813ac747 a9225311
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,7 @@ import android.os.ParcelableException;
import android.os.PowerManager;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManagerInternal;
import android.os.storage.IStorageManager;
......@@ -1155,6 +1156,11 @@ public class StagingManager {
}
private void checkStateAndResume(@NonNull PackageInstallerSession session) {
// Do not resume session if boot completed already
if (SystemProperties.getBoolean("sys.boot_completed", false)) {
return;
}
if (!session.isCommitted()) {
// Session hasn't been committed yet, ignore.
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment