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

Commit 3bacac21 authored by Soonil Nagarkar's avatar Soonil Nagarkar
Browse files

Remove LOCATION_PROVIDERS_ALLOWED completely

Test: presubmits only
Change-Id: I68d7c53c0edc2df0ab3642451aa1ee84b03d7dcc
parent 4aad7e9d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -6333,9 +6333,10 @@ public final class Settings {
         * Comma-separated list of location providers that are enabled. Do not rely on this value
         * being present or correct, or on ContentObserver notifications on the corresponding Uri.
         *
         * @deprecated The preferred methods for checking provider status and listening for changes
         * are via {@link LocationManager#isProviderEnabled(String)} and
         * {@link LocationManager#PROVIDERS_CHANGED_ACTION}.
         * @deprecated This setting no longer exists from Android S onwards as it no longer is
         * capable of realistically reflecting location settings. Use {@link
         * LocationManager#isProviderEnabled(String)} or {@link LocationManager#isLocationEnabled()}
         * instead.
         */
        @Deprecated
        public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
+8 −1
Original line number Diff line number Diff line
@@ -3342,7 +3342,7 @@ public class SettingsProvider extends ContentProvider {
        }

        private final class UpgradeController {
            private static final int SETTINGS_VERSION = 193;
            private static final int SETTINGS_VERSION = 194;

            private final int mUserId;

@@ -4754,6 +4754,13 @@ public class SettingsProvider extends ContentProvider {
                    currentVersion = 193;
                }

                if (currentVersion == 193) {
                    // Version 193: remove obsolete LOCATION_PROVIDERS_ALLOWED settings
                    getSecureSettingsLocked(userId).deleteSettingLocked(
                            Secure.LOCATION_PROVIDERS_ALLOWED);
                    currentVersion = 194;
                }

                // vXXX: Add new settings above this point.

                if (currentVersion != newVersion) {