Snap for 9465878 from 30783964b3 to tm-qpr2-release

Change-Id: I1e8465e635a753efadc8e991c726923f8e9522e3
This commit is contained in:
Android Build Coastguard Worker
2023-01-07 22:30:13 +00:00
2 changed files with 9 additions and 3 deletions

View File

@@ -408,7 +408,13 @@ public class AppInfoDashboardFragment extends DashboardFragment
return; return;
} }
super.onPrepareOptionsMenu(menu); super.onPrepareOptionsMenu(menu);
menu.findItem(UNINSTALL_ALL_USERS_MENU).setVisible(shouldShowUninstallForAll(mAppEntry)); final MenuItem uninstallAllUsersItem = menu.findItem(UNINSTALL_ALL_USERS_MENU);
uninstallAllUsersItem.setVisible(
shouldShowUninstallForAll(mAppEntry) && !mAppsControlDisallowedBySystem);
if (uninstallAllUsersItem.isVisible()) {
RestrictedLockUtilsInternal.setMenuItemAsDisabledByAdmin(getActivity(),
uninstallAllUsersItem, mAppsControlDisallowedAdmin);
}
menu.findItem(ACCESS_RESTRICTED_SETTINGS).setVisible(shouldShowAccessRestrictedSettings()); menu.findItem(ACCESS_RESTRICTED_SETTINGS).setVisible(shouldShowAccessRestrictedSettings());
mUpdatedSysApp = (mAppEntry.info.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; mUpdatedSysApp = (mAppEntry.info.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
final MenuItem uninstallUpdatesItem = menu.findItem(UNINSTALL_UPDATES); final MenuItem uninstallUpdatesItem = menu.findItem(UNINSTALL_UPDATES);

View File

@@ -124,7 +124,7 @@ public class MediaVolumePreferenceController extends VolumeSeekBarPreferenceCont
getWorker().getActiveLocalMediaController().getPackageName()); getWorker().getActiveLocalMediaController().getPackageName());
pi = PendingIntent.getBroadcast(context, 0 /* requestCode */, intent, pi = PendingIntent.getBroadcast(context, 0 /* requestCode */, intent,
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE); PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
} else { } else {
final CachedBluetoothDevice bluetoothDevice = final CachedBluetoothDevice bluetoothDevice =
((BluetoothMediaDevice) mMediaDevice).getCachedDevice(); ((BluetoothMediaDevice) mMediaDevice).getCachedDevice();
@@ -141,7 +141,7 @@ public class MediaVolumePreferenceController extends VolumeSeekBarPreferenceCont
&& getWorker().getActiveLocalMediaController() != null); && getWorker().getActiveLocalMediaController() != null);
pi = PendingIntent.getActivity(context, 0 /* requestCode */, intent, pi = PendingIntent.getActivity(context, 0 /* requestCode */, intent,
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE); PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
} }
final IconCompat icon = getBroadcastIcon(context); final IconCompat icon = getBroadcastIcon(context);