Test: Fix broken tests in RemoteDevicesTest
* Refactor RemoteDevices.java to apply dependency injection design
pattern: User an explicity looper passed through the class constructor
so that a user of the class can choose which thread it runs on
* By default, it runs on the main service thread in AdapterService.java
* During test, it runs on a HanlderThread created during the test
* A TestLooperManager is used to mannually intercept and execute
messages on the handler to guarantee timing consistency
Bug: 67942165
Test: runtest -i -j40 bluetooth; adb shell am instrument -w -e timeout_msec 300000
'com.android.bluetooth.tests/android.support.test.runner.AndroidJUnitRunne
Change-Id: Ieab21b428e74eb84766a7be835d1bf07471743bc
Loading
Please register or sign in to comment