summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/com/android/internal/content/PackageHelper.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/java/com/android/internal/content/PackageHelper.java b/core/java/com/android/internal/content/PackageHelper.java
index b04ddf4..0611401 100644
--- a/core/java/com/android/internal/content/PackageHelper.java
+++ b/core/java/com/android/internal/content/PackageHelper.java
@@ -378,15 +378,6 @@ public class PackageHelper {
installLocation = PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY;
}
- // If app expresses strong desire for internal space, honor it
- if (installLocation == PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY) {
- if (fitsOnInternal) {
- return null;
- } else {
- throw new IOException("Requested internal only, but not enough space");
- }
- }
-
// If app already exists somewhere, prefer to stay on that volume
if (existingInfo != null) {
if (existingInfo.volumeUuid == null && fitsOnInternal) {
@@ -397,6 +388,15 @@ public class PackageHelper {
}
}
+ // If app expresses strong desire for internal space, honor it
+ if (installLocation == PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY) {
+ if (fitsOnInternal) {
+ return null;
+ } else {
+ throw new IOException("Requested internal only, but not enough space");
+ }
+ }
+
// We're left with either preferring external or auto, so just pick
// volume with most space
if (bestCandidate != null) {