summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-10-04 17:20:44 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-04 17:20:45 -0700
commit2c41f7be44715483de4d3e9c8a91488c4f723e90 (patch)
treeea80268f4a93b659cbc5317a26e132a0602fdf17 /src
parent113e4b6aa1dfbc49abdf6366909ceb4a6923d114 (diff)
parentab616d477be693fc455329953711264af0ed7814 (diff)
downloadpackages_apps_settings-2c41f7be44715483de4d3e9c8a91488c4f723e90.zip
packages_apps_settings-2c41f7be44715483de4d3e9c8a91488c4f723e90.tar.gz
packages_apps_settings-2c41f7be44715483de4d3e9c8a91488c4f723e90.tar.bz2
Merge "Fix issue #7226978: Still in app detail screen after uninstall" into jb-mr1-dev
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/applications/InstalledAppDetails.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java
index 55f18d2..7690b7e 100644
--- a/src/com/android/settings/applications/InstalledAppDetails.java
+++ b/src/com/android/settings/applications/InstalledAppDetails.java
@@ -110,6 +110,8 @@ public class InstalledAppDetails extends Fragment
private ApplicationsState mState;
private ApplicationsState.Session mSession;
private ApplicationsState.AppEntry mAppEntry;
+ private boolean mInitialized;
+ private boolean mShowUninstalled;
private PackageInfo mPackageInfo;
private CanBeOnSdCardChecker mCanBeOnSdCardChecker;
private View mRootView;
@@ -767,6 +769,17 @@ public class InstalledAppDetails extends Fragment
setAppLabelAndIcon(mPackageInfo);
refreshButtons();
refreshSizeInfo();
+
+ if (!mInitialized) {
+ // First time init: are we displaying an uninstalled app?
+ mInitialized = true;
+ mShowUninstalled = (mAppEntry.info.flags&ApplicationInfo.FLAG_INSTALLED) == 0;
+ } else if (!mShowUninstalled) {
+ // All other times: if we did not start out with the app uninstalled,
+ // then if it becomes uninstalled we want to go away.
+ return (mAppEntry.info.flags&ApplicationInfo.FLAG_INSTALLED) == 0;
+ }
+
return true;
}