diff options
author | Jeff Sharkey <jsharkey@android.com> | 2020-09-11 15:10:20 -0600 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2020-09-14 10:00:10 -0600 |
commit | 4172f8a62ccacb752c5de165ee305f7223a6e423 (patch) | |
tree | f5b3f6cdc8d864ecd3ed63921de418b4a5f3595f | |
parent | a8cec413b65bfc3ea23575b34eb983c20944491b (diff) |
Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference
Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: If75259aab72329f9f8b0e1972a96370ca5134e2c
43 files changed, 172 insertions, 172 deletions
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java index d7a3a32f102a..060d0971e391 100644 --- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java @@ -1001,7 +1001,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku Slog.i(TAG, "hasBindAppWidgetPermission() " + UserHandle.getCallingUserId()); } - // A special permission is required for managing white listing. + // A special permission is required for managing allowlisting. mSecurityPolicy.enforceModifyAppWidgetBindPermissions(packageName); synchronized (mLock) { @@ -1025,7 +1025,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku Slog.i(TAG, "setBindAppWidgetPermission() " + UserHandle.getCallingUserId()); } - // A special permission is required for managing white listing. + // A special permission is required for managing allowlisting. mSecurityPolicy.enforceModifyAppWidgetBindPermissions(packageName); synchronized (mLock) { @@ -1117,7 +1117,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku } // If the provider is not under the calling user, make sure this - // provider is white listed for access from the parent. + // provider is allowlisted for access from the parent. if (!mSecurityPolicy.isProviderInCallerOrInProfileAndWhitelListed( providerComponent.getPackageName(), providerProfileId)) { return false; @@ -1126,7 +1126,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku synchronized (mLock) { ensureGroupStateLoadedLocked(userId); - // A special permission or white listing is required to bind widgets. + // A special permission or allowlisting is required to bind widgets. if (!mSecurityPolicy.hasCallerBindPermissionOrBindWhiteListedLocked( callingPackage)) { return false; @@ -1741,7 +1741,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku continue; } - // Add providers only for the requested profile that are white-listed. + // Add providers only for the requested profile that are allowlisted. final int providerProfileId = info.getProfile().getIdentifier(); if (providerProfileId == profileId && mSecurityPolicy.isProviderInCallerOrInProfileAndWhitelListed( @@ -3576,7 +3576,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku @Override public void onCrossProfileWidgetProvidersChanged(int userId, List<String> packages) { final int parentId = mSecurityPolicy.getProfileParent(userId); - // We care only if the white-listed package is in a profile of + // We care only if the allowlisted package is in a profile of // the group parent as only the parent can add widgets from the // profile and not the other way around. if (parentId != userId) { @@ -3600,7 +3600,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku userId, null); } - // Remove widgets from hosts in parent user for packages not in the whitelist + // Remove widgets from hosts in parent user for packages not in the allowlist final int removedCount = previousPackages.size(); for (int i = 0; i < removedCount; ++i) { removeWidgetsForPackageLocked(previousPackages.valueAt(i), diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java index 57ffe0498a88..d59c955de889 100644 --- a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java +++ b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java @@ -313,7 +313,7 @@ final class AutofillManagerServiceImpl @NonNull ComponentName componentName, boolean compatMode, boolean bindInstantServiceAllowed, int flags) { // FLAG_AUGMENTED_AUTOFILL_REQUEST is set in the flags when standard autofill is disabled - // but the package is whitelisted for augmented autofill + // but the package is allowlisted for augmented autofill boolean forAugmentedAutofillOnly = (flags & FLAG_ADD_CLIENT_ENABLED_FOR_AUGMENTED_AUTOFILL_ONLY) != 0; if (!isEnabledLocked() && !forAugmentedAutofillOnly) { @@ -322,7 +322,7 @@ final class AutofillManagerServiceImpl if (!forAugmentedAutofillOnly && isAutofillDisabledLocked(componentName)) { // Standard autofill is enabled, but service disabled autofill for this activity; that - // means no session, unless the activity is whitelisted for augmented autofill + // means no session, unless the activity is allowlisted for augmented autofill if (isWhitelistedForAugmentedAutofillLocked(componentName)) { if (sDebug) { Slog.d(TAG, "startSession(" + componentName + "): disabled by service but " @@ -1379,7 +1379,7 @@ final class AutofillManagerServiceImpl } /** - * Resets the augmented autofill whitelist. + * Resets the augmented autofill allowlist. */ @GuardedBy("mLock") void resetAugmentedAutofillWhitelistLocked() { diff --git a/services/backup/backuplib/java/com/android/server/backup/TransportManager.java b/services/backup/backuplib/java/com/android/server/backup/TransportManager.java index 30ce4cf2fd3f..9cf7b428f29f 100644 --- a/services/backup/backuplib/java/com/android/server/backup/TransportManager.java +++ b/services/backup/backuplib/java/com/android/server/backup/TransportManager.java @@ -173,7 +173,7 @@ public class TransportManager { } } - /** Returns a set with the whitelisted transports. */ + /** Returns a set with the allowlisted transports. */ Set<ComponentName> getTransportWhitelist() { return mTransportWhitelist; } @@ -590,7 +590,7 @@ public class TransportManager { } } - /** Transport has to be whitelisted and privileged. */ + /** Transport has to be allowlisted and privileged. */ private boolean isTransportTrusted(ComponentName transport) { if (!mTransportWhitelist.contains(transport)) { Slog.w( diff --git a/services/backup/backuplib/java/com/android/server/backup/transport/TransportClient.java b/services/backup/backuplib/java/com/android/server/backup/transport/TransportClient.java index ca89f7f69fbc..0eb3ea3e1bc8 100644 --- a/services/backup/backuplib/java/com/android/server/backup/transport/TransportClient.java +++ b/services/backup/backuplib/java/com/android/server/backup/transport/TransportClient.java @@ -664,7 +664,7 @@ public class TransportClient { return; } // TODO (b/147705255): Remove when binder calls to IBackupTransport are not blocking - // In short-term, blocking calls are OK as the transports come from the whitelist at + // In short-term, blocking calls are OK as the transports come from the allowlist at // {@link SystemConfig#getBackupTransportWhitelist()} Binder.allowBlocking(binder); transportClient.onServiceConnected(binder); diff --git a/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java b/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java index ea94ad0b3c20..a153265ed228 100644 --- a/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java +++ b/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java @@ -885,11 +885,11 @@ public final class ContentCaptureManagerService extends synchronized (mGlobalWhitelistStateLock) { packageWhitelisted = isWhitelisted(userId, packageName); if (!packageWhitelisted) { - // Full package is not whitelisted: check individual components first + // Full package is not allowlisted: check individual components first whitelistedComponents = getWhitelistedComponents(userId, packageName); if (whitelistedComponents == null && packageName.equals(mServicePackages.get(userId))) { - // No components whitelisted either, but let it go because it's the + // No components allowlisted either, but let it go because it's the // service's own package if (verbose) Slog.v(TAG, "getOptionsForPackage() lite for " + packageName); return new ContentCaptureOptions(mDevCfgLoggingLevel); @@ -897,7 +897,7 @@ public final class ContentCaptureManagerService extends } } // synchronized - // Restrict what temporary services can whitelist + // Restrict what temporary services can allowlist if (Build.IS_USER && mServiceNameResolver.isTemporary(userId)) { if (!packageName.equals(mServicePackages.get(userId))) { Slog.w(TAG, "Ignoring package " + packageName + " while using temporary " diff --git a/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java b/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java index 9486b0d39bc2..9075b78495e4 100644 --- a/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java +++ b/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java @@ -571,7 +571,7 @@ final class ContentCapturePerUserService } /** - * Resets the content capture whitelist. + * Resets the content capture allowlist. */ @GuardedBy("mLock") private void resetContentCaptureWhitelistLocked() { @@ -598,7 +598,7 @@ final class ContentCapturePerUserService mMaster.mGlobalContentCaptureOptions.setWhitelist(mUserId, packages, activities); writeSetWhitelistEvent(getServiceComponentName(), packages, activities); - // Must disable session that are not the whitelist anymore... + // Must disable session that are not the allowlist anymore... final int numSessions = mSessions.size(); if (numSessions <= 0) return; diff --git a/services/core/java/com/android/server/CertBlacklister.java b/services/core/java/com/android/server/CertBlacklister.java index 8b167d7b0c90..c16378be7342 100644 --- a/services/core/java/com/android/server/CertBlacklister.java +++ b/services/core/java/com/android/server/CertBlacklister.java @@ -125,14 +125,14 @@ public class CertBlacklister extends Binder { } private void registerObservers(ContentResolver cr) { - // set up the public key blacklist observer + // set up the public key denylist observer cr.registerContentObserver( Settings.Secure.getUriFor(PUBKEY_BLACKLIST_KEY), true, buildPubkeyObserver(cr) ); - // set up the serial number blacklist observer + // set up the serial number denylist observer cr.registerContentObserver( Settings.Secure.getUriFor(SERIAL_BLACKLIST_KEY), true, diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index bd590d317910..8ec78e011408 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -6219,7 +6219,7 @@ public class ConnectivityService extends IConnectivityManager.Stub final int vpnAppUid = nai.networkCapabilities.getOwnerUid(); // TODO: this create a window of opportunity for apps to receive traffic between the time // when the old rules are removed and the time when new rules are added. To fix this, - // make eBPF support two whitelisted interfaces so here new rules can be added before the + // make eBPF support two allowlisted interfaces so here new rules can be added before the // old rules are being removed. if (wasFiltering) { mPermissionMonitor.onVpnUidRangesRemoved(oldIface, ranges, vpnAppUid); diff --git a/services/core/java/com/android/server/am/BugReportHandlerUtil.java b/services/core/java/com/android/server/am/BugReportHandlerUtil.java index 0a0d8d85f5c3..2142ebc7ee8e 100644 --- a/services/core/java/com/android/server/am/BugReportHandlerUtil.java +++ b/services/core/java/com/android/server/am/BugReportHandlerUtil.java @@ -63,7 +63,7 @@ public final class BugReportHandlerUtil { } /** - * Launches a bugreport-whitelisted app to handle a bugreport. + * Launches a bugreport-allowlisted app to handle a bugreport. * * <p>Allows a bug report handler app to take bugreports on the user's behalf. The handler can * be predefined in the config, meant to be launched with the primary user. The user can @@ -71,7 +71,7 @@ public final class BugReportHandlerUtil { * useful for capturing bug reports from work profile, for instance. * * @param context Context - * @return true if there is a bugreport-whitelisted app to handle a bugreport, or false + * @return true if there is a bugreport-allowlisted app to handle a bugreport, or false * otherwise */ static boolean launchBugReportHandlerApp(Context context) { @@ -92,7 +92,7 @@ public final class BugReportHandlerUtil { // It looks like the settings are outdated, reset outdated settings. // // i.e. - // If user chooses which profile and which bugreport-whitelisted app in that + // If user chooses which profile and which bugreport-allowlisted app in that // profile to handle a bugreport, then user remove the profile. // === RESULT === // The chosen bugreport handler app is outdated because the profile is removed, @@ -184,7 +184,7 @@ public final class BugReportHandlerUtil { } private static boolean isBugreportWhitelistedApp(String app) { - // Verify the app is bugreport-whitelisted + // Verify the app is bugreport-allowlisted final ArraySet<String> whitelistedApps = SystemConfig.getInstance() .getBugreportWhitelistedPackages(); return whitelistedApps.contains(app); diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java index da5f48962130..14ba4afe497a 100644 --- a/services/core/java/com/android/server/am/OomAdjuster.java +++ b/services/core/java/com/android/server/am/OomAdjuster.java @@ -906,8 +906,8 @@ public final class OomAdjuster { + " to " + uidRec.curWhitelist); if (ActivityManager.isProcStateBackground(uidRec.getCurProcState()) && !uidRec.curWhitelist) { - // UID is now in the background (and not on the temp whitelist). Was it - // previously in the foreground (or on the temp whitelist)? + // UID is now in the background (and not on the temp allowlist). Was it + // previously in the foreground (or on the temp allowlist)? if (!ActivityManager.isProcStateBackground(uidRec.setProcState) || uidRec.setWhitelist) { uidRec.lastBackgroundTime = nowElapsed; diff --git a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java index bac7565adfa5..60e59e389cf0 100644 --- a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java +++ b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java @@ -237,7 +237,7 @@ public class SettingsToPropertiesMapper { SystemProperties.set(key, value); } catch (Exception e) { // Failure to set a property can be caused by SELinux denial. This usually indicates - // that the property wasn't whitelisted in sepolicy. + // that the property wasn't allowlisted in sepolicy. // No need to report it on all user devices, only on debug builds. log("Unable to set property " + key + " value '" + value + "'", e); } diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java index 041bedc3c575..6735da8be6c4 100644 --- a/services/core/java/com/android/server/content/SyncManager.java +++ b/services/core/java/com/android/server/content/SyncManager.java @@ -728,7 +728,7 @@ public class SyncManager { // Sync adapters were able to access the synced account without the accounts // permission which circumvents our permission model. Therefore, we require // sync adapters that don't have access to the account to get user consent. - // This can be noisy, therefore we will white-list 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 // the account (they run before) which is the genie is out of the bottle. whiteListExistingSyncAdaptersIfNeeded(); diff --git a/services/core/java/com/android/server/contentcapture/ContentCaptureManagerInternal.java b/services/core/java/com/android/server/contentcapture/ContentCaptureManagerInternal.java index ad04b7d10433..c33b5f1cb58c 100644 --- a/services/core/java/com/android/server/contentcapture/ContentCaptureManagerInternal.java +++ b/services/core/java/com/android/server/contentcapture/ContentCaptureManagerInternal.java @@ -48,7 +48,7 @@ public abstract class ContentCaptureManagerInternal { /** * Gets the content capture options for the given user and package, or {@code null} if the - * package is not whitelisted by the service. + * package is not allowlisted by the service. * * <p><b>NOTE: </b>this method is called by the {@code ActivityManager} service and hence cannot * hold the main service lock. diff --git a/services/core/java/com/android/server/display/DisplayModeDirector.java b/services/core/java/com/android/server/display/DisplayModeDirector.java index 3c050804f01d..144c27d4699e 100644 --- a/services/core/java/com/android/server/display/DisplayModeDirector.java +++ b/services/core/java/com/android/server/display/DisplayModeDirector.java @@ -700,7 +700,7 @@ public class DisplayModeDirector { // Application can specify preferred refresh rate with below attrs. // @see android.view.WindowManager.LayoutParams#preferredRefreshRate // @see android.view.WindowManager.LayoutParams#preferredDisplayModeId - // System also forces some apps like blacklisted app to run at a lower refresh rate. + // System also forces some apps like denylisted app to run at a lower refresh rate. // @see android.R.array#config_highRefreshRateBlacklist public static final int PRIORITY_APP_REQUEST_REFRESH_RATE = 3; public static final int PRIORITY_APP_REQUEST_SIZE = 4; diff --git a/services/core/java/com/android/server/location/gnss/GnssConfiguration.java b/services/core/java/com/android/server/location/gnss/GnssConfiguration.java index 14ab79e7ecde..890f51b44ace 100644 --- a/services/core/java/com/android/server/location/gnss/GnssConfiguration.java +++ b/services/core/java/com/android/server/location/gnss/GnssConfiguration.java @@ -200,7 +200,7 @@ class GnssConfiguration { } /** - * Updates the GNSS HAL satellite blacklist. + * Updates the GNSS HAL satellite denylist. */ void setSatelliteBlacklist(int[] constellations, int[] svids) { native_set_satellite_blacklist(constellations, svids); diff --git a/services/core/java/com/android/server/location/gnss/GnssSatelliteBlacklistHelper.java b/services/core/java/com/android/server/location/gnss/GnssSatelliteBlacklistHelper.java index dccef9b9a9c4..426ce8c2c258 100644 --- a/services/core/java/com/android/server/location/gnss/GnssSatelliteBlacklistHelper.java +++ b/services/core/java/com/android/server/location/gnss/GnssSatelliteBlacklistHelper.java @@ -31,7 +31,7 @@ import java.util.ArrayList; import java.util.List; /** - * Detects blacklist change and updates the blacklist. + * Detects denylist change and updates the denylist. */ class GnssSatelliteBlacklistHelper { diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerInternal.java b/services/core/java/com/android/server/net/NetworkPolicyManagerInternal.java index 48f1ddb023fd..407cedf38917 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerInternal.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerInternal.java @@ -72,11 +72,11 @@ public abstract class NetworkPolicyManagerInternal { } /** - * Informs that an appId has been added or removed from the temp-powersave-whitelist so that + * Informs that an appId has been added or removed from the temp-powersave-allowlist so that * that network rules for that appId can be updated. * - * @param appId The appId which has been updated in the whitelist. - * @param added Denotes whether the {@param appId} has been added or removed from the whitelist. + * @param appId The appId which has been updated in the allowlist. + * @param added Denotes whether the {@param appId} has been added or removed from the allowlist. */ public abstract void onTempPowerSaveWhitelistChange(int appId, boolean added); @@ -107,7 +107,7 @@ public abstract class NetworkPolicyManagerInternal { public abstract void onAdminDataAvailable(); /** - * Control if a UID should be whitelisted even if it's in app idle mode. Other restrictions may + * Control if a UID should be allowlisted even if it's in app idle mode. Other restrictions may * still be in effect. */ public abstract void setAppIdleWhitelist(int uid, boolean shouldWhitelist); diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java index 29ee8eb13564..2d7e79a7073c 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java @@ -478,7 +478,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { // and "battery saver" are not equivalent. /** - * UIDs that have been white-listed to always be able to have network access + * UIDs that have been allowlisted to always be able to have network access * in power save mode, except device idle (doze) still applies. * TODO: An int array might be sufficient */ @@ -486,7 +486,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { private final SparseBooleanArray mPowerSaveWhitelistExceptIdleAppIds = new SparseBooleanArray(); /** - * UIDs that have been white-listed to always be able to have network access + * UIDs that have been allowlisted to always be able to have network access * in power save mode. * TODO: An int array might be sufficient */ @@ -497,21 +497,21 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { private final SparseBooleanArray mPowerSaveTempWhitelistAppIds = new SparseBooleanArray(); /** - * UIDs that have been white-listed temporarily to be able to have network access despite being + * UIDs that have been allowlisted temporarily to be able to have network access despite being * idle. Other power saving restrictions still apply. */ @GuardedBy("mUidRulesFirstLock") private final SparseBooleanArray mAppIdleTempWhitelistAppIds = new SparseBooleanArray(); /** - * UIDs that have been initially white-listed by system to avoid restricted background. + * UIDs that have been initially allowlisted by system to avoid restricted background. */ @GuardedBy("mUidRulesFirstLock") private final SparseBooleanArray mDefaultRestrictBackgroundAllowlistUids = new SparseBooleanArray(); /** - * UIDs that have been initially white-listed by system to avoid restricted background, + * UIDs that have been initially allowlisted by system to avoid restricted background, * but later revoked by user. */ @GuardedBy("mUidRulesFirstLock") @@ -819,7 +819,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { // ignored; both services live in system_server } - // listen for changes to power save whitelist + // listen for changes to power save allowlist final IntentFilter whitelistFilter = new IntentFilter( PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED); mContext.registerReceiver(mPowerSaveWhitelistReceiver, whitelistFilter, null, mHandler); @@ -3775,7 +3775,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { } // NOTE: since both fw_dozable and fw_powersave uses the same map - // (mPowerSaveTempWhitelistAppIds) for whitelisting, we can reuse their logic in this method. + // (mPowerSaveTempWhitelistAppIds) for allowlisting, we can reuse their logic in this method. @GuardedBy("mUidRulesFirstLock") private void updateRulesForWhitelistedPowerSaveUL(boolean enabled, int chain, SparseIntArray rules) { @@ -3817,12 +3817,12 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { } /** - * Returns whether a uid is whitelisted from power saving restrictions (eg: Battery Saver, Doze + * Returns whether a uid is allowlisted from power saving restrictions (eg: Battery Saver, Doze * mode, and app idle). * * @param deviceIdleMode if true then we don't consider * {@link #mPowerSaveWhitelistExceptIdleAppIds} for checking if the {@param uid} is - * whitelisted. + * allowlisted. */ @GuardedBy("mUidRulesFirstLock") private boolean isWhitelistedFromPowerSaveUL(int uid, boolean deviceIdleMode) { @@ -3836,7 +3836,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { } // NOTE: since both fw_dozable and fw_powersave uses the same map - // (mPowerSaveTempWhitelistAppIds) for whitelisting, we can reuse their logic in this method. + // (mPowerSaveTempWhitelistAppIds) for allowlisting, we can reuse their logic in this method. @GuardedBy("mUidRulesFirstLock") private void updateRulesForWhitelistedPowerSaveUL(int uid, boolean enabled, int chain) { if (enabled) { @@ -4095,7 +4095,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { } /** - * Set whether or not an app should be whitelisted for network access while in app idle. Other + * Set whether or not an app should be allowlisted for network access while in app idle. Other * power saving restrictions may still apply. */ @VisibleForTesting @@ -4124,7 +4124,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { } } - /** Return the list of UIDs currently in the app idle whitelist. */ + /** Return the list of UIDs currently in the app idle allowlist. */ @VisibleForTesting int[] getAppIdleWhitelist() { mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG); @@ -4144,7 +4144,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { boolean isUidIdle(int uid) { synchronized (mUidRulesFirstLock) { if (mAppIdleTempWhitelistAppIds.get(uid)) { - // UID is temporarily whitelisted. + // UID is temporarily allowlisted. return false; } } diff --git a/services/core/java/com/android/server/pm/BackgroundDexOptService.java b/services/core/java/com/android/server/pm/BackgroundDexOptService.java index 5415967c3bdc..0dfa081e7695 100644 --- a/services/core/java/com/android/server/pm/BackgroundDexOptService.java +++ b/services/core/java/com/android/server/pm/BackgroundDexOptService.java @@ -461,7 +461,7 @@ public class BackgroundDexOptService extends JobService { } private int reconcileSecondaryDexFiles(DexManager dm) { - // TODO(calin): should we blacklist packages for which we fail to reconcile? + // TODO(calin): should we denylist packages for which we fail to reconcile? for (String p : dm.getAllPackagesWithSecondaryDexFiles()) { if (mAbortIdleOptimization.get()) { return OPTIMIZE_ABORT_BY_JOB_SCHEDULER; diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java index 0d8ba3e54801..53f9e7f9a60d 100644 --- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java +++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java @@ -676,7 +676,7 @@ public class PackageDexOptimizer { int profileFlag = isProfileGuidedFilter ? DEXOPT_PROFILE_GUIDED : 0; // Some apps are executed with restrictions on hidden API usage. If this app is one // of them, pass a flag to dexopt to enable the same restrictions during compilation. - // TODO we should pass the actual flag value to dexopt, rather than assuming blacklist + // TODO we should pass the actual flag value to dexopt, rather than assuming denylist // TODO(b/135203078): This flag is no longer set as part of AndroidPackage // and may not be preserved int hiddenApiFlag = hiddenApiEnforcementPolicy == HIDDEN_API_ENFORCEMENT_DISABLED diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index f6a7cebadceb..afbb12b2b5b8 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -2106,7 +2106,7 @@ public class PackageManagerService extends IPackageManager.Stub res.removedInfo.sendPackageRemovedBroadcasts(killApp); } - // Whitelist any restricted permissions first as some may be runtime + // Allowlist any restricted permissions first as some may be runtime // that the installer requested to be granted at install time. if (whitelistedRestrictedPermissions != null && !whitelistedRestrictedPermissions.isEmpty()) { @@ -10947,7 +10947,7 @@ public class PackageManagerService extends IPackageManager.Stub if (sharedUserSetting != null && sharedUserSetting.isPrivileged()) { // Exempt SharedUsers signed with the platform key. // TODO(b/72378145) Fix this exemption. Force signature apps - // to whitelist their privileged permissions just like other + // to allowlist their privileged permissions just like other // priv-apps. synchronized (mLock) { PackageSetting platformPkgSetting = mSettings.mPackages.get("android"); @@ -17046,7 +17046,7 @@ public class PackageManagerService extends IPackageManager.Stub // Notify BackgroundDexOptService that the package has been changed. // If this is an update of a package which used to fail to compile, - // BackgroundDexOptService will remove it from its blacklist. + // BackgroundDexOptService will remove it from its denylist. // TODO: Layering violation BackgroundDexOptService.notifyPackageChanged(packageName); diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java index c1115e35d701..09682c664eab 100644 --- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java +++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java @@ -2744,7 +2744,7 @@ class PackageManagerShellCommand extends ShellCommand { final InstallParams params = new InstallParams(); params.sessionParams = sessionParams; - // Whitelist all permissions by default + // Allowlist all permissions by default sessionParams.installFlags |= PackageManager.INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS; String opt; diff --git a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java index 14d043c371e2..cf4b456272ef 100644 --- a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java +++ b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java @@ -734,7 +734,7 @@ public class UserRestrictionsUtils { case android.provider.Settings.Secure.ALWAYS_ON_VPN_APP: case android.provider.Settings.Secure.ALWAYS_ON_VPN_LOCKDOWN: case android.provider.Settings.Secure.ALWAYS_ON_VPN_LOCKDOWN_WHITELIST: - // Whitelist system uid (ConnectivityService) and root uid to change always-on vpn + // Allowlist system uid (ConnectivityService) and root uid to change always-on vpn final int appId = UserHandle.getAppId(callingUid); if (appId == Process.SYSTEM_UID || appId == Process.ROOT_UID) { return false; diff --git a/services/core/java/com/android/server/pm/UserSystemPackageInstaller.java b/services/core/java/com/android/server/pm/UserSystemPackageInstaller.java index 492b84a0a84b..55f52a4ea83e 100644 --- a/services/core/java/com/android/server/pm/UserSystemPackageInstaller.java +++ b/services/core/java/com/android/server/pm/UserSystemPackageInstaller.java @@ -49,41 +49,41 @@ import java.util.Set; /** * Responsible for un/installing system packages based on user type. * - * <p>Uses the SystemConfig's install-in-user-type whitelist; + * <p>Uses the SystemConfig's install-in-user-type allowlist; * see {@link SystemConfig#getAndClearPackageToUserTypeWhitelist} and * {@link SystemConfig#getAndClearPackageToUserTypeBlacklist}. * * <p>If {@link #isEnforceMode()} is false, then all system packages are always installed for all * users. The following applies when it is true. * - * <p>Any package can be in one of three states in the {@code SystemConfig} whitelist + * <p>Any package can be in one of three states in the {@code SystemConfig} allowlist * <ol> - * <li>Explicitly blacklisted for a particular user type</li> - * <li>Explicitly whitelisted for a particular user type</li> - * <li>Not mentioned at all, for any user type (neither whitelisted nor blacklisted)</li> + * <li>Explicitly denylisted for a particular user type</li> + * <li>Explicitly allowlisted for a particular user type</li> + * <li>Not mentioned at all, for any user type (neither allowlisted nor denylisted)</li> * </ol> * - * <p>Blacklisting always takes precedence - if a package is blacklisted for a particular user, - * it won't be installed on that type of user (even if it is also whitelisted for that user). - * Next comes whitelisting - if it is whitelisted for a particular user, it will be installed on - * that type of user (as long as it isn't blacklisted). - * Finally, if the package is not mentioned at all (i.e. neither whitelisted nor blacklisted for + * <p>Denylisting always takes precedence - if a package is denylisted for a particular user, + * it won't be installed on that type of user (even if it is also allowlisted for that user). + * Next comes allowlisting - if it is allowlisted for a particular user, it will be installed on + * that type of user (as long as it isn't denylisted). + * Finally, if the package is not mentioned at all (i.e. neither allowlisted nor denylisted for * any user types) in the SystemConfig 'install-in-user-type' lists * then: * <ul> - * <li>If {@link #isImplicitWhitelistMode()}, the package is implicitly treated as whitelisted + * <li>If {@link #isImplicitWhitelistMode()}, the package is implicitly treated as allowlisted * for <b>all</b> users</li> * <li>Otherwise, if {@link #isImplicitWhitelistSystemMode()}, the package is implicitly treated - * as whitelisted for the <b>{@link UserHandle#USER_SYSTEM}</b> user (not other users), + * as allowlisted for the <b>{@link UserHandle#USER_SYSTEM}</b> user (not other users), * which is useful for local development purposes</li> - * <li>Otherwise, the package is implicitly treated as blacklisted for all users</li> + * <li>Otherwise, the package is implicitly treated as denylisted for all users</li> * </ul> * * <p>Packages are only installed/uninstalled by this mechanism when a new user is created or during * an update. In the case of updates:<ul> - * <li>new packages are (un)installed per the whitelist/blacklist</li> - * <li>pre-existing installed blacklisted packages are never uninstalled</li> - * <li>pre-existing not-installed whitelisted packages are only installed if the reason why they + * <li>new packages are (un)installed per the allowlist/denylist</li> + * <li>pre-existing installed denylisted packages are never uninstalled</li> + * <li>pre-existing not-installed allowlisted packages are only installed if the reason why they * had been previously uninstalled was due to UserSystemPackageInstaller</li> * </ul> * @@ -99,14 +99,14 @@ class UserSystemPackageInstaller { private static final boolean DEBUG = false; /** - * System Property whether to only install system packages on a user if they're whitelisted for + * System Property whether to only install system packages on a user if they're allowlisted for * that user type. These are flags and can be freely combined. * <ul> - * <li> 0 - disable whitelist (install all system packages; no logging)</li> - * <li> 1 - enforce (only install system packages if they are whitelisted)</li> - * <li> 2 - log (log non-whitelisted packages)</li> - * <li> 4 - for all users: implicitly whitelist any package not mentioned in the whitelist</li> - * <li> 8 - for SYSTEM: implicitly whitelist any package not mentioned in the whitelist</li> + * <li> 0 - disable allowlist (install all system packages; no logging)</li> + * <li> 1 - enforce (only install system packages if they are allowlisted)</li> + * <li> 2 - log (log non-allowlisted packages)</li> + * <li> 4 - for all users: implicitly allowlist any package not mentioned in the allowlist</li> + * <li> 8 - for SYSTEM: implicitly allowlist any package not mentioned in the allowlist</li> * <li> 16 - ignore OTAs (don't install system packages during OTAs)</li> * <li>-1 - use device default (as defined in res/res/values/config.xml)</li> * </ul> @@ -147,7 +147,7 @@ class UserSystemPackageInstaller { * then mWhitelistedPackagesForUserTypes.get("pkg1") will be a Long whose * bit in position 3 will equal 1. * <p> - * Packages that are whitelisted, but then blacklisted so that they aren't to be installed on + * Packages that are allowlisted, but then denylisted so that they aren't to be installed on * any user, are purposefully still present in this list. */ private final ArrayMap<String, Long> mWhitelistedPackagesForUserTypes; @@ -187,10 +187,10 @@ class UserSystemPackageInstaller { /** * During OTAs and first boot, install/uninstall all system packages for all users based on the - * user's user type and the SystemConfig whitelist. + * user's user type and the SystemConfig allowlist. * We do NOT uninstall packages during an OTA though. * - * This is responsible for enforcing the whitelist for pre-existing users (i.e. USER_SYSTEM); + * This is responsible for enforcing the allowlist for pre-existing users (i.e. USER_SYSTEM); * enforcement for new users is done when they are created in UserManagerService.createUser(). * * @param preExistingPackages list of packages on the device prior to the upgrade. Cannot be @@ -268,7 +268,7 @@ class UserSystemPackageInstaller { } /** - * Checks whether the system packages and the mWhitelistedPackagesForUserTypes whitelist are + * Checks whether the system packages and the mWhitelistedPackagesForUserTypes allowlist are * in 1-to-1 correspondence. */ private void checkWhitelistedSystemPackages(@PackageWhitelistMode int mode) { @@ -277,7 +277,7 @@ class UserSystemPackageInstaller { } Slog.v(TAG, "Checking that all system packages are whitelisted."); - // Check whether all whitelisted packages are indeed on the system. + // Check whether all allowlisted packages are indeed on the system. final List<String> warnings = getPackagesWhitelistWarnings(); final int numberWarnings = warnings.size(); if (numberWarnings == 0) { @@ -291,7 +291,7 @@ class UserSystemPackageInstaller { } } - // Check whether all system packages are indeed whitelisted. + // Check whether all system packages are indeed allowlisted. if (isImplicitWhitelistMode(mode) && !isLogMode(mode)) { return; } @@ -319,7 +319,7 @@ class UserSystemPackageInstaller { } /** - * Gets packages that are listed in the whitelist XML but are not present on the system image. + * Gets packages that are listed in the allowlist XML but are not present on the system image. */ @NonNull private List<String> getPackagesWhitelistWarnings() { @@ -327,7 +327,7 @@ class UserSystemPackageInstaller { final List<String> warnings = new ArrayList<>(); final PackageManagerInternal pmInt = LocalServices.getService(PackageManagerInternal.class); - // Check whether all whitelisted packages are indeed on the system. + // Check whether all allowlisted packages are indeed on the system. final String notPresentFmt = "%s is whitelisted but not present."; final String notSystemFmt = "%s is whitelisted and present but not a system package."; final String overlayPackageFmt = "%s is whitelisted but it's auto-generated RRO package."; @@ -345,7 +345,7 @@ class UserSystemPackageInstaller { } /** - * Gets packages that are not listed in the whitelist XMLs when they should be. + * Gets packages that are not listed in the allowlist XMLs when they should be. */ @NonNull private List<String> getPackagesWhitelistErrors(@PackageWhitelistMode int mode) { @@ -357,7 +357,7 @@ class UserSystemPackageInstaller { final Set<String> allWhitelistedPackages = getWhitelistedSystemPackages(); final PackageManagerInternal pmInt = LocalServices.getService(PackageManagerInternal.class); - // Check whether all system packages are indeed whitelisted. + // Check whether all system packages are indeed allowlisted. final String logMessageFmt = "System package %s is not whitelisted using " + "'install-in-user-type' in SystemConfig for any user types!"; pmInt.forEachPackage(pkg -> { @@ -372,7 +372,7 @@ class UserSystemPackageInstaller { return errors; } - /** Whether to only install system packages in new users for which they are whitelisted. */ + /** Whether to only install system packages in new users for which they are allowlisted. */ boolean isEnforceMode() { return isEnforceMode(getWhitelistMode()); } @@ -383,7 +383,7 @@ class UserSystemPackageInstaller { * If in this mode, old system packages will not be installed on pre-existing users during OTAs. * Any system packages that had not been installed at the time of the user's creation, * due to {@link UserSystemPackageInstaller}'s previous actions, will therefore continue to - * remain uninstalled, even if the whitelist (or enforcement mode) now declares that they should + * remain uninstalled, even if the allowlist (or enforcement mode) now declares that they should * be. */ boolean isIgnoreOtaMode() { @@ -391,23 +391,23 @@ class UserSystemPackageInstaller { } /** - * Whether to log a warning concerning potential problems with the user-type package whitelist. + * Whether to log a warning concerning potential problems with the user-type package allowlist. */ boolean isLogMode() { return isLogMode(getWhitelistMode()); } /** - * Whether to treat all packages that are not mentioned at all in the whitelist to be implicitly - * whitelisted for all users. + * Whether to treat all packages that are not mentioned at all in the allowlist to be implicitly + * allowlisted for all users. */ boolean isImplicitWhitelistMode() { return isImplicitWhitelistMode(getWhitelistMode()); } /** - * Whether to treat all packages that are not mentioned at all in the whitelist to be implicitly - * whitelisted for the SYSTEM user. + * Whether to treat all packages that are not mentioned at all in the allowlist to be implicitly + * allowlisted for the SYSTEM user. */ boolean isImplicitWhitelistSystemMode() { return isImplicitWhitelistSystemMode(getWhitelistMode()); @@ -494,7 +494,7 @@ class UserSystemPackageInstaller { /** * Gets the system package names that should be installed on users of the given user type, as - * determined by SystemConfig, the whitelist mode, and the apps actually on the device. + * determined by SystemConfig, the allowlist mode, and the apps actually on the device. * Names are the {@link PackageParser.Package#packageName}, not necessarily the manifest names. * * Returns null if all system packages should be installed (due to enforce-mode being off). @@ -516,7 +516,7 @@ class UserSystemPackageInstaller { } if (shouldInstallPackage(pkg, mWhitelistedPackagesForUserTypes, whitelistedPackages, implicitlyWhitelist)) { - // Although the whitelist uses manifest names, this function returns packageNames. + // Although the allowlist uses manifest names, this function returns packageNames. installPackages.add(pkg.getPackageName()); } }); @@ -525,7 +525,7 @@ class UserSystemPackageInstaller { /** * Returns whether the given system package should be installed on the given user, based on the - * the given whitelist of system packages. + * the given allowlist of system packages. * * @param sysPkg the system package. Must be a system package; no verification for this is done. * @param userTypeWhitelist map of package manifest names to user types on which they should be @@ -535,7 +535,7 @@ class UserSystemPackageInstaller { * <b>particular</b> user. This must be consistent with userTypeWhitelist, * but is passed in separately to avoid repeatedly calculating it from * userTypeWhitelist. - * @param implicitlyWhitelist whether non-mentioned packages are implicitly whitelisted. + * @param implicitlyWhitelist whether non-mentioned packages are implicitly allowlisted. */ @VisibleForTesting static boolean shouldInstallPackage(AndroidPackage sysPkg, @@ -558,7 +558,7 @@ class UserSystemPackageInstaller { } /** - * Gets the package manifest names that are whitelisted for users of the given user type, + * Gets the package manifest names that are allowlisted for users of the given user type, * as determined by SystemConfig. */ @VisibleForTesting @@ -577,9 +577,9 @@ class UserSystemPackageInstaller { /** * Set of package manifest names that are included anywhere in the package-to-user-type - * whitelist, as determined by SystemConfig. + * allowlist, as determined by SystemConfig. * - * Packages that are whitelisted, but then blacklisted so that they aren't to be installed on + * Packages that are allowlisted, but then denylisted so that they aren't to be installed on * any user, are still present in this list, since that is a valid scenario (e.g. if an OEM * completely blacklists an AOSP app). */ @@ -597,9 +597,9 @@ class UserSystemPackageInstaller { * To enforce this: * <ul> * <li>Illegal user types are ignored.</li> - * <li>Packages that never whitelisted at all (even if they are explicitly blacklisted) are + * <li>Packages that never allowlisted at all (even if they are explicitly denylisted) are * ignored.</li> - * <li>Packages that are blacklisted whenever they are whitelisted will be stored with the + * <li>Packages that are denylisted whenever they are allowlisted will be stored with the * value 0 (since this is a valid scenario, e.g. if an OEM completely blacklists an * AOSP app).</li> * </ul> @@ -615,7 +615,7 @@ class UserSystemPackageInstaller { sysConfig.getAndClearPackageToUserTypeWhitelist(); // result maps packageName -> userTypes on which the package should be installed. final ArrayMap<String, Long> result = new ArrayMap<>(whitelist.size() + 1); - // First, do the whitelisted user types. + // First, do the allowlisted user types. for (int i = 0; i < whitelist.size(); i++) { final String pkgName = whitelist.keyAt(i).intern(); final long typesBitSet = getTypesBitSet(whitelist.valueAt(i), baseTypeBitSets); @@ -623,7 +623,7 @@ class UserSystemPackageInstaller { result.put(pkgName, typesBitSet); } } - // Then, un-whitelist any blacklisted user types. + // Then, un-allowlist any denylisted user types. final ArrayMap<String, Set<String>> blacklist = sysConfig.getAndClearPackageToUserTypeBlacklist(); for (int i = 0; i < blacklist.size(); i++) { @@ -633,7 +633,7 @@ class UserSystemPackageInstaller { if (typesBitSet != null) { result.put(pkgName, typesBitSet & ~nonTypesBitSet); } else if (nonTypesBitSet != 0) { - // Package was never whitelisted but is validly blacklisted. + // Package was never allowlisted but is validly denylisted. result.put(pkgName, 0L); } } diff --git a/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java b/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java index cd53fb9ba52f..8548546ca885 100644 --- a/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java +++ b/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java @@ -1267,10 +1267,10 @@ public final class DefaultPermissionGrantPolicy { continue; } - // Preserve whitelisting flags. + // Preserve allowlisting flags. newFlags |= (flags & PackageManager.FLAGS_PERMISSION_RESTRICTION_ANY_EXEMPT); - // If we are whitelisting the permission, update the exempt flag before grant. + // If we are allowlisting the permission, update the exempt flag before grant. if (whitelistRestrictedPermissions && pm.isPermissionRestricted(permission)) { pm.updatePermissionFlags(permission, pkg, PackageManager.FLAG_PERMISSION_RESTRICTION_SYSTEM_EXEMPT, diff --git a/services/core/java/com/android/server/pm/permission/PermissionManagerServiceInternal.java b/services/core/java/com/android/server/pm/permission/PermissionManagerServiceInternal.java index 2e83b23f57d8..37f40595450d 100644 --- a/services/core/java/com/android/server/pm/permission/PermissionManagerServiceInternal.java +++ b/services/core/java/com/android/server/pm/permission/PermissionManagerServiceInternal.java @@ -187,7 +187,7 @@ public abstract class PermissionManagerServiceInternal extends PermissionManager @NonNull AndroidPackage pkg, @NonNull int[] userIds, @NonNull List<String> permissions, int callingUid, @PackageManager.PermissionWhitelistFlags int whitelistFlags); - /** Sets the whitelisted, restricted permissions for the given package. */ + /** Sets the allowlisted, restricted permissions for the given package. */ public abstract void setWhitelistedRestrictedPermissions( @NonNull String packageName, @NonNull List<String> permissions, @PackageManager.PermissionWhitelistFlags int flags, int userId); diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java index 764ac969e188..691ae233ad22 100644 --- a/services/core/java/com/android/server/power/PowerManagerService.java +++ b/services/core/java/com/android/server/power/PowerManagerService.java @@ -3497,7 +3497,7 @@ public final class PowerManagerService extends SystemService } if (mDeviceIdleMode) { // If we are in idle mode, we will also ignore all partial wake locks that are - // for application uids that are not whitelisted. + // for application uids that are not allowlisted. final UidState state = wakeLock.mUidState; if (Arrays.binarySearch(mDeviceIdleWhitelist, appid) < 0 && Arrays.binarySearch(mDeviceIdleTempWhitelist, appid) < 0 && diff --git a/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java b/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java index f075790a2fa0..ca382c4f3d12 100644 --- a/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java +++ b/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java @@ -1032,7 +1032,7 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub { */ @AnyThread private boolean isRollbackWhitelisted(String packageName) { - // TODO: Remove #isModule when the white list is ready. + // TODO: Remove #isModule when the allowlist is ready. return SystemConfig.getInstance().getRollbackWhitelistedPackages().contains(packageName) || isModule(packageName); } diff --git a/services/core/java/com/android/server/tv/TvRemoteProviderWatcher.java b/services/core/java/com/android/server/tv/TvRemoteProviderWatcher.java index 6e180bc69c5d..68c8eaa5b39b 100644 --- a/services/core/java/com/android/server/tv/TvRemoteProviderWatcher.java +++ b/services/core/java/com/android/server/tv/TvRemoteProviderWatcher.java @@ -173,7 +173,7 @@ final class TvRemoteProviderWatcher { return false; } - // Check if package name is white-listed here. + // Check if package name is allowlisted here. if (!mUnbundledServicePackages.contains(serviceInfo.packageName)) { Slog.w(TAG, "Ignoring atv remote provider service because the package has not " + "been set and/or whitelisted: " diff --git a/services/core/java/com/android/server/tv/TvRemoteService.java b/services/core/java/com/android/server/tv/TvRemoteService.java index 58946456b940..c71cdef6234c 100644 --- a/services/core/java/com/android/server/tv/TvRemoteService.java +++ b/services/core/java/com/android/server/tv/TvRemoteService.java @@ -24,10 +24,10 @@ import com.android.server.Watchdog; /** * TvRemoteService represents a system service that allows a connected - * remote control (emote) service to inject white-listed input events + * remote control (emote) service to inject allowlisted input events * and call other specified methods for functioning as an emote service. * <p/> - * This service is intended for use only by white-listed packages. + * This service is intended for use only by allowlisted packages. */ public class TvRemoteService extends SystemService implements Watchdog.Monitor { private static final String TAG = "TvRemoteService"; diff --git a/services/core/java/com/android/server/wm/HighRefreshRateBlacklist.java b/services/core/java/com/android/server/wm/HighRefreshRateBlacklist.java index d9cf637ffaf8..aac6b2544c4f 100644 --- a/services/core/java/com/android/server/wm/HighRefreshRateBlacklist.java +++ b/services/core/java/com/android/server/wm/HighRefreshRateBlacklist.java @@ -32,7 +32,7 @@ import com.android.server.wm.utils.DeviceConfigInterface; import java.io.PrintWriter; /** - * A Blacklist for packages that should force the display out of high refresh rate. + * A Denylist for packages that should force the display out of high refresh rate. */ class HighRefreshRateBlacklist { @@ -72,7 +72,7 @@ class HighRefreshRateBlacklist { } } else { // If there's no config, or the config has been deleted, fallback to the device's - // default blacklist + // default denylist for (String pkg : mDefaultBlacklist) { mBlacklistedPackages.add(pkg); } diff --git a/services/core/java/com/android/server/wm/RefreshRatePolicy.java b/services/core/java/com/android/server/wm/RefreshRatePolicy.java index 2cb7d5a23647..072116f04aac 100644 --- a/services/core/java/com/android/server/wm/RefreshRatePolicy.java +++ b/services/core/java/com/android/server/wm/RefreshRatePolicy.java @@ -107,7 +107,7 @@ class RefreshRatePolicy { return mLowRefreshRateId; } - // If app is blacklisted using higher refresh rate, return default (lower) refresh rate + // If app is denylisted using higher refresh rate, return default (lower) refresh rate if (mHighRefreshRateBlacklist.isBlacklisted(packageName)) { return mLowRefreshRateId; } diff --git a/services/tests/mockingservicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java b/services/tests/mockingservicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java index e724e60b3ae5..7f86faa4b393 100644 --- a/services/tests/mockingservicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java +++ b/services/tests/mockingservicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java @@ -364,7 +364,7 @@ public class ConnectivityControllerTest { .setAppIdleWhitelist(eq(UID_BLUE), anyBoolean()); assertTrue(controller.isStandbyExceptionRequestedLocked(UID_RED)); assertFalse(controller.isStandbyExceptionRequestedLocked(UID_BLUE)); - // Whitelisting doesn't need to be requested again. + // Allowlisting doesn't need to be requested again. controller.requestStandbyExceptionLocked(red); inOrder.verify(mNetPolicyManagerInternal, never()) .setAppIdleWhitelist(eq(UID_RED), anyBoolean()); @@ -434,7 +434,7 @@ public class ConnectivityControllerTest { .setAppIdleWhitelist(eq(UID_BLUE), anyBoolean()); assertTrue(controller.isStandbyExceptionRequestedLocked(UID_RED)); assertFalse(controller.isStandbyExceptionRequestedLocked(UID_BLUE)); - // Whitelisting doesn't need to be requested again. + // Allowlisting doesn't need to be requested again. controller.evaluateStateLocked(red); inOrder.verify(mNetPolicyManagerInternal, never()) .setAppIdleWhitelist(eq(UID_RED), anyBoolean()); @@ -473,7 +473,7 @@ public class ConnectivityControllerTest { assertFalse(controller.isStandbyExceptionRequestedLocked(UID_RED)); assertFalse(controller.isStandbyExceptionRequestedLocked(UID_BLUE)); - // Test that a currently whitelisted uid is now removed. + // Test that a currently allowlisted uid is now removed. controller.requestStandbyExceptionLocked(blue); inOrder.verify(mNetPolicyManagerInternal, times(1)) .setAppIdleWhitelist(eq(UID_BLUE), eq(true)); diff --git a/services/tests/mockingservicestests/src/com/android/server/job/controllers/QuotaControllerTest.java b/services/tests/mockingservicestests/src/com/android/server/job/controllers/QuotaControllerTest.java index d8874e40a760..1cf133a2bbf2 100644 --- a/services/tests/mockingservicestests/src/com/android/server/job/controllers/QuotaControllerTest.java +++ b/services/tests/mockingservicestests/src/com/android/server/job/controllers/QuotaControllerTest.java @@ -302,7 +302,7 @@ public class QuotaControllerTest { // Make sure tests aren't passing just because the default bucket is likely ACTIVE. js.setStandbyBucket(FREQUENT_INDEX); // Make sure Doze and background-not-restricted don't affect tests. - js.setDeviceNotDozingConstraintSatisfied(/* state */ true, /* whitelisted */false); + js.setDeviceNotDozingConstraintSatisfied(/* state */ true, /* allowlisted */false); js.setBackgroundNotRestrictedConstraintSatisfied(true); return js; } diff --git a/services/tests/servicestests/src/com/android/server/CertBlacklisterTest.java b/services/tests/servicestests/src/com/android/server/CertBlacklisterTest.java index 10b9e7cf1218..90df786e5970 100644 --- a/services/tests/servicestests/src/com/android/server/CertBlacklisterTest.java +++ b/services/tests/servicestests/src/com/android/server/CertBlacklisterTest.java @@ -50,14 +50,14 @@ public class CertBlacklisterTest extends AndroidTestCase { public void testClearBlacklistPubkey() throws Exception { // clear the gservices setting for a clean slate overrideSettings(PUBKEY_KEY, ""); - // read the contents of the pubkey blacklist + // read the contents of the pubkey denylist String blacklist = IoUtils.readFileAsString(PUBKEY_PATH); // Verify that it's empty assertEquals("", blacklist); } public void testSetBlacklistPubkey() throws Exception { - // build a new thing to blacklist + // build a new thing to denylist String badPubkey = "7ccabd7db47e94a5759901b6a7dfd45d1c091ccc"; // add the gservices override overrideSettings(PUBKEY_KEY, badPubkey); @@ -110,14 +110,14 @@ public class CertBlacklisterTest extends AndroidTestCase { public void testClearBlacklistSerial() throws Exception { // clear the gservices setting for a clean slate overrideSettings(SERIAL_KEY, ""); - // read the contents of the pubkey blacklist + // read the contents of the pubkey denylist String blacklist = IoUtils.readFileAsString(SERIAL_PATH); // Verify that it's empty assertEquals("", blacklist); } public void testSetBlacklistSerial() throws Exception { - // build a new thing to blacklist + // build a new thing to denylist String badSerial = "22e514121e61c643b1e9b06bd4b9f7d0"; // add the gservices override overrideSettings(SERIAL_KEY, badSerial); diff --git a/services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java b/services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java index ebbebcb02923..33ea1d6f829e 100644 --- a/services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java +++ b/services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java @@ -81,14 +81,14 @@ public class NetworkManagementInternalTest { mNmi.isNetworkRestrictedForUid(TEST_UID)); mInjector.reset(); - // Data saver is on and uid is not whitelisted + // Data saver is on and uid is not allowlisted mInjector.setDataSaverMode(true); mInjector.setUidOnMeteredNetworkList(false, TEST_UID, false); assertTrue("Should be true since data saver is on and the uid is not whitelisted", mNmi.isNetworkRestrictedForUid(TEST_UID)); mInjector.reset(); - // Data saver is on and uid is whitelisted + // Data saver is on and uid is allowlisted mInjector.setDataSaverMode(true); mInjector.setUidOnMeteredNetworkList(false, TEST_UID, true); assertFalse("Should be false since data saver is on and the uid is whitelisted", diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java index daaabf8141ff..6786f6014f2d 100644 --- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java @@ -5153,7 +5153,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { mContext.binder.callingUid = DpmMockContext.SYSTEM_UID; assertTrue(dpms.isNotificationListenerServicePermitted(packageName, userId)); - // Attempt to set to empty list (which means no listener is whitelisted) + // Attempt to set to empty list (which means no listener is allowlisted) mContext.binder.callingUid = adminUid; assertFalse(dpms.setPermittedCrossProfileNotificationListeners( admin1, Collections.emptyList())); @@ -5227,7 +5227,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { assertTrue(dpms.isNotificationListenerServicePermitted( systemListener, MANAGED_PROFILE_USER_ID)); - // Setting only one package in the whitelist + // Setting only one package in the allowlist mContext.binder.callingUid = MANAGED_PROFILE_ADMIN_UID; assertTrue(dpms.setPermittedCrossProfileNotificationListeners( admin1, Collections.singletonList(permittedListener))); @@ -5241,11 +5241,11 @@ public class DevicePolicyManagerTest extends DpmTestBase { permittedListener, MANAGED_PROFILE_USER_ID)); assertFalse(dpms.isNotificationListenerServicePermitted( notPermittedListener, MANAGED_PROFILE_USER_ID)); - // System packages are always allowed (even if not in the whitelist) + // System packages are always allowed (even if not in the allowlist) assertTrue(dpms.isNotificationListenerServicePermitted( systemListener, MANAGED_PROFILE_USER_ID)); - // Setting an empty whitelist - only system listeners allowed + // Setting an empty allowlist - only system listeners allowed mContext.binder.callingUid = MANAGED_PROFILE_ADMIN_UID; assertTrue(dpms.setPermittedCrossProfileNotificationListeners( admin1, Collections.emptyList())); @@ -5256,11 +5256,11 @@ public class DevicePolicyManagerTest extends DpmTestBase { permittedListener, MANAGED_PROFILE_USER_ID)); assertFalse(dpms.isNotificationListenerServicePermitted( notPermittedListener, MANAGED_PROFILE_USER_ID)); - // System packages are always allowed (even if not in the whitelist) + // System packages are always allowed (even if not in the allowlist) assertTrue(dpms.isNotificationListenerServicePermitted( systemListener, MANAGED_PROFILE_USER_ID)); - // Setting a null whitelist - all listeners allowed + // Setting a null allowlist - all listeners allowed mContext.binder.callingUid = MANAGED_PROFILE_ADMIN_UID; assertTrue(dpms.setPermittedCrossProfileNotificationListeners(admin1, null)); assertNull(dpms.getPermittedCrossProfileNotificationListeners(admin1)); @@ -5308,7 +5308,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { assertTrue(dpms.isNotificationListenerServicePermitted( systemListener, UserHandle.USER_SYSTEM)); - // Setting an empty whitelist - only system listeners allowed in managed profile, but + // Setting an empty allowlist - only system listeners allowed in managed profile, but // all allowed in primary profile mContext.binder.callingUid = MANAGED_PROFILE_ADMIN_UID; assertTrue(dpms.setPermittedCrossProfileNotificationListeners( diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java index 7d3ec030e7a6..a38745f2a66e 100644 --- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java +++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java @@ -406,7 +406,7 @@ public class KeySyncTaskTest { mRecoverableKeyStoreDb.setRecoveryServiceCertPath( TEST_USER_ID, TEST_RECOVERY_AGENT_UID, TEST_ROOT_CERT_ALIAS, TestData.CERT_PATH_1); - // Enter test mode with whitelisted credentials + // Enter test mode with allowlisted credentials when(mTestOnlyInsecureCertificateHelper.isTestOnlyCertificateAlias(any())).thenReturn(true); when(mTestOnlyInsecureCertificateHelper.doesCredentialSupportInsecureMode(anyInt(), any())) .thenReturn(true); @@ -415,7 +415,7 @@ public class KeySyncTaskTest { verify(mTestOnlyInsecureCertificateHelper) .getDefaultCertificateAliasIfEmpty(eq(TEST_ROOT_CERT_ALIAS)); - // run whitelist checks + // run allowlist checks verify(mTestOnlyInsecureCertificateHelper) .doesCredentialSupportInsecureMode(anyInt(), any()); verify(mTestOnlyInsecureCertificateHelper) @@ -424,7 +424,7 @@ public class KeySyncTaskTest { KeyChainSnapshot keyChainSnapshot = mRecoverySnapshotStorage.get(TEST_RECOVERY_AGENT_UID); assertNotNull(keyChainSnapshot); // created snapshot List<WrappedApplicationKey> applicationKeys = keyChainSnapshot.getWrappedApplicationKeys(); - assertThat(applicationKeys).hasSize(0); // non whitelisted key is not included + assertThat(applicationKeys).hasSize(0); // non allowlisted key is not included verify(mMockScrypt, never()).scrypt(any(), any(), anyInt(), anyInt(), anyInt(), anyInt()); } @@ -437,7 +437,7 @@ public class KeySyncTaskTest { mRecoverableKeyStoreDb.setRecoveryServiceCertPath( TEST_USER_ID, TEST_RECOVERY_AGENT_UID, TEST_ROOT_CERT_ALIAS, TestData.CERT_PATH_1); - // Enter test mode with non whitelisted credentials + // Enter test mode with non allowlisted credentials when(mTestOnlyInsecureCertificateHelper.isTestOnlyCertificateAlias(any())).thenReturn(true); when(mTestOnlyInsecureCertificateHelper.doesCredentialSupportInsecureMode(anyInt(), any())) .thenReturn(false); diff --git a/services/tests/servicestests/src/com/android/server/pm/UserSystemPackageInstallerTest.java b/services/tests/servicestests/src/com/android/server/pm/UserSystemPackageInstallerTest.java index 87979fb00021..8e94544707a8 100644 --- a/services/tests/servicestests/src/com/android/server/pm/UserSystemPackageInstallerTest.java +++ b/services/tests/servicestests/src/com/android/server/pm/UserSystemPackageInstallerTest.java @@ -150,7 +150,7 @@ public class UserSystemPackageInstallerTest { ArrayMap<String, Set<String>> r = new ArrayMap<>(); r.put("com.android.package1", new ArraySet<>(Arrays.asList( USER_TYPE_PROFILE_MANAGED, "invalid-garbage2"))); - // com.android.package2 has nothing blacklisted + // com.android.package2 has nothing denylisted r.put("com.android.package3", new ArraySet<>(Arrays.asList("SYSTEM"))); return r; } @@ -196,7 +196,7 @@ public class UserSystemPackageInstallerTest { /** * Test that determineWhitelistedPackagesForUserTypes does not include packages that were never - * whitelisted properly, but does include packages that were whitelisted but then blacklisted. + * allowlisted properly, but does include packages that were allowlisted but then denylisted. */ @Test public void testDetermineWhitelistedPackagesForUserTypes_noNetWhitelisting() { @@ -205,22 +205,22 @@ public class UserSystemPackageInstallerTest { public ArrayMap<String, Set<String>> getAndClearPackageToUserTypeWhitelist() { ArrayMap<String, Set<String>> r = new ArrayMap<>(); r.put("com.android.package1", new ArraySet<>(Arrays.asList("invalid1"))); - // com.android.package2 has no whitelisting + // com.android.package2 has no allowlisting r.put("com.android.package3", new ArraySet<>(Arrays.asList("PROFILE", "FULL"))); r.put("com.android.package4", new ArraySet<>(Arrays.asList("PROFILE"))); r.put("com.android.package5", new ArraySet<>()); - // com.android.package6 has no whitelisting + // com.android.package6 has no allowlisting return r; } @Override public ArrayMap<String, Set<String>> getAndClearPackageToUserTypeBlacklist() { ArrayMap<String, Set<String>> r = new ArrayMap<>(); - // com.android.package1 has no blacklisting + // com.android.package1 has no denylisting r.put("com.android.package2", new ArraySet<>(Arrays.asList("FULL"))); r.put("com.android.package3", new ArraySet<>(Arrays.asList("PROFILE", "FULL"))); r.put("com.android.package4", new ArraySet<>(Arrays.asList("PROFILE", "invalid4"))); - // com.android.package5 has no blacklisting + // com.android.package5 has no denylisting r.put("com.android.package6", new ArraySet<>(Arrays.asList("invalid6"))); return r; } @@ -242,18 +242,18 @@ public class UserSystemPackageInstallerTest { */ @Test public void testShouldInstallPackage() { - final String packageName1 = "pkg1"; // whitelisted - final String packageName2 = "pkg2"; // whitelisted and blacklisted - final String packageName3 = "pkg3"; // whitelisted for a different user type - final String packageName4 = "pkg4"; // not whitelisted nor blacklisted at all + final String packageName1 = "pkg1"; // allowlisted + final String packageName2 = "pkg2"; // allowlisted and denylisted + final String packageName3 = "pkg3"; // allowlisted for a different user type + final String packageName4 = "pkg4"; // not allowlisted nor denylisted at all - // Whitelist: user type bitset for each pkg (for the test, all that matters is 0 vs non-0). + // Allowlist: user type bitset for each pkg (for the test, all that matters is 0 vs non-0). final ArrayMap<String, Long> pkgBitSetMap = new ArrayMap<>(); pkgBitSetMap.put(packageName1, 0b01L); pkgBitSetMap.put(packageName2, 0L); pkgBitSetMap.put(packageName3, 0b10L); - // Whitelist of pkgs for this specific user, i.e. subset of pkgBitSetMap for this user. + // Allowlist of pkgs for this specific user, i.e. subset of pkgBitSetMap for this user. final Set<String> userWhitelist = new ArraySet<>(); userWhitelist.add(packageName1); @@ -266,7 +266,7 @@ public class UserSystemPackageInstallerTest { final AndroidPackage pkg4 = ((ParsedPackage) PackageImpl.forTesting(packageName4) .hideAsParsed()).hideAsFinal(); - // No implicit whitelist, so only install pkg1. + // No implicit allowlist, so only install pkg1. boolean implicit = false; assertTrue(UserSystemPackageInstaller.shouldInstallPackage( pkg1, pkgBitSetMap, userWhitelist, implicit)); @@ -277,7 +277,7 @@ public class UserSystemPackageInstallerTest { assertFalse(UserSystemPackageInstaller.shouldInstallPackage( pkg4, pkgBitSetMap, userWhitelist, implicit)); - // Use implicit whitelist, so install pkg1 and pkg4 + // Use implicit allowlist, so install pkg1 and pkg4 implicit = true; assertTrue(UserSystemPackageInstaller.shouldInstallPackage( pkg1, pkgBitSetMap, userWhitelist, implicit)); @@ -302,12 +302,12 @@ public class UserSystemPackageInstallerTest { final long maskOfTypeA = 0b0001L; final long maskOfTypeC = 0b0100L; - final String packageName1 = "pkg1"; // whitelisted for user type A - final String packageName2 = "pkg2"; // blacklisted whenever whitelisted - final String packageName3 = "pkg3"; // whitelisted for user type C - final String packageName4 = "pkg4"; // whitelisted for user type A + final String packageName1 = "pkg1"; // allowlisted for user type A + final String packageName2 = "pkg2"; // denylisted whenever allowlisted + final String packageName3 = "pkg3"; // allowlisted for user type C + final String packageName4 = "pkg4"; // allowlisted for user type A - final ArrayMap<String, Long> pkgBitSetMap = new ArrayMap<>(); // Whitelist: bitset per pkg + final ArrayMap<String, Long> pkgBitSetMap = new ArrayMap<>(); // Allowlist: bitset per pkg pkgBitSetMap.put(packageName1, maskOfTypeA); pkgBitSetMap.put(packageName2, 0L); pkgBitSetMap.put(packageName3, maskOfTypeC); @@ -368,7 +368,7 @@ public class UserSystemPackageInstallerTest { } // Add auto-generated RRO package to expectedPackages since they are not (supposed to be) - // in the whitelist but they should be installed. + // in the allowlist but they should be installed. for (PackageInfo p : packageInfos) { if (p.isOverlayPackage() && UserSystemPackageInstaller.hasAutoGeneratedRROSuffix(p.packageName) @@ -396,7 +396,7 @@ public class UserSystemPackageInstallerTest { } /** - * Test that overlay package not in whitelist should be installed for all user at Explicit mode. + * Test that overlay package not in allowlist should be installed for all user at Explicit mode. */ @Test public void testInstallOverlayPackagesExplicitMode() { @@ -513,7 +513,7 @@ public class UserSystemPackageInstallerTest { assertFalse(mUserSystemPackageInstaller.isIgnoreOtaMode()); } - /** Sets the whitelist mode to the desired value via adb's setprop. */ + /** Sets the allowlist mode to the desired value via adb's setprop. */ private void setUserTypePackageWhitelistMode(int mode) { UiDevice uiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); try { @@ -529,7 +529,7 @@ public class UserSystemPackageInstallerTest { /** @see UserSystemPackageInstaller#mWhitelistedPackagesForUserTypes */ private ArrayMap<String, Long> getNewPackageToWhitelistedBitSetMap() { final ArrayMap<String, Long> pkgBitSetMap = new ArrayMap<>(); - // "android" is always treated as whitelisted for all types, regardless of the xml file. + // "android" is always treated as allowlisted for all types, regardless of the xml file. pkgBitSetMap.put("android", ~0L); return pkgBitSetMap; } diff --git a/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java b/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java index 8398585ca74a..ff43da6370e8 100644 --- a/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java +++ b/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java @@ -836,7 +836,7 @@ public class DexManagerTests { @Test public void testOobPackageSelectionWhitelist() { - // Various whitelist of apps to run in OOB mode. + // Various allowlist of apps to run in OOB mode. final String kWhitelistApp0 = "com.priv.app0"; final String kWhitelistApp1 = "com.priv.app1"; final String kWhitelistApp2 = "com.priv.app2"; @@ -845,17 +845,17 @@ public class DexManagerTests { // Packages that shares the targeting process. final Collection<String> runningPackages = Arrays.asList("com.priv.app1", "com.priv.app2"); - // Feature is off, whitelist does not matter + // Feature is off, allowlist does not matter assertFalse(shouldPackageRunOob(false, kWhitelistApp0, runningPackages)); assertFalse(shouldPackageRunOob(false, kWhitelistApp1, runningPackages)); assertFalse(shouldPackageRunOob(false, "", runningPackages)); assertFalse(shouldPackageRunOob(false, "ALL", runningPackages)); - // Feature is on, app not in whitelist + // Feature is on, app not in allowlist assertFalse(shouldPackageRunOob(true, kWhitelistApp0, runningPackages)); assertFalse(shouldPackageRunOob(true, "", runningPackages)); - // Feature is on, app in whitelist + // Feature is on, app in allowlist assertTrue(shouldPackageRunOob(true, kWhitelistApp1, runningPackages)); assertTrue(shouldPackageRunOob(true, kWhitelistApp2, runningPackages)); assertTrue(shouldPackageRunOob(true, kWhitelistApp1AndApp2, runningPackages)); diff --git a/services/tests/servicestests/src/com/android/server/systemconfig/SystemConfigTest.java b/services/tests/servicestests/src/com/android/server/systemconfig/SystemConfigTest.java index 10981ab49513..17d99e652726 100644 --- a/services/tests/servicestests/src/com/android/server/systemconfig/SystemConfigTest.java +++ b/services/tests/servicestests/src/com/android/server/systemconfig/SystemConfigTest.java @@ -184,7 +184,7 @@ public class SystemConfigTest { /** * Tests that readPermissions works correctly with {@link SystemConfig#ALLOW_APP_CONFIGS} - * permission flag for the tag: whitelisted-staged-installer. + * permission flag for the tag: allowlisted-staged-installer. */ @Test public void readPermissions_allowAppConfigs_parsesStagedInstallerWhitelist() @@ -204,7 +204,7 @@ public class SystemConfigTest { /** * Tests that readPermissions works correctly without {@link SystemConfig#ALLOW_APP_CONFIGS} - * permission flag for the tag: whitelisted-staged-installer. + * permission flag for the tag: allowlisted-staged-installer. */ @Test public void readPermissions_notAllowAppConfigs_wontParseStagedInstallerWhitelist() diff --git a/services/tests/servicestests/utils/com/android/server/testutils/TestUtils.java b/services/tests/servicestests/utils/com/android/server/testutils/TestUtils.java index b200293ee916..fa14b24823d0 100644 --- a/services/tests/servicestests/utils/com/android/server/testutils/TestUtils.java +++ b/services/tests/servicestests/utils/com/android/server/testutils/TestUtils.java @@ -52,7 +52,7 @@ public class TestUtils { * EasyMock-style "strict" mock that throws immediately on any interaction that was not * explicitly allowed. * - * You can allow certain method calls on a whitelist basis by stubbing them e.g. with + * You can allow certain method calls on a allowlist basis by stubbing them e.g. with * {@link Mockito#doAnswer}, {@link Mockito#doNothing}, etc. */ public static <T> T strictMock(Class<T> c) { diff --git a/services/tests/wmtests/src/com/android/server/wm/HighRefreshRateBlacklistTest.java b/services/tests/wmtests/src/com/android/server/wm/HighRefreshRateBlacklistTest.java index 56cb447e65b0..f53894ad9ec5 100644 --- a/services/tests/wmtests/src/com/android/server/wm/HighRefreshRateBlacklistTest.java +++ b/services/tests/wmtests/src/com/android/server/wm/HighRefreshRateBlacklistTest.java @@ -102,7 +102,7 @@ public class HighRefreshRateBlacklistTest { final FakeDeviceConfig config = new FakeDeviceConfig(); mBlacklist = new HighRefreshRateBlacklist(r, config); - // First check that the default blacklist is in effect + // First check that the default denylist is in effect assertTrue(mBlacklist.isBlacklisted(APP1)); assertFalse(mBlacklist.isBlacklisted(APP2)); assertFalse(mBlacklist.isBlacklisted(APP3)); @@ -130,7 +130,7 @@ public class HighRefreshRateBlacklistTest { assertTrue(mBlacklist.isBlacklisted(APP2)); assertTrue(mBlacklist.isBlacklisted(APP3)); - // Change an unrelated flag in our namespace and verify that the blacklist is intact + // Change an unrelated flag in our namespace and verify that the denylist is intact config.putPropertyAndNotify(DeviceConfig.NAMESPACE_DISPLAY_MANAGER, "someKey", "someValue"); assertFalse(mBlacklist.isBlacklisted(APP1)); assertTrue(mBlacklist.isBlacklisted(APP2)); |