Loading android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterServiceTest.java +4 −3 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class AdapterServiceTest { private @Mock android.app.Application mApplication; private static final int CONTEXT_SWITCH_MS = 100; private static final int GATT_START_TIME_MS = 500; private static final int ONE_SECOND_MS = 1000; private static final int NATIVE_INIT_MS = 8000; private static final int NATIVE_DISABLE_MS = 1000; Loading Loading @@ -198,7 +199,7 @@ public class AdapterServiceTest { invocationNumber + 1, CONTEXT_SWITCH_MS); // Start GATT verify(mMockContext, timeout(CONTEXT_SWITCH_MS).times( verify(mMockContext, timeout(GATT_START_TIME_MS).times( startServiceCalls * invocationNumber + 1)).startService(any()); mAdapterService.addProfile(mMockGattService); mAdapterService.onProfileServiceStateChanged(mMockGattService, BluetoothAdapter.STATE_ON); Loading Loading @@ -328,7 +329,7 @@ public class AdapterServiceTest { CONTEXT_SWITCH_MS); // Start GATT verify(mMockContext, timeout(CONTEXT_SWITCH_MS).times(1)).startService(any()); verify(mMockContext, timeout(GATT_START_TIME_MS).times(1)).startService(any()); mAdapterService.addProfile(mMockGattService); verifyStateChange(BluetoothAdapter.STATE_BLE_TURNING_ON, Loading Loading @@ -395,7 +396,7 @@ public class AdapterServiceTest { CONTEXT_SWITCH_MS); // Start GATT verify(mMockContext, timeout(CONTEXT_SWITCH_MS).times(1)).startService(any()); verify(mMockContext, timeout(GATT_START_TIME_MS).times(1)).startService(any()); mAdapterService.addProfile(mMockGattService); mAdapterService.onProfileServiceStateChanged(mMockGattService, BluetoothAdapter.STATE_ON); Loading Loading
android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterServiceTest.java +4 −3 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class AdapterServiceTest { private @Mock android.app.Application mApplication; private static final int CONTEXT_SWITCH_MS = 100; private static final int GATT_START_TIME_MS = 500; private static final int ONE_SECOND_MS = 1000; private static final int NATIVE_INIT_MS = 8000; private static final int NATIVE_DISABLE_MS = 1000; Loading Loading @@ -198,7 +199,7 @@ public class AdapterServiceTest { invocationNumber + 1, CONTEXT_SWITCH_MS); // Start GATT verify(mMockContext, timeout(CONTEXT_SWITCH_MS).times( verify(mMockContext, timeout(GATT_START_TIME_MS).times( startServiceCalls * invocationNumber + 1)).startService(any()); mAdapterService.addProfile(mMockGattService); mAdapterService.onProfileServiceStateChanged(mMockGattService, BluetoothAdapter.STATE_ON); Loading Loading @@ -328,7 +329,7 @@ public class AdapterServiceTest { CONTEXT_SWITCH_MS); // Start GATT verify(mMockContext, timeout(CONTEXT_SWITCH_MS).times(1)).startService(any()); verify(mMockContext, timeout(GATT_START_TIME_MS).times(1)).startService(any()); mAdapterService.addProfile(mMockGattService); verifyStateChange(BluetoothAdapter.STATE_BLE_TURNING_ON, Loading Loading @@ -395,7 +396,7 @@ public class AdapterServiceTest { CONTEXT_SWITCH_MS); // Start GATT verify(mMockContext, timeout(CONTEXT_SWITCH_MS).times(1)).startService(any()); verify(mMockContext, timeout(GATT_START_TIME_MS).times(1)).startService(any()); mAdapterService.addProfile(mMockGattService); mAdapterService.onProfileServiceStateChanged(mMockGattService, BluetoothAdapter.STATE_ON); Loading