Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02cde0a2 authored by Lifu Tang's avatar Lifu Tang Committed by Android (Google) Code Review
Browse files

Merge "Remembers previous location mode when location off"

parents 302d5e70 ee0db4c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ public class LocationSettings extends LocationSettingsBase
    @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);
        }
+1 −1
Original line number Diff line number Diff line
@@ -569,7 +569,7 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
                                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);