Update language to comply with Android's inclusive language guidance

Refactor PowerWhitelistBackend to PowerAllowlistBackend
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: I3d56e6dac1515b49a89f59c34edf403ecb891420
This commit is contained in:
Edgar Wang
2020-08-03 14:02:24 +08:00
parent 867e9db69d
commit f480c1c3fc
16 changed files with 159 additions and 207 deletions

View File

@@ -393,7 +393,7 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
p.setChecked(false);
p.setTitle(app.activityName);
p.setKey(getKeyForPackage(packageName));
p.setSettingsEnabled(hasSettings && app.masterEntry == null);
p.setSettingsEnabled(hasSettings && app.primaryEntry == null);
p.setPersistent(false);
p.setOnPreferenceChangeListener(this);
p.setOnPreferenceClickListener(this);
@@ -407,13 +407,13 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
// able to toggle this app ON (it's ON by default and immutable).
// Only do this for restricted profiles, not single-user restrictions
// Also don't do this for secondary icons
if (app.masterEntry == null) {
if (app.primaryEntry == null) {
requestRestrictionsForApp(packageName, p, false);
}
} else if (!mNewUser && isAppEnabledForUser(pi)) {
p.setChecked(true);
}
if (app.masterEntry != null) {
if (app.primaryEntry != null) {
p.setImmutable(true);
p.setChecked(mHelper.isPackageSelected(packageName));
}
@@ -436,13 +436,13 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
// - Secondary entry that cannot see primary user accounts
// - Primary entry that can see primary user accounts
// Otherwise no summary is returned
if (app.masterEntry != null) {
if (app.primaryEntry != null) {
if (mRestrictedProfile && pi.restrictedAccountType != null) {
return getString(R.string.app_sees_restricted_accounts_and_controlled_by,
app.masterEntry.activityName);
app.primaryEntry.activityName);
}
return getString(R.string.user_restrictions_controlled_by,
app.masterEntry.activityName);
app.primaryEntry.activityName);
} else if (pi.restrictedAccountType != null) {
return getString(R.string.app_sees_restricted_accounts);
}