diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-10-04 17:20:44 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-04 17:20:45 -0700 |
commit | 2c41f7be44715483de4d3e9c8a91488c4f723e90 (patch) | |
tree | ea80268f4a93b659cbc5317a26e132a0602fdf17 /src | |
parent | 113e4b6aa1dfbc49abdf6366909ceb4a6923d114 (diff) | |
parent | ab616d477be693fc455329953711264af0ed7814 (diff) | |
download | packages_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.java | 13 |
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; } |