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

Commit 4c18b585 authored by David Christie's avatar David Christie
Browse files

Remove newly added but deprecated master switch location setting methods.

Change-Id: I5e85a1efafe45cee89e08b97a0dcb016c91fd572
parent 435e7dfd
Loading
Loading
Loading
Loading
+0 −36
Original line number Diff line number Diff line
@@ -4343,22 +4343,6 @@ public final class Settings {
            return isLocationProviderEnabledForUser(cr, provider, UserHandle.myUserId());
        }

        /**
         * Helper method for determining if the location master switch is enabled.
         *
         * TODO: worth retaining this method?
         *
         * @param cr the content resolver to use
         * @return true if the master switch is enabled
         * @deprecated use {@link #getLocationMode(ContentResolver)} != {@link #LOCATION_MODE_OFF}
         * @hide
         */
        @Deprecated
        public static final boolean isLocationMasterSwitchEnabled(ContentResolver cr) {
            int mode = getLocationMode(cr);
            return mode != LOCATION_MODE_OFF;
        }

        /**
         * Helper method for determining if a location provider is enabled.
         * @param cr the content resolver to use
@@ -4388,26 +4372,6 @@ public final class Settings {
            setLocationProviderEnabledForUser(cr, provider, enabled, UserHandle.myUserId());
        }

        /**
         * Thread-safe method for enabling or disabling the location master switch.
         *
         * @param cr the content resolver to use
         * @param enabled true if master switch should be enabled
         * @deprecated use {@link #setLocationMode(ContentResolver, int)} with
         * {@link #LOCATION_MODE_HIGH_ACCURACY}
         * @hide
         */
        @Deprecated
        public static final void setLocationMasterSwitchEnabled(ContentResolver cr,
                boolean enabled) {
            int uid = UserHandle.myUserId();
            synchronized (mLocationSettingsLock) {
                setLocationProviderEnabledForUser(cr, LocationManager.GPS_PROVIDER, enabled, uid);
                setLocationProviderEnabledForUser(cr, LocationManager.NETWORK_PROVIDER, enabled,
                        uid);
            }
        }

        /**
         * Thread-safe method for enabling or disabling a single location provider.
         * @param cr the content resolver to use