From 92f16dc6ad656d1de53434015f18537bd349b66a Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sat, 18 Apr 2020 15:58:41 +0100 Subject: [PATCH] LocationSettingsActivity: Account for deprecated location modes LOCATION_MODE_HIGH_ACCURACY, LOCATION_MODE_SENSORS_ONLY and LOCATION_MODE_BATTERY_SAVING are deprecated. Take one further step and refactor the entire logic to call LocationManager#setLocationEnabledForUser(boolean, int) instead of setting location mode and LocationManager#isLocationEnabled() to check if location is enabled. Change-Id: Ibe1930902f6bfff99eb2c2d852ab600620e25f08 --- res/layout/location_settings.xml | 72 +------- res/values/strings.xml | 6 +- .../setupwizard/LocationSettingsActivity.java | 163 ++---------------- 3 files changed, 14 insertions(+), 227 deletions(-) diff --git a/res/layout/location_settings.xml b/res/layout/location_settings.xml index 4e170023..80faaa31 100644 --- a/res/layout/location_settings.xml +++ b/res/layout/location_settings.xml @@ -1,7 +1,7 @@