Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11908,6 +11908,7 @@ package android.content.pm { field public static final int SIGNATURE_NO_MATCH = -3; // 0xfffffffd field public static final int SIGNATURE_SECOND_NOT_SIGNED = -2; // 0xfffffffe field public static final int SIGNATURE_UNKNOWN_PACKAGE = -4; // 0xfffffffc field public static final int SYNCHRONOUS = 2; // 0x2 field public static final int VERIFICATION_ALLOW = 1; // 0x1 field public static final int VERIFICATION_REJECT = -1; // 0xffffffff field public static final int VERSION_CODE_HIGHEST = -1; // 0xffffffff core/java/android/content/pm/PackageManager.java +11 −2 Original line number Diff line number Diff line Loading @@ -917,8 +917,9 @@ public abstract class PackageManager { public static final int INSTALL_DRY_RUN = 0x00800000; /** @hide */ @IntDef(flag = true, prefix = { "DONT_KILL_APP" }, value = { DONT_KILL_APP @IntDef(flag = true, value = { DONT_KILL_APP, SYNCHRONOUS }) @Retention(RetentionPolicy.SOURCE) public @interface EnabledFlags {} Loading @@ -931,6 +932,14 @@ public abstract class PackageManager { */ public static final int DONT_KILL_APP = 0x00000001; /** * Flag parameter for * {@link #setComponentEnabledSetting(android.content.ComponentName, int, int)} to indicate * that the given user's package restrictions state will be serialised to disk after the * component state has been updated. */ public static final int SYNCHRONOUS = 0x00000002; /** @hide */ @IntDef(prefix = { "INSTALL_REASON_" }, value = { INSTALL_REASON_UNKNOWN, Loading services/core/java/com/android/server/pm/PackageManagerService.java +15 −6 Original line number Diff line number Diff line Loading @@ -19980,7 +19980,11 @@ public class PackageManagerService extends IPackageManager.Stub } } synchronized (mLock) { if ((flags & PackageManager.SYNCHRONOUS) != 0) { flushPackageRestrictionsAsUserInternalLocked(userId); } else { scheduleWritePackageRestrictionsLocked(userId); } updateSequenceNumberLP(pkgSetting, new int[] { userId }); final long callingId = Binder.clearCallingIdentity(); try { Loading Loading @@ -20041,13 +20045,18 @@ public class PackageManagerService extends IPackageManager.Stub mPermissionManager.enforceCrossUserPermission(Binder.getCallingUid(), userId, false /* requireFullPermission*/, false /* checkShell */, "flushPackageRestrictions"); synchronized (mLock) { flushPackageRestrictionsAsUserInternalLocked(userId); } } @GuardedBy("mLock") private void flushPackageRestrictionsAsUserInternalLocked(int userId) { mSettings.writePackageRestrictionsLPr(userId); mDirtyUsers.remove(userId); if (mDirtyUsers.isEmpty()) { mHandler.removeMessages(WRITE_PACKAGE_RESTRICTIONS); } } } private void sendPackageChangedBroadcast(String packageName, boolean killFlag, ArrayList<String> componentNames, int packageUid) { Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11908,6 +11908,7 @@ package android.content.pm { field public static final int SIGNATURE_NO_MATCH = -3; // 0xfffffffd field public static final int SIGNATURE_SECOND_NOT_SIGNED = -2; // 0xfffffffe field public static final int SIGNATURE_UNKNOWN_PACKAGE = -4; // 0xfffffffc field public static final int SYNCHRONOUS = 2; // 0x2 field public static final int VERIFICATION_ALLOW = 1; // 0x1 field public static final int VERIFICATION_REJECT = -1; // 0xffffffff field public static final int VERSION_CODE_HIGHEST = -1; // 0xffffffff
core/java/android/content/pm/PackageManager.java +11 −2 Original line number Diff line number Diff line Loading @@ -917,8 +917,9 @@ public abstract class PackageManager { public static final int INSTALL_DRY_RUN = 0x00800000; /** @hide */ @IntDef(flag = true, prefix = { "DONT_KILL_APP" }, value = { DONT_KILL_APP @IntDef(flag = true, value = { DONT_KILL_APP, SYNCHRONOUS }) @Retention(RetentionPolicy.SOURCE) public @interface EnabledFlags {} Loading @@ -931,6 +932,14 @@ public abstract class PackageManager { */ public static final int DONT_KILL_APP = 0x00000001; /** * Flag parameter for * {@link #setComponentEnabledSetting(android.content.ComponentName, int, int)} to indicate * that the given user's package restrictions state will be serialised to disk after the * component state has been updated. */ public static final int SYNCHRONOUS = 0x00000002; /** @hide */ @IntDef(prefix = { "INSTALL_REASON_" }, value = { INSTALL_REASON_UNKNOWN, Loading
services/core/java/com/android/server/pm/PackageManagerService.java +15 −6 Original line number Diff line number Diff line Loading @@ -19980,7 +19980,11 @@ public class PackageManagerService extends IPackageManager.Stub } } synchronized (mLock) { if ((flags & PackageManager.SYNCHRONOUS) != 0) { flushPackageRestrictionsAsUserInternalLocked(userId); } else { scheduleWritePackageRestrictionsLocked(userId); } updateSequenceNumberLP(pkgSetting, new int[] { userId }); final long callingId = Binder.clearCallingIdentity(); try { Loading Loading @@ -20041,13 +20045,18 @@ public class PackageManagerService extends IPackageManager.Stub mPermissionManager.enforceCrossUserPermission(Binder.getCallingUid(), userId, false /* requireFullPermission*/, false /* checkShell */, "flushPackageRestrictions"); synchronized (mLock) { flushPackageRestrictionsAsUserInternalLocked(userId); } } @GuardedBy("mLock") private void flushPackageRestrictionsAsUserInternalLocked(int userId) { mSettings.writePackageRestrictionsLPr(userId); mDirtyUsers.remove(userId); if (mDirtyUsers.isEmpty()) { mHandler.removeMessages(WRITE_PACKAGE_RESTRICTIONS); } } } private void sendPackageChangedBroadcast(String packageName, boolean killFlag, ArrayList<String> componentNames, int packageUid) {