Merge "Prevent sessions from resuming once boot is completed" into rvc-dev am: 4c11355e08 am: 84db84a65c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11837601 Change-Id: Ia3a636cb9cbc14f56063391b72287e01d7e31832
This commit is contained in:
committed by
Automerger Merge Worker
commit
2586e1a9c9
@@ -53,6 +53,7 @@ import android.os.ParcelableException;
|
|||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ServiceManager;
|
import android.os.ServiceManager;
|
||||||
|
import android.os.SystemProperties;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.os.UserManagerInternal;
|
import android.os.UserManagerInternal;
|
||||||
import android.os.storage.IStorageManager;
|
import android.os.storage.IStorageManager;
|
||||||
@@ -1155,6 +1156,11 @@ public class StagingManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void checkStateAndResume(@NonNull PackageInstallerSession session) {
|
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()) {
|
if (!session.isCommitted()) {
|
||||||
// Session hasn't been committed yet, ignore.
|
// Session hasn't been committed yet, ignore.
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user