Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c41f7be authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #7226978: Still in app detail screen after uninstall" into jb-mr1-dev

parents 113e4b6a ab616d47
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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;
    }