Fix issue #7226978: Still in app detail screen after uninstall
Change-Id: I3b03db0a68bfab5dd010474ee714d5f7a5538af0
This commit is contained in:
@@ -110,6 +110,8 @@ public class InstalledAppDetails extends Fragment
|
|||||||
private ApplicationsState mState;
|
private ApplicationsState mState;
|
||||||
private ApplicationsState.Session mSession;
|
private ApplicationsState.Session mSession;
|
||||||
private ApplicationsState.AppEntry mAppEntry;
|
private ApplicationsState.AppEntry mAppEntry;
|
||||||
|
private boolean mInitialized;
|
||||||
|
private boolean mShowUninstalled;
|
||||||
private PackageInfo mPackageInfo;
|
private PackageInfo mPackageInfo;
|
||||||
private CanBeOnSdCardChecker mCanBeOnSdCardChecker;
|
private CanBeOnSdCardChecker mCanBeOnSdCardChecker;
|
||||||
private View mRootView;
|
private View mRootView;
|
||||||
@@ -767,6 +769,17 @@ public class InstalledAppDetails extends Fragment
|
|||||||
setAppLabelAndIcon(mPackageInfo);
|
setAppLabelAndIcon(mPackageInfo);
|
||||||
refreshButtons();
|
refreshButtons();
|
||||||
refreshSizeInfo();
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user