diff options
| -rw-r--r-- | core/java/android/content/pm/PackageParser.java | 1 | ||||
| -rw-r--r-- | services/core/java/com/android/server/uri/UriGrantsManagerService.java | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 43f3fbcf63f5..d5d835fd5739 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -8397,6 +8397,7 @@ public class PackageParser { PackageInfo pi = generatePackageInfo(p, EmptyArray.INT, flags, 0, 0, Collections.emptySet(), state); pi.applicationInfo.sourceDir = apexFile.getPath(); + pi.applicationInfo.publicSourceDir = apexFile.getPath(); if (apexInfo.isFactory) { pi.applicationInfo.flags |= ApplicationInfo.FLAG_SYSTEM; } else { diff --git a/services/core/java/com/android/server/uri/UriGrantsManagerService.java b/services/core/java/com/android/server/uri/UriGrantsManagerService.java index 8b332d271a3a..55f062bca2d1 100644 --- a/services/core/java/com/android/server/uri/UriGrantsManagerService.java +++ b/services/core/java/com/android/server/uri/UriGrantsManagerService.java @@ -1032,11 +1032,13 @@ public class UriGrantsManagerService extends IUriGrantsManager.Stub { // must always grant permissions on behalf of someone explicit. final int callingAppId = UserHandle.getAppId(callingUid); if ((callingAppId == SYSTEM_UID) || (callingAppId == ROOT_UID)) { - if ("com.android.settings.files".equals(grantUri.uri.getAuthority())) { + if ("com.android.settings.files".equals(grantUri.uri.getAuthority()) + || "com.android.settings.module_licenses".equals(grantUri.uri.getAuthority())) { // Exempted authority for // 1. cropping user photos and sharing a generated license html // file in Settings app // 2. sharing a generated license html file in TvSettings app + // 3. Sharing module license files from Settings app } else { Slog.w(TAG, "For security reasons, the system cannot issue a Uri permission" + " grant to " + grantUri + "; use startActivityAsCaller() instead"); |