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
This commit is contained in:
Jeff Sharkey
2015-10-09 13:22:09 -07:00
parent 0135690688
commit c88a2d5b33

View File

@@ -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;
}