OSDN Git Service

Disallow OobConfig being suspended
authorTony Mak <tonymak@google.com>
Tue, 5 Jul 2016 06:28:57 +0000 (07:28 +0100)
committerTony Mak <tonymak@google.com>
Tue, 5 Jul 2016 06:28:57 +0000 (07:28 +0100)
Change-Id: I79d8e6b8bb77878767a0572a567a10ff08c0b6b8
Fix: 29892597

services/core/java/com/android/server/pm/PackageManagerService.java

index 56406ca..894639e 100644 (file)
@@ -11944,6 +11944,12 @@ public class PackageManagerService extends IPackageManager.Stub {
             return false;
         }
 
+        if (mProtectedPackages.isPackageStateProtected(userId, packageName)) {
+            Slog.w(TAG, "Cannot suspend/un-suspend package \"" + packageName
+                    + "\": protected package");
+            return false;
+        }
+
         return true;
     }