Update wifi p2p to direct user to enable location

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
This commit is contained in:
Salvador Martinez
2019-04-01 18:17:04 -07:00
parent 44427259e8
commit d25ba81028
5 changed files with 77 additions and 7 deletions

View File

@@ -74,7 +74,8 @@ public class ConfigureWifiSettings extends DashboardFragment {
@Override
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
mWifiWakeupPreferenceController = new WifiWakeupPreferenceController(context, this);
mWifiWakeupPreferenceController = new WifiWakeupPreferenceController(context, this,
getSettingsLifecycle());
mUseOpenWifiPreferenceController = new UseOpenWifiPreferenceController(context, this,
getSettingsLifecycle());
final WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);