Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 554b6162 authored by Chan Kim's avatar Chan Kim
Browse files

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
parent e1ee1aab
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -189,10 +189,10 @@ public abstract class GnssListenerMultiplexer<TRequest, TListener extends IInter
            this::onProviderEnabledChanged;
    private final SettingsHelper.GlobalSettingChangedListener
            mBackgroundThrottlePackageWhitelistChangedListener =
            this::onBackgroundThrottlePackageWhitelistChanged;
            this::onBackgroundThrottlePackageAllowlistChanged;
    private final SettingsHelper.UserSettingChangedListener
            mLocationPackageBlacklistChangedListener =
            this::onLocationPackageBlacklistChanged;
            this::onLocationPackageDenylistChanged;
    private final LocationPermissionsHelper.LocationPermissionsListener
            mLocationPermissionsListener =
            new LocationPermissionsHelper.LocationPermissionsListener() {
@@ -382,11 +382,11 @@ public abstract class GnssListenerMultiplexer<TRequest, TListener extends IInter
        updateRegistrations(registration -> 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);
    }

+10 −10
Original line number Diff line number Diff line
@@ -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<String> 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);
+4 −4
Original line number Diff line number Diff line
@@ -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(),