diff options
author | Oscar Montemayor <oam@google.com> | 2010-01-29 15:13:21 -0800 |
---|---|---|
committer | Oscar Montemayor <oam@google.com> | 2010-01-29 15:13:21 -0800 |
commit | 8ea32f42a5d68eb0922a842fc71475786a872323 (patch) | |
tree | 46ff27f0172141d9d9c337eb87353cb834980594 /src | |
parent | 2f32397f47118c6e870421965fba650a51886ffc (diff) | |
download | packages_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-x | src/com/android/packageinstaller/InstallAppProgress.java | 5 |
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; } |