Expand uninstallForAll to Admins
Currently, user 0 can uninstall other users' apps. It really has that ability by virtue of it being an Admin user. But non-user-0 Admins don't currently have this ability, so we expand that here. This also allows this ability on HSUM, where human Admin users aren't user 0. Bug: 384514936 Test: manual confirmation that overflow appears on HSUM device Test: atest SettingsSpaUnitTests:com.android.settings.spa.app.appinfo.AppInfoSettingsMoreOptionsTest Flag: EXEMPT bugfix Change-Id: I976bb63ecced3c128f8109c63c85067f4a0cdf9b
This commit is contained in:
@@ -572,7 +572,7 @@ public class AppInfoDashboardFragment extends DashboardFragment
|
||||
showIt = false;
|
||||
} else if (mPackageInfo == null || mDpm.packageHasActiveAdmins(mPackageInfo.packageName)) {
|
||||
showIt = false;
|
||||
} else if (UserHandle.myUserId() != 0) {
|
||||
} else if (!mUserManager.isAdminUser()) {
|
||||
showIt = false;
|
||||
} else if (mUserManager.getUsers().size() < 2) {
|
||||
showIt = false;
|
||||
|
Reference in New Issue
Block a user