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:
@@ -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