Location is required for Wifi Direct so if it is not enabled we disable the preference. Additionally, this fixes some minor update issues in Wifi Wakeup that was also affecting wifi p2p. Basically they weren't updating when location settings changed until you left the screen and came back. Now they do. Test: robotests, manual Bug: 120552223 Change-Id: Ibd386fcfbef881cae3d871152675f1cab5e4a041
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.