/packages/services/Car/tests/carservice_unit_test/src/com/android/car/internal/util/ |
D | ArrayUtilsTest.java | 36 byte[] array1 = new byte[]{(byte) 1, (byte) 2, (byte) 4}; in testEquals() 38 assertThat(ArrayUtils.equals(array1, array2, 2)).isTrue(); in testEquals() 39 assertThat(ArrayUtils.equals(array1, array2, 3)).isFalse(); in testEquals() 44 byte[] array1 = new byte[]{(byte) 1, (byte) 2, (byte) 4}; in testEqualsSameArray() 45 assertThat(ArrayUtils.equals(array1, array1, 2)).isTrue(); in testEqualsSameArray() 50 byte[] array1 = new byte[]{(byte) 1, (byte) 2, (byte) 4}; in testEqualsNull() 51 assertThat(ArrayUtils.equals(array1, null, 2)).isFalse(); in testEqualsNull() 52 assertThat(ArrayUtils.equals(null, array1, 2)).isFalse(); in testEqualsNull() 57 byte[] array1 = new byte[]{(byte) 1, (byte) 2, (byte) 3}; in testEqualsLengthTooSmall() 59 assertThat(ArrayUtils.equals(array1, array2, 4)).isFalse(); in testEqualsLengthTooSmall() [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/util/ |
D | NameDistance.java | 65 byte[] array1, array2; in getDistance() 69 array1 = bytes2; in getDistance() 72 array1 = bytes1; in getDistance() 75 int length1 = array1.length; in getDistance() 78 for (int i = 0; i < array1.length; i++) { in getDistance() 79 if (array1[i] != array2[i]) { in getDistance() 112 byte c1 = array1[i]; in getDistance() 144 if (array1[i] != array2[j]) { in getDistance()
|
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/common/bluetooth/fastpair/ |
D | HmacSha256Test.java | 91 byte[] array1 = new byte[EXTRACT_HMAC_SIZE]; in inputTwoIdenticalArrays_compareTwoHmacMustReturnTrue() 92 random.nextBytes(array1); in inputTwoIdenticalArrays_compareTwoHmacMustReturnTrue() 93 byte[] array2 = Arrays.copyOf(array1, array1.length); in inputTwoIdenticalArrays_compareTwoHmacMustReturnTrue() 95 assertThat(HmacSha256.compareTwoHMACs(array1, array2)).isTrue(); in inputTwoIdenticalArrays_compareTwoHmacMustReturnTrue() 102 byte[] array1 = new byte[EXTRACT_HMAC_SIZE]; in inputTwoRandomArrays_compareTwoHmacMustReturnFalse() 103 random.nextBytes(array1); in inputTwoRandomArrays_compareTwoHmacMustReturnFalse() 107 assertThat(HmacSha256.compareTwoHMACs(array1, array2)).isFalse(); in inputTwoRandomArrays_compareTwoHmacMustReturnFalse()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/util/ |
D | ArrayUtils.java | 38 public static boolean equals(byte[] array1, byte[] array2, int length) { in equals() argument 43 if (array1 == array2) { in equals() 46 if (array1 == null || array2 == null || array1.length < length || array2.length < length) { in equals() 50 if (array1[i] != array2[i]) { in equals()
|
/packages/apps/SecureElement/src/com/android/se/internal/ |
D | Util.java | 37 public static byte[] mergeBytes(byte[] array1, byte[] array2) { in mergeBytes() argument 38 byte[] data = new byte[array1.length + array2.length]; in mergeBytes() 39 System.arraycopy(array1, 0, data, 0, array1.length); in mergeBytes() 40 System.arraycopy(array2, 0, data, array1.length, array2.length); in mergeBytes()
|
/packages/modules/AppSearch/testing/coretests/src/android/app/appsearch/external/util/ |
D | BundleUtilTest.java | 125 SparseArray<Parcelable> array1 = new SparseArray<>(); in testDeepEquals_sparseArray() local 126 array1.put(1, parcelable1); in testDeepEquals_sparseArray() 127 array1.put(10, parcelable2); in testDeepEquals_sparseArray() 138 b1.putSparseParcelableArray("array1", array1); in testDeepEquals_sparseArray() 180 SparseArray<Parcelable> array1 = new SparseArray<>(); in testHashCode_sparseArray() local 181 array1.put(1, parcelable1); in testHashCode_sparseArray() 182 array1.put(10, parcelable2); in testHashCode_sparseArray() 193 b1.putSparseParcelableArray("array1", array1); in testHashCode_sparseArray()
|
/packages/apps/Contacts/src/com/android/contacts/format/ |
D | FormatUtils.java | 60 public static int overlapPoint(char[] array1, char[] array2) { in overlapPoint() argument 61 if (array1 == null || array2 == null) { in overlapPoint() 64 int count1 = array1.length; in overlapPoint() 68 while (count1 > 0 && count2 > 0 && array1[count1 - 1] == array2[count2 - 1]) { in overlapPoint() 80 if (array1[i+j] != array2[j]) { in overlapPoint()
|
/packages/services/Car/car-lib/src/com/android/car/internal/util/ |
D | ArrayUtils.java | 71 public static boolean equals(byte[] array1, byte[] array2, int length) { in equals() argument 76 if (array1 == array2) { in equals() 79 if (array1 == null || array2 == null || array1.length < length || array2.length < length) { in equals() 83 if (array1[i] != array2[i]) { in equals()
|
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/displaysound/ |
D | HdrFormatSelectionFragmentTest.java | 317 private int[] difference(int[] array1, int[] array2) { in difference() argument 320 for (int i : array1) { in difference()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/ |
D | WifiCarrierInfoManager.java | 1125 private static byte[] concatHex(byte[] array1, byte[] array2) { in concatHex() argument 1127 int len = array1.length + array2.length; in concatHex() 1132 if (array1.length != 0) { in concatHex() 1133 for (byte b : array1) { in concatHex()
|