Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference Bug: 161896447 Test: robotest & manual Change-Id: Ia8625091a107fc3fb652d3ba3f75ea3cc1a8d9f5
This commit is contained in:
@@ -1474,8 +1474,8 @@
|
||||
<item>@string/enhanced_4g_lte_mode_summary_4g_calling</item>
|
||||
</string-array>
|
||||
|
||||
<!-- A whitelist which packages won't show summary in battery usage screen. [CHAR LIMIT=NONE] -->
|
||||
<string-array name="whitelist_hide_summary_in_battery_usage" translatable="false">
|
||||
<!-- An allowlist which packages won't show summary in battery usage screen. [CHAR LIMIT=NONE] -->
|
||||
<string-array name="allowlist_hide_summary_in_battery_usage" translatable="false">
|
||||
<!-- Google -->
|
||||
<item>"com.google.android.googlequicksearchbox"</item>
|
||||
</string-array>
|
||||
|
@@ -152,8 +152,8 @@
|
||||
-->
|
||||
</string-array>
|
||||
|
||||
<!-- List of packages that should be whitelisted for slice uri access. Do not translate -->
|
||||
<string-array name="slice_whitelist_package_names" translatable="false"/>
|
||||
<!-- List of packages that should be allowlisted for slice uri access. Do not translate -->
|
||||
<string-array name="slice_allowlist_package_names" translatable="false"/>
|
||||
|
||||
<!-- Whether or not App & Notification screen should display recently used apps -->
|
||||
<bool name="config_display_recent_apps">true</bool>
|
||||
|
@@ -1418,9 +1418,6 @@
|
||||
<!-- Error shown when in PIN mode and PIN has been used recently. Please keep this string short! -->
|
||||
<string name="lockpassword_pin_recently_used">Device admin doesn\'t allow using a recent PIN</string>
|
||||
|
||||
<!-- Error shown when a user is choosing a PIN for their work phone, but what they suggest is blocked by their company's IT administrator. The user should try another PIN that's less common and more complicated. -->
|
||||
<string name="lockpassword_pin_blacklisted_by_admin">Common PINs are blocked by your IT admin. Try a different PIN.</string>
|
||||
|
||||
<!-- Error shown when in PASSWORD mode and user enters an invalid character -->
|
||||
<string name="lockpassword_illegal_character">This can\'t include an invalid character</string>
|
||||
|
||||
@@ -1478,9 +1475,6 @@
|
||||
<string name="lockpassword_password_recently_used">Device admin doesn\'t allow using a recent
|
||||
password</string>
|
||||
|
||||
<!-- Error shown when a user is choosing a PASSWORD for their work phone, but what they suggest is blocked by their company's IT administrator. The user should try another PASSWORD that's less common and more complicated. -->
|
||||
<string name="lockpassword_password_blacklisted_by_admin">Common passwords are blocked by your IT admin. Try a different password.</string>
|
||||
|
||||
<!-- [CHAR_LIMIT=NONE] Error shown when the user tries to set an ascending or descending sequence of digits -->
|
||||
<string name="lockpassword_pin_no_sequential_digits">Ascending, descending, or repeated sequence
|
||||
of digits isn\'t allowed</string>
|
||||
@@ -5533,8 +5527,8 @@
|
||||
<string name="background_activity_summary">Allow the app to run in the background</string>
|
||||
<!-- Summary for the background activity when it is disabled [CHAR_LIMIT=120] -->
|
||||
<string name="background_activity_summary_disabled">App not allowed to run in background</string>
|
||||
<!-- TODO: Pending UX review. Summary for the background activity when it is whitlisted [CHAR_LIMIT=120] -->
|
||||
<string name="background_activity_summary_whitelisted">Background usage can\u2019t be restricted</string>
|
||||
<!-- TODO: Pending UX review. Summary for the background activity when it is allowlisted [CHAR_LIMIT=120] -->
|
||||
<string name="background_activity_summary_allowlisted">Background usage can\u2019t be restricted</string>
|
||||
<!-- TODO: Pending UX review. Title for the warning dialog to show to the user when limiting background activity for an app -->
|
||||
<string name="background_activity_warning_dialog_title">Limit background activity?</string>
|
||||
<!-- TODO: Pending UX review. Text for the warning dialog to show to the user when limiting background activity for an app -->
|
||||
@@ -10505,8 +10499,8 @@
|
||||
<!-- Button that leads to list of apps with unrestricted data access [CHAR LIMIT=60] -->
|
||||
<string name="unrestricted_data_saver">Unrestricted data</string>
|
||||
|
||||
<!-- Description of message shown when app is blacklisted for background data access [CHAR LIMIT=NONE] -->
|
||||
<string name="restrict_background_blacklisted">Background data is turned off</string>
|
||||
<!-- Description of message shown when app is blocklisted for background data access [CHAR LIMIT=NONE] -->
|
||||
<string name="restrict_background_blocklisted">Background data is turned off</string>
|
||||
|
||||
<!-- Summary for the Data Saver feature being on [CHAR LIMIT=NONE] -->
|
||||
<string name="data_saver_on">On</string>
|
||||
|
@@ -159,7 +159,7 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide
|
||||
keepEnabledPackages.add(euicc.packageName);
|
||||
}
|
||||
|
||||
keepEnabledPackages.addAll(getEnabledPackageWhitelist());
|
||||
keepEnabledPackages.addAll(getEnabledPackageAllowlist());
|
||||
|
||||
final LocationManager locationManager =
|
||||
(LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE);
|
||||
@@ -170,7 +170,7 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide
|
||||
return keepEnabledPackages;
|
||||
}
|
||||
|
||||
private Set<String> getEnabledPackageWhitelist() {
|
||||
private Set<String> getEnabledPackageAllowlist() {
|
||||
final Set<String> keepEnabledPackages = new ArraySet<>();
|
||||
|
||||
// Keep Settings intelligence enabled, otherwise search feature will be disabled.
|
||||
|
@@ -142,7 +142,7 @@ public class InteractAcrossProfilesDetails extends AppInfoBase
|
||||
}
|
||||
|
||||
private void logNonConfigurableAppMetrics() {
|
||||
if (!isCrossProfilePackageWhitelisted(mPackageName)) {
|
||||
if (!isCrossProfilePackageAllowlisted(mPackageName)) {
|
||||
logEvent(DevicePolicyEnums.CROSS_PROFILE_SETTINGS_PAGE_ADMIN_RESTRICTED);
|
||||
return;
|
||||
}
|
||||
@@ -382,7 +382,7 @@ public class InteractAcrossProfilesDetails extends AppInfoBase
|
||||
private boolean refreshUiForNonConfigurableApps() {
|
||||
mSwitchPref.setChecked(false);
|
||||
mSwitchPref.setTitle(R.string.interact_across_profiles_switch_disabled);
|
||||
if (!isCrossProfilePackageWhitelisted(mPackageName)) {
|
||||
if (!isCrossProfilePackageAllowlisted(mPackageName)) {
|
||||
mInstallBanner.setVisible(false);
|
||||
mSwitchPref.setDisabledByAdmin(RestrictedLockUtils.getProfileOrDeviceOwner(
|
||||
mContext, mWorkProfile));
|
||||
@@ -417,7 +417,7 @@ public class InteractAcrossProfilesDetails extends AppInfoBase
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isCrossProfilePackageWhitelisted(String packageName) {
|
||||
private boolean isCrossProfilePackageAllowlisted(String packageName) {
|
||||
return mContext.getSystemService(DevicePolicyManager.class)
|
||||
.getAllCrossProfilePackages().contains(packageName);
|
||||
}
|
||||
|
@@ -76,14 +76,14 @@ public class BugReportHandlerUtil {
|
||||
int handlerUser = getCustomBugReportHandlerUser(context);
|
||||
|
||||
boolean needToResetOutdatedSettings = false;
|
||||
if (!isBugreportWhitelistedApp(handlerApp)) {
|
||||
if (!isBugreportAllowlistedApp(handlerApp)) {
|
||||
handlerApp = getDefaultBugReportHandlerApp(context);
|
||||
handlerUser = UserHandle.USER_SYSTEM;
|
||||
} else if (getBugReportHandlerAppReceivers(context, handlerApp, handlerUser).isEmpty()) {
|
||||
// It looks like the settings are outdated, need to reset outdated settings.
|
||||
//
|
||||
// i.e.
|
||||
// If user chooses which profile and which bugreport-whitelisted app in that
|
||||
// If user chooses which profile and which bugreport-allowlisted app in that
|
||||
// profile to handle a bugreport, then user remove the profile.
|
||||
// === RESULT ===
|
||||
// The chosen bugreport handler app is outdated because the profile is removed,
|
||||
@@ -93,7 +93,7 @@ public class BugReportHandlerUtil {
|
||||
needToResetOutdatedSettings = true;
|
||||
}
|
||||
|
||||
if (!isBugreportWhitelistedApp(handlerApp)
|
||||
if (!isBugreportAllowlistedApp(handlerApp)
|
||||
|| getBugReportHandlerAppReceivers(context, handlerApp, handlerUser).isEmpty()) {
|
||||
// It looks like current handler app may be too old and doesn't support to handle a
|
||||
// bugreport, so change to let shell to handle a bugreport and need to reset
|
||||
@@ -136,7 +136,7 @@ public class BugReportHandlerUtil {
|
||||
*/
|
||||
public boolean setCurrentBugReportHandlerAppAndUser(Context context, String handlerApp,
|
||||
int handlerUser) {
|
||||
if (!isBugreportWhitelistedApp(handlerApp)) {
|
||||
if (!isBugreportAllowlistedApp(handlerApp)) {
|
||||
return false;
|
||||
} else if (getBugReportHandlerAppReceivers(context, handlerApp, handlerUser).isEmpty()) {
|
||||
return false;
|
||||
@@ -155,17 +155,17 @@ public class BugReportHandlerUtil {
|
||||
public List<Pair<ApplicationInfo, Integer>> getValidBugReportHandlerInfos(Context context) {
|
||||
final List<Pair<ApplicationInfo, Integer>> validBugReportHandlerApplicationInfos =
|
||||
new ArrayList<>();
|
||||
List<String> bugreportWhitelistedPackages;
|
||||
List<String> bugreportAllowlistedPackages;
|
||||
try {
|
||||
bugreportWhitelistedPackages =
|
||||
bugreportAllowlistedPackages =
|
||||
ActivityManager.getService().getBugreportWhitelistedPackages();
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Failed to get bugreportWhitelistedPackages:", e);
|
||||
Log.e(TAG, "Failed to get bugreportAllowlistedPackages:", e);
|
||||
return validBugReportHandlerApplicationInfos;
|
||||
}
|
||||
|
||||
// Add "Shell with system user" as System default preference on top of screen
|
||||
if (bugreportWhitelistedPackages.contains(SHELL_APP_PACKAGE)
|
||||
if (bugreportAllowlistedPackages.contains(SHELL_APP_PACKAGE)
|
||||
&& !getBugReportHandlerAppReceivers(context, SHELL_APP_PACKAGE,
|
||||
UserHandle.USER_SYSTEM).isEmpty()) {
|
||||
try {
|
||||
@@ -181,7 +181,7 @@ public class BugReportHandlerUtil {
|
||||
final UserManager userManager = context.getSystemService(UserManager.class);
|
||||
final List<UserInfo> profileList = userManager.getProfiles(UserHandle.getCallingUserId());
|
||||
// Only add non-Shell app as normal preference
|
||||
final List<String> nonShellPackageList = bugreportWhitelistedPackages.stream()
|
||||
final List<String> nonShellPackageList = bugreportAllowlistedPackages.stream()
|
||||
.filter(pkg -> !SHELL_APP_PACKAGE.equals(pkg)).collect(Collectors.toList());
|
||||
Collections.sort(nonShellPackageList);
|
||||
for (String pkg : nonShellPackageList) {
|
||||
@@ -202,15 +202,15 @@ public class BugReportHandlerUtil {
|
||||
return validBugReportHandlerApplicationInfos;
|
||||
}
|
||||
|
||||
private boolean isBugreportWhitelistedApp(String app) {
|
||||
// Verify the app is bugreport-whitelisted
|
||||
private boolean isBugreportAllowlistedApp(String app) {
|
||||
// Verify the app is bugreport-allowlisted
|
||||
if (TextUtils.isEmpty(app)) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
return ActivityManager.getService().getBugreportWhitelistedPackages().contains(app);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Failed to get bugreportWhitelistedPackages:", e);
|
||||
Log.e(TAG, "Failed to get bugreportAllowlistedPackages:", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ public class SettingsBaseActivity extends FragmentActivity {
|
||||
|
||||
// Serves as a temporary list of tiles to ignore until we heard back from the PM that they
|
||||
// are disabled.
|
||||
private static ArraySet<ComponentName> sTileBlacklist = new ArraySet<>();
|
||||
private static ArraySet<ComponentName> sTileDenylist = new ArraySet<>();
|
||||
|
||||
private final PackageReceiver mPackageReceiver = new PackageReceiver();
|
||||
private final List<CategoryListener> mCategoryListeners = new ArrayList<>();
|
||||
@@ -177,9 +177,9 @@ public class SettingsBaseActivity extends FragmentActivity {
|
||||
boolean isEnabled = state == PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
|
||||
if (isEnabled != enabled || state == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) {
|
||||
if (enabled) {
|
||||
sTileBlacklist.remove(component);
|
||||
sTileDenylist.remove(component);
|
||||
} else {
|
||||
sTileBlacklist.add(component);
|
||||
sTileDenylist.add(component);
|
||||
}
|
||||
pm.setComponentEnabledSetting(component, enabled
|
||||
? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
|
||||
@@ -217,7 +217,7 @@ public class SettingsBaseActivity extends FragmentActivity {
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Void result) {
|
||||
mCategoryManager.updateCategoryFromBlacklist(sTileBlacklist);
|
||||
mCategoryManager.updateCategoryFromDenylist(sTileDenylist);
|
||||
onCategoriesChanged();
|
||||
}
|
||||
}
|
||||
|
@@ -85,15 +85,19 @@ public class CategoryManager {
|
||||
tryInitCategories(context, forceClearCache);
|
||||
}
|
||||
|
||||
public synchronized void updateCategoryFromBlacklist(Set<ComponentName> tileBlacklist) {
|
||||
/**
|
||||
* Update category from deny list
|
||||
* @param tileDenylist
|
||||
*/
|
||||
public synchronized void updateCategoryFromDenylist(Set<ComponentName> tileDenylist) {
|
||||
if (mCategories == null) {
|
||||
Log.w(TAG, "Category is null, skipping blacklist update");
|
||||
Log.w(TAG, "Category is null, skipping denylist update");
|
||||
}
|
||||
for (int i = 0; i < mCategories.size(); i++) {
|
||||
DashboardCategory category = mCategories.get(i);
|
||||
for (int j = 0; j < category.getTilesCount(); j++) {
|
||||
Tile tile = category.getTile(j);
|
||||
if (tileBlacklist.contains(tile.getIntent().getComponent())) {
|
||||
if (tileDenylist.contains(tile.getIntent().getComponent())) {
|
||||
category.removeTile(j--);
|
||||
}
|
||||
}
|
||||
|
@@ -175,7 +175,7 @@ public class UnrestrictedDataAccessPreference extends AppSwitchPreference implem
|
||||
if (isDisabledByAdmin()) {
|
||||
setSummary(R.string.disabled_by_admin);
|
||||
} else if (mDataUsageState.isDataSaverDenylisted) {
|
||||
setSummary(R.string.restrict_background_blacklisted);
|
||||
setSummary(R.string.restrict_background_blocklisted);
|
||||
} else {
|
||||
setSummary("");
|
||||
}
|
||||
|
@@ -118,7 +118,7 @@ public class BackgroundActivityPreferenceController extends AbstractPreferenceCo
|
||||
|
||||
public void updateSummary(Preference preference) {
|
||||
if (mPowerAllowlistBackend.isAllowlisted(mTargetPackage)) {
|
||||
preference.setSummary(R.string.background_activity_summary_whitelisted);
|
||||
preference.setSummary(R.string.background_activity_summary_allowlisted);
|
||||
return;
|
||||
}
|
||||
final int mode = mAppOpsManager
|
||||
|
@@ -391,11 +391,11 @@ public class BatteryAppListPreferenceController extends AbstractPreferenceContro
|
||||
}
|
||||
|
||||
private boolean shouldShowSummary(BatterySipper sipper) {
|
||||
final CharSequence[] whitelistPackages = mContext.getResources()
|
||||
.getTextArray(R.array.whitelist_hide_summary_in_battery_usage);
|
||||
final CharSequence[] allowlistPackages = mContext.getResources()
|
||||
.getTextArray(R.array.allowlist_hide_summary_in_battery_usage);
|
||||
final String target = sipper.packageWithHighestDrain;
|
||||
|
||||
for (CharSequence packageName: whitelistPackages) {
|
||||
for (CharSequence packageName: allowlistPackages) {
|
||||
if (TextUtils.equals(target, packageName)) {
|
||||
return false;
|
||||
}
|
||||
|
@@ -306,7 +306,7 @@ public class PanelFragment extends Fragment {
|
||||
* Watching for the {@link Slice} to load.
|
||||
* <p>
|
||||
* If the Slice comes back {@code null} or with the Error attribute, if slice
|
||||
* uri is not in the whitelist, remove the Slice data from the list, otherwise
|
||||
* uri is not in the allowlist, remove the Slice data from the list, otherwise
|
||||
* keep the Slice data.
|
||||
* <p>
|
||||
* If the Slice has come back fully loaded, then mark the Slice as loaded. No
|
||||
@@ -337,10 +337,10 @@ public class PanelFragment extends Fragment {
|
||||
}
|
||||
|
||||
private void removeSliceLiveData(Uri uri) {
|
||||
final List<String> whiteList = Arrays.asList(
|
||||
final List<String> allowList = Arrays.asList(
|
||||
getResources().getStringArray(
|
||||
R.array.config_panel_keep_observe_uri));
|
||||
if (!whiteList.contains(uri.toString())) {
|
||||
if (!allowList.contains(uri.toString())) {
|
||||
mSliceLiveData.remove(uri);
|
||||
}
|
||||
}
|
||||
|
@@ -45,13 +45,13 @@ public class SearchFeatureProviderImpl implements SearchFeatureProvider {
|
||||
final String packageName = caller.getPackageName();
|
||||
final boolean isSettingsPackage = TextUtils.equals(packageName, context.getPackageName())
|
||||
|| TextUtils.equals(getSettingsIntelligencePkgName(context), packageName);
|
||||
final boolean isWhitelistedPackage =
|
||||
final boolean isAllowlistedPackage =
|
||||
isSignatureAllowlisted(context, caller.getPackageName());
|
||||
if (isSettingsPackage || isWhitelistedPackage) {
|
||||
if (isSettingsPackage || isAllowlistedPackage) {
|
||||
return;
|
||||
}
|
||||
throw new SecurityException("Search result intents must be called with from a "
|
||||
+ "whitelisted package.");
|
||||
+ "allowlisted package.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -328,7 +328,7 @@ public class SettingsSliceProvider extends SliceProvider {
|
||||
.collect(Collectors.toList());
|
||||
descendants.addAll(customSlices);
|
||||
}
|
||||
grantWhitelistedPackagePermissions(getContext(), descendants);
|
||||
grantAllowlistedPackagePermissions(getContext(), descendants);
|
||||
return descendants;
|
||||
}
|
||||
|
||||
@@ -344,23 +344,23 @@ public class SettingsSliceProvider extends SliceProvider {
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static void grantWhitelistedPackagePermissions(Context context, List<Uri> descendants) {
|
||||
static void grantAllowlistedPackagePermissions(Context context, List<Uri> descendants) {
|
||||
if (descendants == null) {
|
||||
Log.d(TAG, "No descendants to grant permission with, skipping.");
|
||||
}
|
||||
final String[] whitelistPackages =
|
||||
context.getResources().getStringArray(R.array.slice_whitelist_package_names);
|
||||
if (whitelistPackages == null || whitelistPackages.length == 0) {
|
||||
Log.d(TAG, "No packages to whitelist, skipping.");
|
||||
final String[] allowlistPackages =
|
||||
context.getResources().getStringArray(R.array.slice_allowlist_package_names);
|
||||
if (allowlistPackages == null || allowlistPackages.length == 0) {
|
||||
Log.d(TAG, "No packages to allowlist, skipping.");
|
||||
return;
|
||||
} else {
|
||||
Log.d(TAG, String.format(
|
||||
"Whitelisting %d uris to %d pkgs.",
|
||||
descendants.size(), whitelistPackages.length));
|
||||
"Allowlisting %d uris to %d pkgs.",
|
||||
descendants.size(), allowlistPackages.length));
|
||||
}
|
||||
final SliceManager sliceManager = context.getSystemService(SliceManager.class);
|
||||
for (Uri descendant : descendants) {
|
||||
for (String toPackage : whitelistPackages) {
|
||||
for (String toPackage : allowlistPackages) {
|
||||
sliceManager.grantSlicePermission(toPackage, descendant);
|
||||
}
|
||||
}
|
||||
|
@@ -167,7 +167,7 @@ public class AppDialogFragment extends InstrumentedDialogFragment implements App
|
||||
try {
|
||||
if (mPackageInfo.packageName.equals(VpnUtils.getConnectedPackage(mService, userId))) {
|
||||
mService.setAlwaysOnVpnPackage(userId, null, /* lockdownEnabled */ false,
|
||||
/* lockdownWhitelist */ null);
|
||||
/* lockdownAllowlist */ null);
|
||||
mService.prepareVpn(mPackageInfo.packageName, VpnConfig.LEGACY_VPN, userId);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
|
@@ -231,7 +231,7 @@ public class AppManagementFragment extends SettingsPreferenceFragment
|
||||
|
||||
private boolean setAlwaysOnVpn(boolean isEnabled, boolean isLockdown) {
|
||||
return mConnectivityManager.setAlwaysOnVpnPackageForUser(mUserId,
|
||||
isEnabled ? mPackageName : null, isLockdown, /* lockdownWhitelist */ null);
|
||||
isEnabled ? mPackageName : null, isLockdown, /* lockdownAllowlist */ null);
|
||||
}
|
||||
|
||||
private void updateUI() {
|
||||
|
@@ -180,7 +180,7 @@ public class ConfigDialogFragment extends InstrumentedDialogFragment implements
|
||||
|
||||
final ConnectivityManager conn = ConnectivityManager.from(mContext);
|
||||
conn.setAlwaysOnVpnPackageForUser(UserHandle.myUserId(), null,
|
||||
/* lockdownEnabled */ false, /* lockdownWhitelist */ null);
|
||||
/* lockdownEnabled */ false, /* lockdownAllowlist */ null);
|
||||
VpnUtils.setLockdownVpn(mContext, profile.key);
|
||||
} else {
|
||||
// update only if lockdown vpn has been changed
|
||||
|
@@ -15,6 +15,6 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<!-- List of packages that should be whitelisted for slice uri access. Do not translate -->
|
||||
<string-array name="slice_whitelist_package_names" translatable="false"/>
|
||||
<!-- List of packages that should be allowlisted for slice uri access. Do not translate -->
|
||||
<string-array name="slice_allowlist_package_names" translatable="false"/>
|
||||
</resources>
|
||||
|
@@ -81,9 +81,9 @@
|
||||
<item>fake_package/fake_service</item>
|
||||
</string-array>
|
||||
|
||||
<!-- List of packages that should be whitelisted for slice uri access. Do not translate -->
|
||||
<string-array name="slice_whitelist_package_names" translatable="false">
|
||||
<item>com.android.settings.slice_whitelist_package</item>
|
||||
<!-- List of packages that should be allowlisted for slice uri access. Do not translate -->
|
||||
<string-array name="slice_allowlist_package_names" translatable="false">
|
||||
<item>com.android.settings.slice_allowlist_package</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Email address for the homepage contextual cards feedback -->
|
||||
|
@@ -329,9 +329,9 @@ public final class ApplicationFeatureProviderImplTest {
|
||||
|
||||
ReflectionHelpers.setField(mProvider, "mContext", spyContext);
|
||||
|
||||
final Set<String> whitelist = mProvider.getKeepEnabledPackages();
|
||||
final Set<String> allowlist = mProvider.getKeepEnabledPackages();
|
||||
|
||||
assertThat(whitelist).contains("com.android.settings.intelligence");
|
||||
assertThat(allowlist).contains("com.android.settings.intelligence");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -351,9 +351,9 @@ public final class ApplicationFeatureProviderImplTest {
|
||||
|
||||
ReflectionHelpers.setField(mProvider, "mContext", spyContext);
|
||||
|
||||
final Set<String> whitelist = mProvider.getKeepEnabledPackages();
|
||||
final Set<String> allowlist = mProvider.getKeepEnabledPackages();
|
||||
|
||||
assertThat(whitelist).contains("com.android.packageinstaller");
|
||||
assertThat(allowlist).contains("com.android.packageinstaller");
|
||||
}
|
||||
|
||||
private void setUpUsersAndInstalledApps() {
|
||||
|
@@ -93,7 +93,7 @@ public class SpecialAppAccessPreferenceControllerTest {
|
||||
entry.hasLauncherEntry = true;
|
||||
entry.info = new ApplicationInfo();
|
||||
entry.extraInfo = new AppStateDataUsageBridge.DataUsageState(
|
||||
true /* whitelisted */, false /* blacklisted */);
|
||||
true /* allowlisted */, false /* denylisted */);
|
||||
apps.add(entry);
|
||||
when(mSession.getAllApps()).thenReturn(apps);
|
||||
|
||||
|
@@ -596,8 +596,8 @@ public class ManageApplicationsTest {
|
||||
mFragment.onItemSelected(null, null, 0, 0);
|
||||
|
||||
AppFilter filter = ReflectionHelpers.getField(adapter, "mCompositeFilter");
|
||||
assertThat(filter.filterApp(createPowerWhiteListApp(false))).isFalse();
|
||||
assertThat(filter.filterApp(createPowerWhiteListApp(true))).isTrue();
|
||||
assertThat(filter.filterApp(createPowerAllowListApp(false))).isFalse();
|
||||
assertThat(filter.filterApp(createPowerAllowListApp(true))).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -615,8 +615,8 @@ public class ManageApplicationsTest {
|
||||
mFragment.onItemSelected(null, null, 1, 0);
|
||||
|
||||
AppFilter filter = ReflectionHelpers.getField(adapter, "mCompositeFilter");
|
||||
assertThat(filter.filterApp(createPowerWhiteListApp(false))).isTrue();
|
||||
assertThat(filter.filterApp(createPowerWhiteListApp(true))).isTrue();
|
||||
assertThat(filter.filterApp(createPowerAllowListApp(false))).isTrue();
|
||||
assertThat(filter.filterApp(createPowerAllowListApp(true))).isTrue();
|
||||
}
|
||||
|
||||
private void setUpOptionMenus() {
|
||||
@@ -646,11 +646,11 @@ public class ManageApplicationsTest {
|
||||
return appList;
|
||||
}
|
||||
|
||||
private AppEntry createPowerWhiteListApp(boolean isPowerWhiteListed) {
|
||||
private AppEntry createPowerAllowListApp(boolean isPowerAllowListed) {
|
||||
final ApplicationInfo info = new ApplicationInfo();
|
||||
info.sourceDir = "abc";
|
||||
final AppEntry entry = new AppEntry(mContext, info, 0);
|
||||
entry.extraInfo = isPowerWhiteListed ? Boolean.TRUE : Boolean.FALSE;
|
||||
entry.extraInfo = isPowerAllowListed ? Boolean.TRUE : Boolean.FALSE;
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ import java.util.Set;
|
||||
public class XmlControllerAttributeTest {
|
||||
|
||||
// List of XML that could be retrieved from the illegalClasses list.
|
||||
private final List<Integer> whitelistXml = Arrays.asList(R.xml.security_dashboard_settings);
|
||||
private final List<Integer> mAllowlistXml = Arrays.asList(R.xml.security_dashboard_settings);
|
||||
|
||||
private static final String NO_VALID_CONSTRUCTOR_ERROR =
|
||||
"Controllers added in XML need a constructor following either:"
|
||||
@@ -62,7 +62,7 @@ public class XmlControllerAttributeTest {
|
||||
@Test
|
||||
public void testAllIndexableXML_onlyValidBasePreferenceControllersAdded() throws Exception {
|
||||
Set<Integer> xmlSet = getIndexableXml();
|
||||
xmlSet.addAll(whitelistXml);
|
||||
xmlSet.addAll(mAllowlistXml);
|
||||
|
||||
List<String> xmlControllers = new ArrayList<>();
|
||||
Set<String> invalidConstructors = new HashSet<>();
|
||||
|
@@ -53,11 +53,11 @@ public class InstrumentableFragmentCodeInspector extends CodeInspector {
|
||||
}
|
||||
final String className = clazz.getName();
|
||||
// If it's a fragment, it must also be instrumentable.
|
||||
final boolean whitelisted =
|
||||
final boolean allowlisted =
|
||||
mNotImplementingInstrumentableExemptList.remove(className);
|
||||
if (Fragment.class.isAssignableFrom(clazz)
|
||||
&& !Instrumentable.class.isAssignableFrom(clazz)
|
||||
&& !whitelisted) {
|
||||
&& !allowlisted) {
|
||||
broken.add(className);
|
||||
}
|
||||
}
|
||||
|
@@ -155,7 +155,7 @@ public class BackgroundActivityPreferenceControllerTest {
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.isEnabled()).isFalse();
|
||||
assertThat(mPreference.getSummary()).isEqualTo(
|
||||
mShadowContext.getText(R.string.background_activity_summary_whitelisted));
|
||||
mShadowContext.getText(R.string.background_activity_summary_allowlisted));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -206,7 +206,7 @@ public class NotificationPreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsBlockable_oemWhitelist() {
|
||||
public void testIsBlockable_oemAllowlist() {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
NotificationChannel channel = mock(NotificationChannel.class);
|
||||
when(channel.isImportanceLockedByOEM()).thenReturn(true);
|
||||
|
@@ -625,25 +625,25 @@ public class SettingsSliceProviderTest {
|
||||
|
||||
@Test
|
||||
@Config(qualifiers = "mcc998")
|
||||
public void grantWhitelistedPackagePermissions_noWhitelist_shouldNotGrant() {
|
||||
public void grantAllowlistedPackagePermissions_noAllowlist_shouldNotGrant() {
|
||||
final List<Uri> uris = new ArrayList<>();
|
||||
uris.add(Uri.parse("content://settings/slice"));
|
||||
|
||||
SettingsSliceProvider.grantWhitelistedPackagePermissions(mContext, uris);
|
||||
SettingsSliceProvider.grantAllowlistedPackagePermissions(mContext, uris);
|
||||
|
||||
verify(mManager, never()).grantSlicePermission(anyString(), any(Uri.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(qualifiers = "mcc999")
|
||||
public void grantWhitelistedPackagePermissions_hasPackageWhitelist_shouldGrant() {
|
||||
public void grantAllowlistedPackagePermissions_hasPackageAllowlist_shouldGrant() {
|
||||
final List<Uri> uris = new ArrayList<>();
|
||||
uris.add(Uri.parse("content://settings/slice"));
|
||||
|
||||
SettingsSliceProvider.grantWhitelistedPackagePermissions(mContext, uris);
|
||||
SettingsSliceProvider.grantAllowlistedPackagePermissions(mContext, uris);
|
||||
|
||||
verify(mManager)
|
||||
.grantSlicePermission("com.android.settings.slice_whitelist_package", uris.get(0));
|
||||
.grantSlicePermission("com.android.settings.slice_allowlist_package", uris.get(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -111,12 +111,12 @@ public class SliceControllerInXmlCodeInspector extends CodeInspector {
|
||||
}
|
||||
|
||||
if (!mXmlDeclaredControllers.contains(clazz.getName())) {
|
||||
// Class clazz should have been declared in XML (unless whitelisted).
|
||||
// Class clazz should have been declared in XML (unless allowlisted).
|
||||
missingControllersInXml.add(clazz.getName());
|
||||
}
|
||||
}
|
||||
|
||||
// Removed whitelisted classes
|
||||
// Removed allowlisted classes
|
||||
missingControllersInXml.removeAll(mExemptedClasses);
|
||||
|
||||
final String missingControllerError =
|
||||
|
@@ -21,6 +21,7 @@ import static android.content.pm.PackageManager.GET_META_DATA;
|
||||
import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS;
|
||||
|
||||
import static com.android.settings.SettingsActivity.META_DATA_KEY_FRAGMENT_CLASS;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static junit.framework.Assert.fail;
|
||||
@@ -88,11 +89,11 @@ public class SettingsGatewayTest {
|
||||
@Presubmit
|
||||
public void publicFragmentMustAppearInSettingsGateway()
|
||||
throws PackageManager.NameNotFoundException {
|
||||
final List<String> whitelistedFragment = new ArrayList<>();
|
||||
final List<String> allowlistedFragment = new ArrayList<>();
|
||||
final StringBuilder error = new StringBuilder();
|
||||
|
||||
for (String fragment : SettingsGateway.ENTRY_FRAGMENTS) {
|
||||
whitelistedFragment.add(fragment);
|
||||
allowlistedFragment.add(fragment);
|
||||
}
|
||||
final PackageInfo pi = mPackageManager.getPackageInfo(mPackageName,
|
||||
GET_META_DATA | MATCH_DISABLED_COMPONENTS | GET_ACTIVITIES);
|
||||
@@ -106,7 +107,7 @@ public class SettingsGatewayTest {
|
||||
final String fragmentName = metaData.getString(META_DATA_KEY_FRAGMENT_CLASS);
|
||||
|
||||
assertThat(fragmentName).isNotNull();
|
||||
if (!whitelistedFragment.contains(fragmentName)) {
|
||||
if (!allowlistedFragment.contains(fragmentName)) {
|
||||
error.append("SettingsGateway.ENTRY_FRAGMENTS must contain " + fragmentName
|
||||
+ " because this fragment is used in manifest for " + activity.name)
|
||||
.append("\n");
|
||||
|
@@ -56,7 +56,7 @@ public class UniquePreferenceTest {
|
||||
private static final List<String> IGNORE_PREF_TYPES = Arrays.asList(
|
||||
"com.android.settingslib.widget.FooterPreference");
|
||||
|
||||
private static final List<String> WHITELISTED_DUPLICATE_KEYS = Arrays.asList(
|
||||
private static final List<String> ALLOWLISTED_DUPLICATE_KEYS = Arrays.asList(
|
||||
"owner_info_settings", // Lock screen message in security - multiple xml files
|
||||
// contain this because security page is constructed by
|
||||
// combining small xml chunks. Eventually the page
|
||||
@@ -185,7 +185,7 @@ public class UniquePreferenceTest {
|
||||
nullKeyClasses.add(className);
|
||||
continue;
|
||||
}
|
||||
if (uniqueKeys.contains(key) && !WHITELISTED_DUPLICATE_KEYS.contains(key)) {
|
||||
if (uniqueKeys.contains(key) && !ALLOWLISTED_DUPLICATE_KEYS.contains(key)) {
|
||||
Log.e(TAG, "Every preference key must unique; found "
|
||||
+ " in " + className
|
||||
+ " / " + key);
|
||||
@@ -209,7 +209,7 @@ public class UniquePreferenceTest {
|
||||
nullKeyClasses.add(className);
|
||||
continue;
|
||||
}
|
||||
if (uniqueKeys.contains(raw.key) && !WHITELISTED_DUPLICATE_KEYS.contains(raw.key)) {
|
||||
if (uniqueKeys.contains(raw.key) && !ALLOWLISTED_DUPLICATE_KEYS.contains(raw.key)) {
|
||||
Log.e(TAG, "Every SearchIndexableRaw key must unique; found " + raw.key
|
||||
+ " in " + className);
|
||||
duplicatedKeys.add(raw.key);
|
||||
|
Reference in New Issue
Block a user