summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoopa Sattiraju <sattiraju@google.com>2022-02-09 17:48:12 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-02-09 17:48:12 +0000
commit694813e3709ad97a528c414f0295a707b3d06052 (patch)
tree63fa2d845e29b4b9cacbacb49189015b9f09577c
parent047094e0f07b80251fa9d35234e184b45e0db6cc (diff)
parent087aafafb4d70519f101fd46785f1c31ec7572b1 (diff)
downloadcts-android-s-v2-beta-3.tar.gz
Merge "BT: Remove HAP CTS tests that use non system APIs"android-s-v2-beta-3android-s-qpr3-beta-1android-s-v2-beta-3android-s-qpr3-beta-1
-rw-r--r--tests/tests/bluetooth/src/android/bluetooth/cts/BluetoothHapClientTest.java39
1 files changed, 4 insertions, 35 deletions
diff --git a/tests/tests/bluetooth/src/android/bluetooth/cts/BluetoothHapClientTest.java b/tests/tests/bluetooth/src/android/bluetooth/cts/BluetoothHapClientTest.java
index f4d6c3b738d..a79c29946e6 100644
--- a/tests/tests/bluetooth/src/android/bluetooth/cts/BluetoothHapClientTest.java
+++ b/tests/tests/bluetooth/src/android/bluetooth/cts/BluetoothHapClientTest.java
@@ -139,21 +139,6 @@ public class BluetoothHapClientTest extends AndroidTestCase {
mBluetoothHapClient.getConnectionState(testDevice));
}
- public void testGetHapGroup() {
- if (!(mHasBluetooth && mIsHapClientSupported)) return;
-
- assertTrue(waitForProfileConnect());
- assertNotNull(mBluetoothHapClient);
-
- BluetoothDevice testDevice = mAdapter.getRemoteDevice("00:11:22:AA:BB:CC");
-
- assertTrue(BTAdapterUtils.disableAdapter(mAdapter, mContext));
-
- // Verify returns BluetoothHapClient.HAP_GROUP_UNAVAILABLE if bluetooth is not enabled
- assertEquals(BluetoothHapClient.HAP_GROUP_UNAVAILABLE,
- mBluetoothHapClient.getHapGroup(testDevice));
- }
-
public void testGetActivePresetIndex() {
if (!(mHasBluetooth && mIsHapClientSupported)) return;
@@ -164,8 +149,8 @@ public class BluetoothHapClientTest extends AndroidTestCase {
assertTrue(BTAdapterUtils.disableAdapter(mAdapter, mContext));
- // Verify returns false if bluetooth is not enabled
- mBluetoothHapClient.getActivePresetIndex(testDevice);
+ // Verify returns null if bluetooth is not enabled
+ assertNull(mBluetoothHapClient.getActivePresetInfo(testDevice));
}
public void testSelectActivePreset() {
@@ -188,8 +173,6 @@ public class BluetoothHapClientTest extends AndroidTestCase {
assertTrue(waitForProfileConnect());
assertNotNull(mBluetoothHapClient);
- BluetoothDevice testDevice = mAdapter.getRemoteDevice("00:11:22:AA:BB:CC");
-
assertTrue(BTAdapterUtils.disableAdapter(mAdapter, mContext));
// Verify returns false if bluetooth is not enabled
@@ -206,8 +189,8 @@ public class BluetoothHapClientTest extends AndroidTestCase {
assertTrue(BTAdapterUtils.disableAdapter(mAdapter, mContext));
- // Verify returns false if bluetooth is not enabled
- mBluetoothHapClient.getPresetInfo(testDevice, 1);
+ // Verify returns empty list if bluetooth is not enabled
+ assertTrue(mBluetoothHapClient.getAllPresetInfo(testDevice).isEmpty());
}
public void testGetAllPresetsInfo() {
@@ -224,20 +207,6 @@ public class BluetoothHapClientTest extends AndroidTestCase {
mBluetoothHapClient.getAllPresetInfo(testDevice);
}
- public void testGetFeatures() {
- if (!(mHasBluetooth && mIsHapClientSupported)) return;
-
- assertTrue(waitForProfileConnect());
- assertNotNull(mBluetoothHapClient);
-
- BluetoothDevice testDevice = mAdapter.getRemoteDevice("00:11:22:AA:BB:CC");
-
- assertTrue(BTAdapterUtils.disableAdapter(mAdapter, mContext));
-
- // Verify returns false if bluetooth is not enabled
- assertFalse(mBluetoothHapClient.getFeatures(testDevice));
- }
-
public void testSetPresetName() {
if (!(mHasBluetooth && mIsHapClientSupported)) return;