Merge "Fix parantheses in conditional" into rvc-dev
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index c34e45e..6873378 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -13117,7 +13117,7 @@
synchronized (mLock) {
allPackages = mPackages.keySet().toArray(new String[mPackages.size()]);
}
- PackageManagerService.this.removeDistractingPackageRestrictions(allPackages, userId);
+ removeDistractingPackageRestrictions(allPackages, userId);
}
/**
@@ -20161,13 +20161,13 @@
}
synchronized (mLock) {
pkgSetting.setEnabled(newState, userId, callingPackage);
- if (newState == COMPONENT_ENABLED_STATE_DISABLED_USER
- || newState == COMPONENT_ENABLED_STATE_DISABLED
+ if ((newState == COMPONENT_ENABLED_STATE_DISABLED_USER
+ || newState == COMPONENT_ENABLED_STATE_DISABLED)
&& pkgSetting.getPermissionsState().hasPermission(
Manifest.permission.SUSPEND_APPS, userId)) {
// This app should not generally be allowed to get disabled by the UI, but if it
// ever does, we don't want to end up with some of the user's apps permanently
- // blocked
+ // suspended.
unsuspendForSuspendingPackage(packageName, userId);
removeAllDistractingPackageRestrictions(userId);
}
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index fa1da27..1dc705b 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -4837,6 +4837,8 @@
pw.print(ps.getHidden(user.id));
pw.print(" suspended=");
pw.print(ps.getSuspended(user.id));
+ pw.print(" distractionFlags=");
+ pw.print(ps.getDistractionFlags(user.id));
pw.print(" stopped=");
pw.print(ps.getStopped(user.id));
pw.print(" notLaunched=");