From c88a2d5b33d35a66efe6152d03948639877c841e Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Fri, 9 Oct 2015 13:22:09 -0700 Subject: 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 --- core/java/android/app/ApplicationPackageManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java index 0adce5dc193d..7cae745fcf29 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; } -- cgit v1.2.3-59-g8ed1b