Allow things that can install packages to set Obb paths

Change-Id: I19b426cb3de1a5c9285badf8aea59989568914b4
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java
index d97f30c..11d0b7a 100644
--- a/services/java/com/android/server/PackageManagerService.java
+++ b/services/java/com/android/server/PackageManagerService.java
@@ -4764,7 +4764,9 @@
             Log.v(TAG, "Setting .obb path for " + packageName + " to: " + path);
         PackageSetting pkgSetting;
         final int uid = Binder.getCallingUid();
-        boolean allowedByPermission = false;
+        final int permission = mContext.checkCallingPermission(
+                android.Manifest.permission.INSTALL_PACKAGES);
+        final boolean allowedByPermission = (permission == PackageManager.PERMISSION_GRANTED);
         synchronized (mPackages) {
             pkgSetting = mSettings.mPackages.get(packageName);
             if (pkgSetting == null) {