In previous code there are two main issues: 1. It listens to update from both WIFI_AP_STATE_CHANGED_ACTION and ACTION_TETHER_STATE_CHANGED. It is unnecessary because they provides same info(whether wifi hotspot is enabled, enabling...) 2. New API softApCallback already covers the WIFI_AP_STATE_CHANGED_ACTION, so we don't need this broadcast anymore. This cl fixes those two issues by cleaning up BroadcastReceiver and update the tests. Bug: 72702183 Test: RunSettingsRoboTests Change-Id: I21c2818e0f0185172f34447a1716dc47ee065e23
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.