diff options
author | Maggie <yiranwang@google.com> | 2018-01-04 15:35:49 -0800 |
---|---|---|
committer | Maggie <yiranwang@google.com> | 2018-01-22 21:23:28 -0800 |
commit | 85e2f61b2d349125e4bd5d7677cfa09ba09983ca (patch) | |
tree | d34a1efe36d6408a466db643cbd3fa01ecf9abbb /src/com/android/settings/location/LocationSwitchBarController.java | |
parent | aaf307e71d3650db2818bfc9ac9943ff9dc65f1f (diff) | |
download | packages_apps_Settings-85e2f61b2d349125e4bd5d7677cfa09ba09983ca.tar.gz packages_apps_Settings-85e2f61b2d349125e4bd5d7677cfa09ba09983ca.tar.bz2 packages_apps_Settings-85e2f61b2d349125e4bd5d7677cfa09ba09983ca.zip |
Remove location_modes_previous references
1. Remove reference to LOCATION_MODE_PREVIOUS.
2. Add setLocationEnabled method in LocationEnabler. When turning location
ON/OFF from Settings app or Quick Settings, use
LocationEnabler.setLocationEnabled() instead of setLocationMode().
3. Change unit tests accordingly.
Bug: 70990911
Test: Robolectric
Test: Manual
Change-Id: Ic02ef3cd02f9aa7d2ef18697b19b507575aaf5c2
Diffstat (limited to 'src/com/android/settings/location/LocationSwitchBarController.java')
-rw-r--r-- | src/com/android/settings/location/LocationSwitchBarController.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/com/android/settings/location/LocationSwitchBarController.java b/src/com/android/settings/location/LocationSwitchBarController.java index 6522dc75be..ca1932f9cc 100644 --- a/src/com/android/settings/location/LocationSwitchBarController.java +++ b/src/com/android/settings/location/LocationSwitchBarController.java @@ -96,9 +96,6 @@ public class LocationSwitchBarController implements SwitchBar.OnSwitchChangeList */ @Override public void onSwitchChanged(Switch switchView, boolean isChecked) { - mLocationEnabler.setLocationMode(isChecked - ? android.provider.Settings.Secure.LOCATION_MODE_PREVIOUS - : android.provider.Settings.Secure.LOCATION_MODE_OFF); + mLocationEnabler.setLocationEnabled(isChecked); } - } |