diff options
author | Jeff Sharkey <jsharkey@android.com> | 2015-10-09 13:22:09 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2015-10-09 13:22:09 -0700 |
commit | c88a2d5b33d35a66efe6152d03948639877c841e (patch) | |
tree | 90c984bf1859e60049d45dabc1a8625fcd6fa3fd /core | |
parent | 0135690688c8285e022a2a8191c8582f2e6ea759 (diff) | |
download | frameworks_base-c88a2d5b33d35a66efe6152d03948639877c841e.zip frameworks_base-c88a2d5b33d35a66efe6152d03948639877c841e.tar.gz frameworks_base-c88a2d5b33d35a66efe6152d03948639877c841e.tar.bz2 |
Default location is "internalOnly" when undefined.
When an app doesn't define installLocation, the default behavior
should be to treat it as internal only. This matches all the
published developer documentation.
Without this, apps could be unwittingly be moved to adopted storage
devices.
Bug: 24771264
Change-Id: Iaf38ab45329aad6cb5d6deac81fb1781f680189b
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/app/ApplicationPackageManager.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java index 0adce5d..7cae745 100644 --- a/core/java/android/app/ApplicationPackageManager.java +++ b/core/java/android/app/ApplicationPackageManager.java @@ -1619,7 +1619,8 @@ final class ApplicationPackageManager extends PackageManager { // System apps and apps demanding internal storage can't be moved // anywhere else if (app.isSystemApp() - || app.installLocation == PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY) { + || app.installLocation == PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY + || app.installLocation == PackageInfo.INSTALL_LOCATION_UNSPECIFIED) { return false; } |