From 554b6162321afca6a2ee04262505a46adbc63dc3 Mon Sep 17 00:00:00 2001 From: Chan Kim Date: Fri, 18 Aug 2023 22:33:40 +0000 Subject: Update language to comply with Android's inclusive language guidance See https://source.android.com/setup/contribute/respectful-code for reference For this round, the fixes are only applied to the following to minimize breaking dependencies: * comments (excluding javaDoc annotations) * private constants * private functions * parameters within functions BYPASS_INCLUSIVE_LANGUAGE_REASON=Just updating a few select inclusive language violations. No-Typo-Check: Changes focused on inclusive language violations. BUG: 295342157 Change-Id: I2f7b60d0856584d06fa9eaf26ec459d0eac260f6 --- .../location/gnss/GnssListenerMultiplexer.java | 8 ++++---- .../server/location/injector/SettingsHelper.java | 20 ++++++++++---------- .../location/injector/SystemSettingsHelper.java | 8 ++++---- 3 files changed, 18 insertions(+), 18 deletions(-) (limited to 'services') diff --git a/services/core/java/com/android/server/location/gnss/GnssListenerMultiplexer.java b/services/core/java/com/android/server/location/gnss/GnssListenerMultiplexer.java index a54047665aba..ac762f5abe09 100644 --- a/services/core/java/com/android/server/location/gnss/GnssListenerMultiplexer.java +++ b/services/core/java/com/android/server/location/gnss/GnssListenerMultiplexer.java @@ -189,10 +189,10 @@ public abstract class GnssListenerMultiplexer registration.getIdentity().getUserId() == userId); } - private void onBackgroundThrottlePackageWhitelistChanged() { + private void onBackgroundThrottlePackageAllowlistChanged() { updateRegistrations(registration -> true); } - private void onLocationPackageBlacklistChanged(int userId) { + private void onLocationPackageDenylistChanged(int userId) { updateRegistrations(registration -> registration.getIdentity().getUserId() == userId); } diff --git a/services/core/java/com/android/server/location/injector/SettingsHelper.java b/services/core/java/com/android/server/location/injector/SettingsHelper.java index 490bfe1ab82f..32cbff8d50c7 100644 --- a/services/core/java/com/android/server/location/injector/SettingsHelper.java +++ b/services/core/java/com/android/server/location/injector/SettingsHelper.java @@ -93,37 +93,37 @@ public abstract class SettingsHelper { GlobalSettingChangedListener listener); /** - * Check if the given package is blacklisted for location access. + * Check if the given package is denylisted for location access. */ public abstract boolean isLocationPackageBlacklisted(int userId, String packageName); /** - * Add a listener for changes to the location package blacklist. Callbacks occur on an + * Add a listener for changes to the location package denylist. Callbacks occur on an * unspecified thread. */ public abstract void addOnLocationPackageBlacklistChangedListener( UserSettingChangedListener listener); /** - * Remove a listener for changes to the location package blacklist. + * Remove a listener for changes to the location package denylist. */ public abstract void removeOnLocationPackageBlacklistChangedListener( UserSettingChangedListener listener); /** - * Retrieve the background throttle package whitelist. + * Retrieve the background throttle package allowlist. */ public abstract Set getBackgroundThrottlePackageWhitelist(); /** - * Add a listener for changes to the background throttle package whitelist. Callbacks occur on + * Add a listener for changes to the background throttle package allowlist. Callbacks occur on * an unspecified thread. */ public abstract void addOnBackgroundThrottlePackageWhitelistChangedListener( GlobalSettingChangedListener listener); /** - * Remove a listener for changes to the background throttle package whitelist. + * Remove a listener for changes to the background throttle package allowlist. */ public abstract void removeOnBackgroundThrottlePackageWhitelistChangedListener( GlobalSettingChangedListener listener); @@ -134,14 +134,14 @@ public abstract class SettingsHelper { public abstract boolean isGnssMeasurementsFullTrackingEnabled(); /** - * Add a listener for changes to the background throttle package whitelist. Callbacks occur on + * Add a listener for changes to the background throttle package allowlist. Callbacks occur on * an unspecified thread. */ public abstract void addOnGnssMeasurementsFullTrackingEnabledChangedListener( GlobalSettingChangedListener listener); /** - * Remove a listener for changes to the background throttle package whitelist. + * Remove a listener for changes to the background throttle package allowlist. */ public abstract void removeOnGnssMeasurementsFullTrackingEnabledChangedListener( GlobalSettingChangedListener listener); @@ -166,14 +166,14 @@ public abstract class SettingsHelper { public abstract PackageTagsList getIgnoreSettingsAllowlist(); /** - * Add a listener for changes to the ignore settings package whitelist. Callbacks occur on an + * Add a listener for changes to the ignore settings package allowlist. Callbacks occur on an * unspecified thread. */ public abstract void addIgnoreSettingsAllowlistChangedListener( GlobalSettingChangedListener listener); /** - * Remove a listener for changes to the ignore settings package whitelist. + * Remove a listener for changes to the ignore settings package allowlist. */ public abstract void removeIgnoreSettingsAllowlistChangedListener( GlobalSettingChangedListener listener); diff --git a/services/core/java/com/android/server/location/injector/SystemSettingsHelper.java b/services/core/java/com/android/server/location/injector/SystemSettingsHelper.java index 777683ef59cf..8bb184c43ebb 100644 --- a/services/core/java/com/android/server/location/injector/SystemSettingsHelper.java +++ b/services/core/java/com/android/server/location/injector/SystemSettingsHelper.java @@ -65,8 +65,8 @@ import java.util.function.Supplier; */ public class SystemSettingsHelper extends SettingsHelper { - private static final String LOCATION_PACKAGE_BLACKLIST = "locationPackagePrefixBlacklist"; - private static final String LOCATION_PACKAGE_WHITELIST = "locationPackagePrefixWhitelist"; + private static final String LOCATION_PACKAGE_DENYLIST = "locationPackagePrefixBlacklist"; + private static final String LOCATION_PACKAGE_ALLOWLIST = "locationPackagePrefixWhitelist"; private static final long DEFAULT_BACKGROUND_THROTTLE_INTERVAL_MS = 30 * 60 * 1000; private static final long DEFAULT_BACKGROUND_THROTTLE_PROXIMITY_ALERT_INTERVAL_MS = @@ -93,9 +93,9 @@ public class SystemSettingsHelper extends SettingsHelper { mGnssMeasurementFullTracking = new BooleanGlobalSetting(context, ENABLE_GNSS_RAW_MEAS_FULL_TRACKING, FgThread.getHandler()); mLocationPackageBlacklist = new StringListCachedSecureSetting(context, - LOCATION_PACKAGE_BLACKLIST, FgThread.getHandler()); + LOCATION_PACKAGE_DENYLIST, FgThread.getHandler()); mLocationPackageWhitelist = new StringListCachedSecureSetting(context, - LOCATION_PACKAGE_WHITELIST, FgThread.getHandler()); + LOCATION_PACKAGE_ALLOWLIST, FgThread.getHandler()); mBackgroundThrottlePackageWhitelist = new StringSetCachedGlobalSetting(context, LOCATION_BACKGROUND_THROTTLE_PACKAGE_WHITELIST, () -> SystemConfig.getInstance().getAllowUnthrottledLocation(), -- cgit v1.2.3-59-g8ed1b