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

Commit 934253b9 authored by Chan Kim's avatar Chan Kim Committed by Automerger Merge Worker
Browse files

Merge "Update language to comply with Android's inclusive language guidance"...

Merge "Update language to comply with Android's inclusive language guidance" into main am: a2d740da am: 294b2bfa am: 6fd85b55 am: 74069364 am: 04ccc811

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2717539



Change-Id: I2b066fff49d83147aaef00a939adb41f4097f833
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 8b77302f 04ccc811
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -201,10 +201,10 @@ public abstract class GnssListenerMultiplexer<TRequest, TListener extends IInter
            this::onProviderEnabledChanged;
            this::onProviderEnabledChanged;
    private final SettingsHelper.GlobalSettingChangedListener
    private final SettingsHelper.GlobalSettingChangedListener
            mBackgroundThrottlePackageWhitelistChangedListener =
            mBackgroundThrottlePackageWhitelistChangedListener =
            this::onBackgroundThrottlePackageWhitelistChanged;
            this::onBackgroundThrottlePackageAllowlistChanged;
    private final SettingsHelper.UserSettingChangedListener
    private final SettingsHelper.UserSettingChangedListener
            mLocationPackageBlacklistChangedListener =
            mLocationPackageBlacklistChangedListener =
            this::onLocationPackageBlacklistChanged;
            this::onLocationPackageDenylistChanged;
    private final LocationPermissionsHelper.LocationPermissionsListener
    private final LocationPermissionsHelper.LocationPermissionsListener
            mLocationPermissionsListener =
            mLocationPermissionsListener =
            new LocationPermissionsHelper.LocationPermissionsListener() {
            new LocationPermissionsHelper.LocationPermissionsListener() {
@@ -407,11 +407,11 @@ public abstract class GnssListenerMultiplexer<TRequest, TListener extends IInter
        updateRegistrations(registration -> registration.getIdentity().getUserId() == userId);
        updateRegistrations(registration -> registration.getIdentity().getUserId() == userId);
    }
    }


    private void onBackgroundThrottlePackageWhitelistChanged() {
    private void onBackgroundThrottlePackageAllowlistChanged() {
        updateRegistrations(registration -> true);
        updateRegistrations(registration -> true);
    }
    }


    private void onLocationPackageBlacklistChanged(int userId) {
    private void onLocationPackageDenylistChanged(int userId) {
        updateRegistrations(registration -> registration.getIdentity().getUserId() == userId);
        updateRegistrations(registration -> registration.getIdentity().getUserId() == userId);
    }
    }


+10 −10
Original line number Original line Diff line number Diff line
@@ -93,37 +93,37 @@ public abstract class SettingsHelper {
            GlobalSettingChangedListener listener);
            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);
    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.
     * unspecified thread.
     */
     */
    public abstract void addOnLocationPackageBlacklistChangedListener(
    public abstract void addOnLocationPackageBlacklistChangedListener(
            UserSettingChangedListener listener);
            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(
    public abstract void removeOnLocationPackageBlacklistChangedListener(
            UserSettingChangedListener listener);
            UserSettingChangedListener listener);


    /**
    /**
     * Retrieve the background throttle package whitelist.
     * Retrieve the background throttle package allowlist.
     */
     */
    public abstract Set<String> getBackgroundThrottlePackageWhitelist();
    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.
     * an unspecified thread.
     */
     */
    public abstract void addOnBackgroundThrottlePackageWhitelistChangedListener(
    public abstract void addOnBackgroundThrottlePackageWhitelistChangedListener(
            GlobalSettingChangedListener listener);
            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(
    public abstract void removeOnBackgroundThrottlePackageWhitelistChangedListener(
            GlobalSettingChangedListener listener);
            GlobalSettingChangedListener listener);
@@ -134,14 +134,14 @@ public abstract class SettingsHelper {
    public abstract boolean isGnssMeasurementsFullTrackingEnabled();
    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.
     * an unspecified thread.
     */
     */
    public abstract void addOnGnssMeasurementsFullTrackingEnabledChangedListener(
    public abstract void addOnGnssMeasurementsFullTrackingEnabledChangedListener(
            GlobalSettingChangedListener listener);
            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(
    public abstract void removeOnGnssMeasurementsFullTrackingEnabledChangedListener(
            GlobalSettingChangedListener listener);
            GlobalSettingChangedListener listener);
@@ -166,14 +166,14 @@ public abstract class SettingsHelper {
    public abstract PackageTagsList getIgnoreSettingsAllowlist();
    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.
     * unspecified thread.
     */
     */
    public abstract void addIgnoreSettingsAllowlistChangedListener(
    public abstract void addIgnoreSettingsAllowlistChangedListener(
            GlobalSettingChangedListener listener);
            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(
    public abstract void removeIgnoreSettingsAllowlistChangedListener(
            GlobalSettingChangedListener listener);
            GlobalSettingChangedListener listener);
+4 −4
Original line number Original line Diff line number Diff line
@@ -65,8 +65,8 @@ import java.util.function.Supplier;
 */
 */
public class SystemSettingsHelper extends SettingsHelper {
public class SystemSettingsHelper extends SettingsHelper {


    private static final String LOCATION_PACKAGE_BLACKLIST = "locationPackagePrefixBlacklist";
    private static final String LOCATION_PACKAGE_DENYLIST = "locationPackagePrefixBlacklist";
    private static final String LOCATION_PACKAGE_WHITELIST = "locationPackagePrefixWhitelist";
    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_INTERVAL_MS = 30 * 60 * 1000;
    private static final long DEFAULT_BACKGROUND_THROTTLE_PROXIMITY_ALERT_INTERVAL_MS =
    private static final long DEFAULT_BACKGROUND_THROTTLE_PROXIMITY_ALERT_INTERVAL_MS =
@@ -93,9 +93,9 @@ public class SystemSettingsHelper extends SettingsHelper {
        mGnssMeasurementFullTracking = new BooleanGlobalSetting(context,
        mGnssMeasurementFullTracking = new BooleanGlobalSetting(context,
                ENABLE_GNSS_RAW_MEAS_FULL_TRACKING, FgThread.getHandler());
                ENABLE_GNSS_RAW_MEAS_FULL_TRACKING, FgThread.getHandler());
        mLocationPackageBlacklist = new StringListCachedSecureSetting(context,
        mLocationPackageBlacklist = new StringListCachedSecureSetting(context,
                LOCATION_PACKAGE_BLACKLIST, FgThread.getHandler());
                LOCATION_PACKAGE_DENYLIST, FgThread.getHandler());
        mLocationPackageWhitelist = new StringListCachedSecureSetting(context,
        mLocationPackageWhitelist = new StringListCachedSecureSetting(context,
                LOCATION_PACKAGE_WHITELIST, FgThread.getHandler());
                LOCATION_PACKAGE_ALLOWLIST, FgThread.getHandler());
        mBackgroundThrottlePackageWhitelist = new StringSetCachedGlobalSetting(context,
        mBackgroundThrottlePackageWhitelist = new StringSetCachedGlobalSetting(context,
                LOCATION_BACKGROUND_THROTTLE_PACKAGE_WHITELIST,
                LOCATION_BACKGROUND_THROTTLE_PACKAGE_WHITELIST,
                () -> SystemConfig.getInstance().getAllowUnthrottledLocation(),
                () -> SystemConfig.getInstance().getAllowUnthrottledLocation(),