summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-10-04 15:44:50 -0700
committerDianne Hackborn <hackbod@google.com>2012-10-04 15:44:50 -0700
commitab616d477be693fc455329953711264af0ed7814 (patch)
tree8568844e79fa70acd0833a2d6c75aa1c0c42c165 /src
parent27636444a4be011a6a813cba6429e58629316ce4 (diff)
downloadpackages_apps_settings-ab616d477be693fc455329953711264af0ed7814.zip
packages_apps_settings-ab616d477be693fc455329953711264af0ed7814.tar.gz
packages_apps_settings-ab616d477be693fc455329953711264af0ed7814.tar.bz2
Fix issue #7226978: Still in app detail screen after uninstall
Change-Id: I3b03db0a68bfab5dd010474ee714d5f7a5538af0
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;
}