Loading framework/tests/bumble/src/android/bluetooth/DckGattTest.kt +5 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.bluetooth.le.ScanCallback import android.bluetooth.le.ScanFilter import android.bluetooth.le.ScanResult import android.bluetooth.le.ScanSettings import android.bluetooth.test_utils.EnableBluetoothRule import android.content.Context import android.os.ParcelUuid import androidx.test.core.app.ApplicationProvider Loading Loading @@ -69,11 +70,13 @@ public class DckGattTest() { // A Rule live from a test setup through it's teardown. // Gives shell permissions during the test. @Rule @JvmField val mPermissionRule = AdoptShellPermissionsRule() @Rule(order = 0) @JvmField val mPermissionRule = AdoptShellPermissionsRule() // Setup a Bumble Pandora device for the duration of the test. // Acting as a Pandora client, it can be interacted with through the Pandora APIs. @Rule @JvmField val mBumble = PandoraDevice() @Rule(order = 1) @JvmField val mBumble = PandoraDevice() @Rule(order = 2) @JvmField val enableBluetoothRule = EnableBluetoothRule(false, true) @Before fun setUp() { Loading framework/tests/bumble/src/android/bluetooth/DckScanTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.bluetooth import android.bluetooth.DckTestRule.LeScanResult import android.bluetooth.le.ScanFilter import android.bluetooth.le.ScanSettings import android.bluetooth.test_utils.EnableBluetoothRule import android.content.Context import android.os.ParcelUuid import androidx.test.core.app.ApplicationProvider Loading Loading @@ -66,6 +67,8 @@ class DckScanTest( isGattConnected = isGattConnected ) @Rule(order = 3) @JvmField val enableBluetoothRule = EnableBluetoothRule(false, true) @Test fun scanForIrkAndIdentityAddress_remoteFound() { // TODO(316001793): Retrieve identity address from Bumble Loading framework/tests/bumble/src/android/bluetooth/GattClientTest.java +8 −4 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import static org.mockito.Mockito.timeout; import static org.mockito.Mockito.verify; import android.bluetooth.le.BluetoothLeScanner; import android.bluetooth.test_utils.EnableBluetoothRule; import android.content.Context; import android.platform.test.annotations.RequiresFlagsEnabled; import android.platform.test.flag.junit.CheckFlagsRule; Loading Loading @@ -88,14 +89,17 @@ public class GattClientTest { private static final UUID TEST_CHARACTERISTIC_UUID = UUID.fromString("00010001-0000-0000-0000-000000000000"); @Rule(order = 2) public final AdoptShellPermissionsRule mPermissionRule = new AdoptShellPermissionsRule(); @Rule(order = 0) public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule(); @Rule(order = 1) public final PandoraDevice mBumble = new PandoraDevice(); @Rule(order = 0) public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule(); @Rule(order = 2) public final AdoptShellPermissionsRule mPermissionRule = new AdoptShellPermissionsRule(); @Rule(order = 3) public final EnableBluetoothRule mEnableBluetoothRule = new EnableBluetoothRule(false, true); private final Context mContext = ApplicationProvider.getApplicationContext(); private final BluetoothManager mManager = mContext.getSystemService(BluetoothManager.class); Loading framework/tests/bumble/src/android/bluetooth/LeScanningTest.java +8 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.bluetooth.le.ScanCallback; import android.bluetooth.le.ScanFilter; import android.bluetooth.le.ScanResult; import android.bluetooth.le.ScanSettings; import android.bluetooth.test_utils.EnableBluetoothRule; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; Loading Loading @@ -75,9 +76,14 @@ public class LeScanningTest { private static final byte[] TEST_SERVICE_DATA = {(byte) 0xAA, (byte) 0xBB, (byte) 0xCC}; private static final String TEST_UUID_SUFFIX = "-0000-1000-8000-00805f9b34fb"; @Rule public final AdoptShellPermissionsRule mPermissionRule = new AdoptShellPermissionsRule(); @Rule(order = 0) public final AdoptShellPermissionsRule mPermissionRule = new AdoptShellPermissionsRule(); @Rule public final PandoraDevice mBumble = new PandoraDevice(); @Rule(order = 1) public final PandoraDevice mBumble = new PandoraDevice(); @Rule(order = 2) public final EnableBluetoothRule mEnableBluetoothRule = new EnableBluetoothRule(false, true); private final Context mContext = ApplicationProvider.getApplicationContext(); private final BluetoothManager mBluetoothManager = Loading Loading
framework/tests/bumble/src/android/bluetooth/DckGattTest.kt +5 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.bluetooth.le.ScanCallback import android.bluetooth.le.ScanFilter import android.bluetooth.le.ScanResult import android.bluetooth.le.ScanSettings import android.bluetooth.test_utils.EnableBluetoothRule import android.content.Context import android.os.ParcelUuid import androidx.test.core.app.ApplicationProvider Loading Loading @@ -69,11 +70,13 @@ public class DckGattTest() { // A Rule live from a test setup through it's teardown. // Gives shell permissions during the test. @Rule @JvmField val mPermissionRule = AdoptShellPermissionsRule() @Rule(order = 0) @JvmField val mPermissionRule = AdoptShellPermissionsRule() // Setup a Bumble Pandora device for the duration of the test. // Acting as a Pandora client, it can be interacted with through the Pandora APIs. @Rule @JvmField val mBumble = PandoraDevice() @Rule(order = 1) @JvmField val mBumble = PandoraDevice() @Rule(order = 2) @JvmField val enableBluetoothRule = EnableBluetoothRule(false, true) @Before fun setUp() { Loading
framework/tests/bumble/src/android/bluetooth/DckScanTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.bluetooth import android.bluetooth.DckTestRule.LeScanResult import android.bluetooth.le.ScanFilter import android.bluetooth.le.ScanSettings import android.bluetooth.test_utils.EnableBluetoothRule import android.content.Context import android.os.ParcelUuid import androidx.test.core.app.ApplicationProvider Loading Loading @@ -66,6 +67,8 @@ class DckScanTest( isGattConnected = isGattConnected ) @Rule(order = 3) @JvmField val enableBluetoothRule = EnableBluetoothRule(false, true) @Test fun scanForIrkAndIdentityAddress_remoteFound() { // TODO(316001793): Retrieve identity address from Bumble Loading
framework/tests/bumble/src/android/bluetooth/GattClientTest.java +8 −4 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import static org.mockito.Mockito.timeout; import static org.mockito.Mockito.verify; import android.bluetooth.le.BluetoothLeScanner; import android.bluetooth.test_utils.EnableBluetoothRule; import android.content.Context; import android.platform.test.annotations.RequiresFlagsEnabled; import android.platform.test.flag.junit.CheckFlagsRule; Loading Loading @@ -88,14 +89,17 @@ public class GattClientTest { private static final UUID TEST_CHARACTERISTIC_UUID = UUID.fromString("00010001-0000-0000-0000-000000000000"); @Rule(order = 2) public final AdoptShellPermissionsRule mPermissionRule = new AdoptShellPermissionsRule(); @Rule(order = 0) public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule(); @Rule(order = 1) public final PandoraDevice mBumble = new PandoraDevice(); @Rule(order = 0) public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule(); @Rule(order = 2) public final AdoptShellPermissionsRule mPermissionRule = new AdoptShellPermissionsRule(); @Rule(order = 3) public final EnableBluetoothRule mEnableBluetoothRule = new EnableBluetoothRule(false, true); private final Context mContext = ApplicationProvider.getApplicationContext(); private final BluetoothManager mManager = mContext.getSystemService(BluetoothManager.class); Loading
framework/tests/bumble/src/android/bluetooth/LeScanningTest.java +8 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.bluetooth.le.ScanCallback; import android.bluetooth.le.ScanFilter; import android.bluetooth.le.ScanResult; import android.bluetooth.le.ScanSettings; import android.bluetooth.test_utils.EnableBluetoothRule; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; Loading Loading @@ -75,9 +76,14 @@ public class LeScanningTest { private static final byte[] TEST_SERVICE_DATA = {(byte) 0xAA, (byte) 0xBB, (byte) 0xCC}; private static final String TEST_UUID_SUFFIX = "-0000-1000-8000-00805f9b34fb"; @Rule public final AdoptShellPermissionsRule mPermissionRule = new AdoptShellPermissionsRule(); @Rule(order = 0) public final AdoptShellPermissionsRule mPermissionRule = new AdoptShellPermissionsRule(); @Rule public final PandoraDevice mBumble = new PandoraDevice(); @Rule(order = 1) public final PandoraDevice mBumble = new PandoraDevice(); @Rule(order = 2) public final EnableBluetoothRule mEnableBluetoothRule = new EnableBluetoothRule(false, true); private final Context mContext = ApplicationProvider.getApplicationContext(); private final BluetoothManager mBluetoothManager = Loading