commit | ee0db4c35bd4284102e6a59a4426c85b463b7841 | [log] [tgz] |
---|---|---|
author | Lifu Tang <lifu@google.com> | Wed Nov 25 21:44:17 2015 -0800 |
committer | Lifu Tang <lifu@google.com> | Tue Dec 01 15:53:27 2015 -0800 |
tree | 2c07a3a2bbdc4547bde428ff7ab402a9fa4b7fae | |
parent | 0976f3481c220850c067665d132e292888ab4b62 [diff] |
Remembers previous location mode when location off Multipart CL. Must be submitted together with ag/821599 Bug: 25608291 Change-Id: Ibfa39ba9b844421cd86a5aa4266e4389534f16be
diff --git a/src/com/android/settings/location/LocationSettings.java b/src/com/android/settings/location/LocationSettings.java index 38647bd..5a6b366 100644 --- a/src/com/android/settings/location/LocationSettings.java +++ b/src/com/android/settings/location/LocationSettings.java
@@ -395,7 +395,7 @@ @Override public void onSwitchChanged(Switch switchView, boolean isChecked) { if (isChecked) { - setLocationMode(android.provider.Settings.Secure.LOCATION_MODE_HIGH_ACCURACY); + setLocationMode(android.provider.Settings.Secure.LOCATION_MODE_PREVIOUS); } else { setLocationMode(android.provider.Settings.Secure.LOCATION_MODE_OFF); }
diff --git a/src/com/android/settings/widget/SettingsAppWidgetProvider.java b/src/com/android/settings/widget/SettingsAppWidgetProvider.java index 7f1f747..d7cbaae 100644 --- a/src/com/android/settings/widget/SettingsAppWidgetProvider.java +++ b/src/com/android/settings/widget/SettingsAppWidgetProvider.java
@@ -569,7 +569,7 @@ mode = Settings.Secure.LOCATION_MODE_OFF; break; case Settings.Secure.LOCATION_MODE_OFF: - mode = Settings.Secure.LOCATION_MODE_HIGH_ACCURACY; + mode = Settings.Secure.LOCATION_MODE_PREVIOUS; break; } Settings.Secure.putInt(resolver, Settings.Secure.LOCATION_MODE, mode);