[Settings] Inclusive language for Data Usage

Change wordings in data usage part into inclusive language.

Bug: 160707804
Test: make RunSettingsRoboTests
Change-Id: I713e52df8201413b884257a51bc1f71a0d43179d
This commit is contained in:
Bonian Chen
2020-07-08 02:47:18 +08:00
parent 0d34f6c80b
commit a5f08854e3
16 changed files with 120 additions and 119 deletions

View File

@@ -186,11 +186,11 @@ public class UnrestrictedDataAccessPreferenceController extends BasePreferenceCo
if (preference instanceof UnrestrictedDataAccessPreference) {
final UnrestrictedDataAccessPreference
accessPreference = (UnrestrictedDataAccessPreference) preference;
boolean whitelisted = newValue == Boolean.TRUE;
logSpecialPermissionChange(whitelisted, accessPreference.getEntry().info.packageName);
mDataSaverBackend.setIsWhitelisted(accessPreference.getEntry().info.uid,
accessPreference.getEntry().info.packageName, whitelisted);
accessPreference.getDataUsageState().isDataSaverWhitelisted = whitelisted;
boolean allowlisted = newValue == Boolean.TRUE;
logSpecialPermissionChange(allowlisted, accessPreference.getEntry().info.packageName);
mDataSaverBackend.setIsAllowlisted(accessPreference.getEntry().info.uid,
accessPreference.getEntry().info.packageName, allowlisted);
accessPreference.getDataUsageState().isDataSaverAllowlisted = allowlisted;
return true;
}
return false;
@@ -224,8 +224,8 @@ public class UnrestrictedDataAccessPreferenceController extends BasePreferenceCo
}
@VisibleForTesting
void logSpecialPermissionChange(boolean whitelisted, String packageName) {
final int logCategory = whitelisted ? SettingsEnums.APP_SPECIAL_PERMISSION_UNL_DATA_ALLOW
void logSpecialPermissionChange(boolean allowlisted, String packageName) {
final int logCategory = allowlisted ? SettingsEnums.APP_SPECIAL_PERMISSION_UNL_DATA_ALLOW
: SettingsEnums.APP_SPECIAL_PERMISSION_UNL_DATA_DENY;
FeatureFactory.getFactory(mContext).getMetricsFeatureProvider().action(mContext,
logCategory, packageName);