summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-06-09 21:42:22 -0700
committerJeff Sharkey <jsharkey@android.com>2015-06-09 21:42:22 -0700
commitab2340996a515ea0c437ad5bb1ea1fa88ab9edff (patch)
tree5a0fe9a3ade570643394908c989a2cd371268a40 /services
parent4e83cc9fc15fa4795a41d4d8dfd2b00c1ad966fd (diff)
downloadframeworks_base-ab2340996a515ea0c437ad5bb1ea1fa88ab9edff.zip
frameworks_base-ab2340996a515ea0c437ad5bb1ea1fa88ab9edff.tar.gz
frameworks_base-ab2340996a515ea0c437ad5bb1ea1fa88ab9edff.tar.bz2
Flags to select storage volume for app installs.
Remote callers can now provide the "--install-location" value from the APK to help select a location, or they can explicitly force a volume by UUID. Bug: 21676789 Change-Id: Iefc92d770a851fc33e37edbf259fdb8df2b14ae5
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/pm/PackageInstallerService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java
index a1738a2..ca24e3a 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -571,6 +571,11 @@ public class PackageInstallerService extends IPackageInstaller.Stub {
throw new IOException("No suitable external storage available");
}
+ } else if ((params.installFlags & PackageManager.INSTALL_FORCE_VOLUME_UUID) != 0) {
+ // For now, installs to adopted media are treated as internal from
+ // an install flag point-of-view.
+ params.setInstallFlagsInternal();
+
} else {
// For now, installs to adopted media are treated as internal from
// an install flag point-of-view.