Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2667)

Unified Diff: device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java

Issue 1765773002: bluetooth: Refactor GetDescriptorForUUID to GetDescriptorsForUUID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-notify-tommyt-
Patch Set: addressed ortuno's comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
diff --git a/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java b/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
index f3d98a7bd4eb97099af51ab71196e7caa84f8862..b3677b0c792d83b110cc21e1197ade23a9804992 100644
--- a/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
+++ b/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
@@ -632,15 +632,6 @@ class Fakes {
(FakeBluetoothGattCharacteristic) chromeCharacteristic.mCharacteristic;
UUID uuid = UUID.fromString(uuidString);
- // Check for duplicates
- for (Wrappers.BluetoothGattDescriptorWrapper descriptor :
- fakeCharacteristic.mDescriptors) {
- if (descriptor.getUuid().equals(uuid)) {
- throw new IllegalArgumentException(
- "FakeBluetoothGattCharacteristic addDescriptor called with uuid '"
- + uuidString + "' that has already been added to this characteristic.");
- }
- }
fakeCharacteristic.mDescriptors.add(
new FakeBluetoothGattDescriptor(fakeCharacteristic, uuid));
}
@@ -649,16 +640,6 @@ class Fakes {
// Wrappers.BluetoothGattCharacteristicWrapper overrides:
@Override
- public Wrappers.BluetoothGattDescriptorWrapper getDescriptor(UUID uuid) {
- for (Wrappers.BluetoothGattDescriptorWrapper descriptor : mDescriptors) {
- if (descriptor.getUuid().equals(uuid)) {
- return descriptor;
- }
- }
- return null;
- }
-
- @Override
public List<Wrappers.BluetoothGattDescriptorWrapper> getDescriptors() {
return mDescriptors;
}
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc ('k') | device/bluetooth/test/bluetooth_test_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698