Loading android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterServiceTest.java +6 −5 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.os.Bundle; import android.os.Looper; import android.os.PowerManager; import android.os.Process; import android.os.RemoteException; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; Loading Loading @@ -138,7 +139,7 @@ public class AdapterServiceTest { private static final int CONTEXT_SWITCH_MS = 100; private static final int PROFILE_SERVICE_TOGGLE_TIME_MS = 200; private static final int GATT_START_TIME_MS = 500; private static final int GATT_START_TIME_MS = 1000; 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 @@ -350,10 +351,10 @@ public class AdapterServiceTest { private void verifyStateChange(int prevState, int currState, int callNumber, int timeoutMs) { try { verify(mIBluetoothCallback, timeout(timeoutMs) .times(callNumber)).onBluetoothStateChange(prevState, currState); } catch (Exception e) { // the mocked onBluetoothStateChange doesn't throw exceptions verify(mIBluetoothCallback, timeout(timeoutMs).times(callNumber)) .onBluetoothStateChange(prevState, currState); } catch (RemoteException e) { // the mocked onBluetoothStateChange doesn't throw RemoteException } } Loading Loading
android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterServiceTest.java +6 −5 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.os.Bundle; import android.os.Looper; import android.os.PowerManager; import android.os.Process; import android.os.RemoteException; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; Loading Loading @@ -138,7 +139,7 @@ public class AdapterServiceTest { private static final int CONTEXT_SWITCH_MS = 100; private static final int PROFILE_SERVICE_TOGGLE_TIME_MS = 200; private static final int GATT_START_TIME_MS = 500; private static final int GATT_START_TIME_MS = 1000; 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 @@ -350,10 +351,10 @@ public class AdapterServiceTest { private void verifyStateChange(int prevState, int currState, int callNumber, int timeoutMs) { try { verify(mIBluetoothCallback, timeout(timeoutMs) .times(callNumber)).onBluetoothStateChange(prevState, currState); } catch (Exception e) { // the mocked onBluetoothStateChange doesn't throw exceptions verify(mIBluetoothCallback, timeout(timeoutMs).times(callNumber)) .onBluetoothStateChange(prevState, currState); } catch (RemoteException e) { // the mocked onBluetoothStateChange doesn't throw RemoteException } } Loading