Home
last modified time | relevance | path

Searched refs:oldFields (Results 1 – 2 of 2) sorted by relevance

/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pbap/
DBluetoothPbapUtilsTest.java91 ArrayList<String> oldFields = new ArrayList<>(List.of("0", "1", "2", "3")); in checkFieldUpdates_whenSizeAreDifferent_returnsTrue() local
94 assertThat(BluetoothPbapUtils.checkFieldUpdates(oldFields, newFields)).isTrue(); in checkFieldUpdates_whenSizeAreDifferent_returnsTrue()
99 ArrayList<String> oldFields = new ArrayList<>(List.of("0", "1", "2", "3")); in checkFieldUpdates_newFieldsHasItsOwnFields_returnsTrue() local
102 assertThat(BluetoothPbapUtils.checkFieldUpdates(oldFields, newFields)).isTrue(); in checkFieldUpdates_newFieldsHasItsOwnFields_returnsTrue()
107 ArrayList<String> oldFields = new ArrayList<>(List.of("0", "1", "2", "3")); in checkFieldUpdates_onlyNewFieldsIsNull_returnsTrue() local
110 assertThat(BluetoothPbapUtils.checkFieldUpdates(oldFields, newFields)).isTrue(); in checkFieldUpdates_onlyNewFieldsIsNull_returnsTrue()
115 ArrayList<String> oldFields = null; in checkFieldUpdates_onlyOldFieldsIsNull_returnsTrue() local
118 assertThat(BluetoothPbapUtils.checkFieldUpdates(oldFields, newFields)).isTrue(); in checkFieldUpdates_onlyOldFieldsIsNull_returnsTrue()
123 ArrayList<String> oldFields = null; in checkFieldUpdates_whenBothAreNull_returnsTrue() local
126 assertThat(BluetoothPbapUtils.checkFieldUpdates(oldFields, newFields)).isFalse(); in checkFieldUpdates_whenBothAreNull_returnsTrue()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/pbap/
DBluetoothPbapUtils.java483 static boolean checkFieldUpdates(ArrayList<String> oldFields, ArrayList<String> newFields) { in checkFieldUpdates() argument
484 if (newFields != null && oldFields != null) { in checkFieldUpdates()
485 if (newFields.size() != oldFields.size()) { in checkFieldUpdates()
486 sTotalSvcFields += Math.abs(newFields.size() - oldFields.size()); in checkFieldUpdates()
487 sTotalFields += Math.abs(newFields.size() - oldFields.size()); in checkFieldUpdates()
491 if (!oldFields.contains(newField)) { in checkFieldUpdates()
496 } else if (newFields == null && oldFields != null && oldFields.size() > 0) { in checkFieldUpdates()
497 sTotalSvcFields += oldFields.size(); in checkFieldUpdates()
498 sTotalFields += oldFields.size(); in checkFieldUpdates()
503 } else if (oldFields == null && newFields != null && newFields.size() > 0) { in checkFieldUpdates()