summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/applications/InstalledAppDetails.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/applications/InstalledAppDetails.java')
-rw-r--r--src/com/android/settings/applications/InstalledAppDetails.java25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java
index 629bac5..ab46661 100644
--- a/src/com/android/settings/applications/InstalledAppDetails.java
+++ b/src/com/android/settings/applications/InstalledAppDetails.java
@@ -79,7 +79,7 @@ public class InstalledAppDetails extends Fragment
implements View.OnClickListener, CompoundButton.OnCheckedChangeListener,
ApplicationsState.Callbacks {
private static final String TAG="InstalledAppDetails";
- static final boolean SUPPORT_DISABLE_APPS = false;
+ static final boolean SUPPORT_DISABLE_APPS = true;
private static final boolean localLOGV = false;
public static final String ARG_PACKAGE_NAME = "package";
@@ -103,7 +103,8 @@ public class InstalledAppDetails extends Fragment
private TextView mTotalSize;
private TextView mAppSize;
private TextView mDataSize;
- private TextView mExternalSize;
+ private TextView mExternalCodeSize;
+ private TextView mExternalDataSize;
private ClearUserDataObserver mClearDataObserver;
// Views related to cache info
private TextView mCacheSize;
@@ -118,7 +119,8 @@ public class InstalledAppDetails extends Fragment
private boolean mHaveSizes = false;
private long mLastCodeSize = -1;
private long mLastDataSize = -1;
- private long mLastExternalSize = -1;
+ private long mLastExternalCodeSize = -1;
+ private long mLastExternalDataSize = -1;
private long mLastCacheSize = -1;
private long mLastTotalSize = -1;
@@ -282,7 +284,7 @@ public class InstalledAppDetails extends Fragment
intent.setPackage(mAppEntry.info.packageName);
List<ResolveInfo> homes = mPm.queryIntentActivities(intent, 0);
if ((homes != null && homes.size() > 0) ||
- (mPackageInfo != null &&
+ (mPackageInfo != null && mPackageInfo.signatures != null &&
sys.signatures[0].equals(mPackageInfo.signatures[0]))) {
// Disable button for core system applications.
mUninstallButton.setText(R.string.disable_text);
@@ -331,7 +333,8 @@ public class InstalledAppDetails extends Fragment
mTotalSize = (TextView)view.findViewById(R.id.total_size_text);
mAppSize = (TextView)view.findViewById(R.id.application_size_text);
mDataSize = (TextView)view.findViewById(R.id.data_size_text);
- mExternalSize = (TextView)view.findViewById(R.id.external_size_text);
+ mExternalCodeSize = (TextView)view.findViewById(R.id.external_code_size_text);
+ mExternalDataSize = (TextView)view.findViewById(R.id.external_data_size_text);
// Get Control button panel
View btnPanel = view.findViewById(R.id.control_buttons_panel);
@@ -547,9 +550,13 @@ public class InstalledAppDetails extends Fragment
mLastDataSize = mAppEntry.dataSize;
mDataSize.setText(getSizeStr(mAppEntry.dataSize));
}
- if (mLastExternalSize != mAppEntry.externalSize) {
- mLastExternalSize = mAppEntry.externalSize;
- mExternalSize.setText(getSizeStr(mAppEntry.externalSize));
+ if (mLastExternalCodeSize != mAppEntry.externalCodeSize) {
+ mLastExternalCodeSize = mAppEntry.externalCodeSize;
+ mExternalCodeSize.setText(getSizeStr(mAppEntry.externalCodeSize));
+ }
+ if (mLastExternalDataSize != mAppEntry.externalDataSize) {
+ mLastExternalDataSize = mAppEntry.externalDataSize;
+ mExternalDataSize.setText(getSizeStr(mAppEntry.externalDataSize));
}
if (mLastCacheSize != mAppEntry.cacheSize) {
mLastCacheSize = mAppEntry.cacheSize;
@@ -831,7 +838,7 @@ public class InstalledAppDetails extends Fragment
} else {
if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
new DisableChanger(this, mAppEntry.info, mAppEntry.info.enabled ?
- PackageManager.COMPONENT_ENABLED_STATE_DISABLED
+ PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER
: PackageManager.COMPONENT_ENABLED_STATE_DEFAULT).execute((Object)null);
} else {
uninstallPkg(packageName);