summaryrefslogtreecommitdiff
path: root/framework/tests/src/android/bluetooth/BluetoothTestUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/tests/src/android/bluetooth/BluetoothTestUtils.java')
-rw-r--r--framework/tests/src/android/bluetooth/BluetoothTestUtils.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/tests/src/android/bluetooth/BluetoothTestUtils.java b/framework/tests/src/android/bluetooth/BluetoothTestUtils.java
index 409025bc67..8eb6ebcda8 100644
--- a/framework/tests/src/android/bluetooth/BluetoothTestUtils.java
+++ b/framework/tests/src/android/bluetooth/BluetoothTestUtils.java
@@ -587,7 +587,8 @@ public class BluetoothTestUtils extends Assert {
final IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED);
mContext.registerReceiver(receiver, filter);
- assertTrue(adapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE));
+ assertEquals(adapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE),
+ BluetoothStatusCodes.SUCCESS);
boolean success = false;
try {
success = completionSemaphore.tryAcquire(DISCOVERABLE_UNDISCOVERABLE_TIMEOUT,
@@ -637,7 +638,8 @@ public class BluetoothTestUtils extends Assert {
final IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED);
mContext.registerReceiver(receiver, filter);
- assertTrue(adapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE));
+ assertEquals(adapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE),
+ BluetoothStatusCodes.SUCCESS);
boolean success = false;
try {
success = completionSemaphore.tryAcquire(DISCOVERABLE_UNDISCOVERABLE_TIMEOUT,