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

Commit d34589b2 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: I57654af70b3bc73d1ecd767951cc8b5370c59a8f
parent e1ee1aab
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -31,17 +31,17 @@ import java.io.IOException;
import libcore.io.IoUtils;
import libcore.io.IoUtils;


/**
/**
 * <p>CertBlacklister provides a simple mechanism for updating the platform blacklists for SSL
 * <p>CertBlacklister provides a simple mechanism for updating the platform denylists for SSL
 * certificate public keys and serial numbers.
 * certificate public keys and serial numbers.
 */
 */
public class CertBlacklister extends Binder {
public class CertBlacklister extends Binder {


    private static final String TAG = "CertBlacklister";
    private static final String TAG = "CertBlacklister";


    private static final String BLACKLIST_ROOT = System.getenv("ANDROID_DATA") + "/misc/keychain/";
    private static final String DENYLIST_ROOT = System.getenv("ANDROID_DATA") + "/misc/keychain/";


    public static final String PUBKEY_PATH = BLACKLIST_ROOT + "pubkey_blacklist.txt";
    public static final String PUBKEY_PATH = DENYLIST_ROOT + "pubkey_blacklist.txt";
    public static final String SERIAL_PATH = BLACKLIST_ROOT + "serial_blacklist.txt";
    public static final String SERIAL_PATH = DENYLIST_ROOT + "serial_blacklist.txt";


