summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOscar Montemayor <oam@google.com>2010-01-29 15:13:21 -0800
committerOscar Montemayor <oam@google.com>2010-01-29 15:13:21 -0800
commit8ea32f42a5d68eb0922a842fc71475786a872323 (patch)
tree46ff27f0172141d9d9c337eb87353cb834980594 /src
parent2f32397f47118c6e870421965fba650a51886ffc (diff)
downloadpackages_apps_packageinstaller-8ea32f42a5d68eb0922a842fc71475786a872323.zip
packages_apps_packageinstaller-8ea32f42a5d68eb0922a842fc71475786a872323.tar.gz
packages_apps_packageinstaller-8ea32f42a5d68eb0922a842fc71475786a872323.tar.bz2
Apps on SD card projec.
Folowing through with making recommendAPpInstallLocation(..) an instance method in PackageManager.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/com/android/packageinstaller/InstallAppProgress.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/packageinstaller/InstallAppProgress.java b/src/com/android/packageinstaller/InstallAppProgress.java
index 3ef3750..e26abc2 100755
--- a/src/com/android/packageinstaller/InstallAppProgress.java
+++ b/src/com/android/packageinstaller/InstallAppProgress.java
@@ -159,11 +159,12 @@ public class InstallAppProgress extends Activity implements View.OnClickListener
ApplicationInfo appInfo = PackageUtil.getApplicationInfo(mPackageURI);
int bestInstallLoc =
- PackageManager.recommendAppInstallLocation(appInfo, mPackageURI);
+ pm.recommendAppInstallLocation(appInfo, mPackageURI);
// If best location is SD card, mark it in package flags.
// for the time being, ignore if the application does not fit.
- if (bestInstallLoc != (-1)) {
+ if ((bestInstallLoc != PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE) &&
+ (bestInstallLoc != PackageManager.INSTALL_PARSE_FAILED_NOT_APK)) {
installFlags = installFlags | bestInstallLoc;
}