Fix Settings crash when click uninstall button
am: 2d709131ba
Change-Id: I1e6228b5e4ecf10aa58bd41d2d8019b3d727b935
This commit is contained in:
@@ -160,7 +160,7 @@ public class AppButtonsPreferenceController extends BasePreferenceController imp
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
// TODO(b/37313605): Re-enable once this controller supports instant apps
|
||||
return isInstantApp() || isSystemModule() ? DISABLED_FOR_USER : AVAILABLE;
|
||||
return mFinishing || isInstantApp() || isSystemModule() ? DISABLED_FOR_USER : AVAILABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -189,7 +189,7 @@ public class AppButtonsPreferenceController extends BasePreferenceController imp
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
if (isAvailable() && !mFinishing) {
|
||||
if (isAvailable()) {
|
||||
mAppsControlDisallowedBySystem = RestrictedLockUtilsInternal.hasBaseUserRestriction(
|
||||
mActivity, UserManager.DISALLOW_APPS_CONTROL, mUserId);
|
||||
mAppsControlDisallowedAdmin = RestrictedLockUtilsInternal.checkIfRestrictionEnforced(
|
||||
|
Reference in New Issue
Block a user