    public static final String PUBKEY_BLACKLIST_KEY = "pubkey_blacklist";
    public static final String PUBKEY_BLACKLIST_KEY = "pubkey_blacklist";
    public static final String SERIAL_BLACKLIST_KEY = "serial_blacklist";
    public static final String SERIAL_BLACKLIST_KEY = "serial_blacklist";
@@ -66,14 +66,14 @@ public class CertBlacklister extends Binder {
        @Override
        @Override
        public void onChange(boolean selfChange) {
        public void onChange(boolean selfChange) {
            super.onChange(selfChange);
            super.onChange(selfChange);
            writeBlacklist();
            writeDenylist();
        }
        }


        public String getValue() {
        public String getValue() {
            return Settings.Secure.getString(mContentResolver, mKey);
            return Settings.Secure.getString(mContentResolver, mKey);
        }
        }


        private void writeBlacklist() {
        private void writeDenylist() {
            new Thread("BlacklistUpdater") {
            new Thread("BlacklistUpdater") {
                public void run() {
                public void run() {
                    synchronized(mTmpDir) {
                    synchronized(mTmpDir) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -1941,7 +1941,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
        if (btSCoOn) {
        if (btSCoOn) {
            // Use the SCO device known to BtHelper so that it matches exactly
            // Use the SCO device known to BtHelper so that it matches exactly
            // what has been communicated to audio policy manager. The device
            // what has been communicated to audio policy manager. The device
            // returned by requestedCommunicationDevice() can be a dummy SCO device if legacy
            // returned by requestedCommunicationDevice() can be a placeholder SCO device if legacy
            // APIs are used to start SCO audio.
            // APIs are used to start SCO audio.
            AudioDeviceAttributes device = mBtHelper.getHeadsetAudioDevice();
            AudioDeviceAttributes device = mBtHelper.getHeadsetAudioDevice();
            if (device != null) {
            if (device != null) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -714,7 +714,7 @@ public class SyncManager {
        // This can be noisy, therefore we will allowlist sync adapters installed
        // This can be noisy, therefore we will allowlist sync adapters installed
        // before we started checking for account access because they already know
        // before we started checking for account access because they already know
        // the account (they run before) which is the genie is out of the bottle.
        // the account (they run before) which is the genie is out of the bottle.
        whiteListExistingSyncAdaptersIfNeeded();
        allowListExistingSyncAdaptersIfNeeded();


        mLogger.log("Sync manager initialized: " + Build.FINGERPRINT);
        mLogger.log("Sync manager initialized: " + Build.FINGERPRINT);
    }
    }
@@ -755,7 +755,7 @@ public class SyncManager {
        }
        }
    }
    }


    private void whiteListExistingSyncAdaptersIfNeeded() {
    private void allowListExistingSyncAdaptersIfNeeded() {
        if (!mSyncStorageEngine.shouldGrantSyncAdaptersAccountAccess()) {
        if (!mSyncStorageEngine.shouldGrantSyncAdaptersAccountAccess()) {
            return;
            return;
        }
        }
+5 −5
Original line number Original line Diff line number Diff line
@@ -52,11 +52,11 @@ public class SyncManagerConstants extends ContentObserver {
    private static final int DEF_MAX_RETRIES_WITH_APP_STANDBY_EXEMPTION = 5;
    private static final int DEF_MAX_RETRIES_WITH_APP_STANDBY_EXEMPTION = 5;
    private int mMaxRetriesWithAppStandbyExemption = DEF_MAX_RETRIES_WITH_APP_STANDBY_EXEMPTION;
    private int mMaxRetriesWithAppStandbyExemption = DEF_MAX_RETRIES_WITH_APP_STANDBY_EXEMPTION;


    private static final String KEY_EXEMPTION_TEMP_WHITELIST_DURATION_IN_SECONDS =
    private static final String KEY_EXEMPTION_TEMP_ALLOWLIST_DURATION_IN_SECONDS =
            "exemption_temp_whitelist_duration_in_seconds";
            "exemption_temp_whitelist_duration_in_seconds";
    private static final int DEF_EXEMPTION_TEMP_WHITELIST_DURATION_IN_SECONDS = 10 * 60;
    private static final int DEF_EXEMPTION_TEMP_ALLOWLIST_DURATION_IN_SECONDS = 10 * 60;
    private int mKeyExemptionTempWhitelistDurationInSeconds
    private int mKeyExemptionTempWhitelistDurationInSeconds
            = DEF_EXEMPTION_TEMP_WHITELIST_DURATION_IN_SECONDS;
            = DEF_EXEMPTION_TEMP_ALLOWLIST_DURATION_IN_SECONDS;


    protected SyncManagerConstants(Context context) {
    protected SyncManagerConstants(Context context) {
        super(null);
        super(null);
@@ -105,8 +105,8 @@ public class SyncManagerConstants extends ContentObserver {
                    DEF_MAX_RETRIES_WITH_APP_STANDBY_EXEMPTION);
                    DEF_MAX_RETRIES_WITH_APP_STANDBY_EXEMPTION);


            mKeyExemptionTempWhitelistDurationInSeconds = parser.getInt(
            mKeyExemptionTempWhitelistDurationInSeconds = parser.getInt(
                    KEY_EXEMPTION_TEMP_WHITELIST_DURATION_IN_SECONDS,
                    KEY_EXEMPTION_TEMP_ALLOWLIST_DURATION_IN_SECONDS,
                    DEF_EXEMPTION_TEMP_WHITELIST_DURATION_IN_SECONDS);
                    DEF_EXEMPTION_TEMP_ALLOWLIST_DURATION_IN_SECONDS);


        }
        }
    }
    }
+1 −1
Original line number Original line Diff line number Diff line
@@ -725,7 +725,7 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub {
    }
    }


    private String getCallingRulePusherPackageName(int callingUid) {
    private String getCallingRulePusherPackageName(int callingUid) {
        // Obtain the system apps that are whitelisted in config_integrityRuleProviderPackages.
        // Obtain the system apps that are allowlisted in config_integrityRuleProviderPackages.
        List<String> allowedRuleProviders = getAllowedRuleProviderSystemApps();
        List<String> allowedRuleProviders = getAllowedRuleProviderSystemApps();
        if (DEBUG_INTEGRITY_COMPONENT) {
        if (DEBUG_INTEGRITY_COMPONENT) {
            Slog.i(
            Slog.i(
Loading