diff options
author | Mayank Garg <gargmayank@google.com> | 2020-08-05 02:33:14 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-08-05 02:33:14 +0000 |
commit | d4db5b252fd0fde85fb604555e698fd1bf0d22e3 (patch) | |
tree | 07d44d2e5debd6a536e4237bac90f379aad0e891 /car-usb-handler | |
parent | 947b7ca78814a77d21595764f01c81fd09028053 (diff) | |
parent | 0f382c4569f7e534ea888152e5a40c5c280389fb (diff) | |
download | Car-d4db5b252fd0fde85fb604555e698fd1bf0d22e3.tar.gz |
Update language to comply with Android's inclusive language guidance. am: 0f382c4569
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Car/+/12308550
Change-Id: Ia366bd095e7bcaaa0fa2975ca2c9cf28d6372373
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())); } |