summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings
diff options
context:
space:
mode:
authorSuchi Amalapurapu <asuchitra@google.com>2010-03-04 18:26:56 -0800
committerSuchi Amalapurapu <asuchitra@google.com>2010-03-05 10:40:10 -0800
commit730eb7e5ffa56cae2224a836f489b8e1e94b1f09 (patch)
treebb016d83a716023755897e78422dacb528a5c284 /src/com/android/settings
parent209177aac6761db097c53152f6e9543f60748f15 (diff)
downloadpackages_apps_Settings-730eb7e5ffa56cae2224a836f489b8e1e94b1f09.tar.gz
packages_apps_Settings-730eb7e5ffa56cae2224a836f489b8e1e94b1f09.tar.bz2
packages_apps_Settings-730eb7e5ffa56cae2224a836f489b8e1e94b1f09.zip
Disable move for apps with internalOnly install location
Diffstat (limited to 'src/com/android/settings')
-rw-r--r--src/com/android/settings/InstalledAppDetails.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/settings/InstalledAppDetails.java b/src/com/android/settings/InstalledAppDetails.java
index c2141f6d4..5a351dcff 100644
--- a/src/com/android/settings/InstalledAppDetails.java
+++ b/src/com/android/settings/InstalledAppDetails.java
@@ -34,6 +34,7 @@ import android.content.pm.IPackageMoveObserver;
import android.content.pm.IPackageStatsObserver;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
+import android.content.pm.PackageParser;
import android.content.pm.PackageStats;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
@@ -191,9 +192,12 @@ public class InstalledAppDetails extends Activity implements View.OnClickListene
String pkgName = mAppInfo.packageName;
boolean dataOnly = false;
ApplicationInfo info1 = null;
+ PackageInfo pkgInfo = null;
try {
info1 = mPm.getApplicationInfo(pkgName, 0);
+ pkgInfo = mPm.getPackageInfo(mAppInfo.packageName,
+ PackageManager.GET_UNINSTALLED_PACKAGES);
} catch (NameNotFoundException e) {
}
dataOnly = (info1 == null) && (mAppInfo != null);
@@ -208,6 +212,12 @@ public class InstalledAppDetails extends Activity implements View.OnClickListene
(mAppInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
mMoveAppButton.setText(R.string.move_app_to_sdcard);
}
+ if (pkgInfo != null && pkgInfo.installLocation ==
+ PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY) {
+ // If an application explicitly specifies install location
+ // consider that
+ moveDisable = true;
+ }
if (moveDisable) {
mMoveAppButton.setEnabled(false);
} else {