diff options
author | Mayank Garg <gargmayank@google.com> | 2020-08-04 12:57:51 -0700 |
---|---|---|
committer | Mayank Garg <gargmayank@google.com> | 2020-08-04 17:35:36 -0700 |
commit | 0f382c4569f7e534ea888152e5a40c5c280389fb (patch) | |
tree | 56c401c634ec29af0bcc51af1a12c0d69b472622 /car-usb-handler | |
parent | 119b1b5503faae5e07e35f2fb5457bfb163f8b00 (diff) | |
download | Car-0f382c4569f7e534ea888152e5a40c5c280389fb.tar.gz |
Update language to comply with Android's inclusive language guidance.
See https://source.android.com/setup/contribute/respectful-code for reference
#inclusivefixit
Bug: 162744859
Test: m (Successful build)
Change-Id: Icb0665849ca06077cc09bf5fe87d8cdc61193eb5
Diffstat (limited to 'car-usb-handler')
-rw-r--r-- | car-usb-handler/src/android/car/usb/handler/AoapInterface.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/car-usb-handler/src/android/car/usb/handler/AoapInterface.java b/car-usb-handler/src/android/car/usb/handler/AoapInterface.java index 7587392480..b17fe28c13 100644 --- a/car-usb-handler/src/android/car/usb/handler/AoapInterface.java +++ b/car-usb-handler/src/android/car/usb/handler/AoapInterface.java @@ -105,9 +105,9 @@ final class AoapInterface { /** * Set of VID:PID pairs denylisted through config_AoapIncompatibleDeviceIds. Only - * isDeviceBlacklisted() should ever access this variable. + * isDeviceDenylisted() should ever access this variable. */ - private static Set<Pair<Integer, Integer>> sBlacklistedVidPidPairs; + private static Set<Pair<Integer, Integer>> sDenylistedVidPidPairs; private static final String TAG = AoapInterface.class.getSimpleName(); @@ -139,7 +139,7 @@ final class AoapInterface { } public static boolean isSupported(Context context, UsbDevice device, UsbDeviceConnection conn) { - return !isDeviceBlacklisted(context, device) && getProtocol(conn) >= 1; + return !isDeviceDenylisted(context, device) && getProtocol(conn) >= 1; } public static void sendString(UsbDeviceConnection conn, int index, String string) @@ -166,9 +166,9 @@ final class AoapInterface { } } - public static synchronized boolean isDeviceBlacklisted(Context context, UsbDevice device) { - if (sBlacklistedVidPidPairs == null) { - sBlacklistedVidPidPairs = new HashSet<>(); + public static synchronized boolean isDeviceDenylisted(Context context, UsbDevice device) { + if (sDenylistedVidPidPairs == null) { + sDenylistedVidPidPairs = new HashSet<>(); String[] idPairs = context.getResources().getStringArray(R.array.config_AoapIncompatibleDeviceIds); for (String idPair : idPairs) { @@ -176,7 +176,7 @@ final class AoapInterface { String[] tokens = idPair.split(":"); if (tokens.length == 2) { try { - sBlacklistedVidPidPairs.add(Pair.create(Integer.parseInt(tokens[0], 16), + sDenylistedVidPidPairs.add(Pair.create(Integer.parseInt(tokens[0], 16), Integer.parseInt(tokens[1], 16))); success = true; } catch (NumberFormatException e) { @@ -189,7 +189,7 @@ final class AoapInterface { } } - return sBlacklistedVidPidPairs.contains(Pair.create(device.getVendorId(), + return sDenylistedVidPidPairs.contains(Pair.create(device.getVendorId(), device.getProductId())); } |