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

Commit dc6a1c4b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Propagate location mode properly from SettingsProvider"

parents a937c5b7 8e49825e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -521,6 +521,7 @@ package android.provider {
  }

  public static final class Settings.Global extends android.provider.Settings.NameValueTable {
    field public static final java.lang.String LOCATION_GLOBAL_KILL_SWITCH = "location_global_kill_switch";
    field public static final java.lang.String LOW_POWER_MODE = "low_power";
    field public static final java.lang.String USE_OPEN_WIFI_PACKAGE = "use_open_wifi_package";
  }
+1 −0
Original line number Diff line number Diff line
@@ -11159,6 +11159,7 @@ public final class Settings {
         *
         * @hide
         */
        @TestApi
        public static final String LOCATION_GLOBAL_KILL_SWITCH =
                "location_global_kill_switch";

+5 −2
Original line number Diff line number Diff line
@@ -2892,11 +2892,14 @@ public class SettingsProvider extends ContentProvider {
            for (int i = 0; i < users.size(); i++) {
                final int userId = users.get(i).id;

                // Do we have to increment the generation for users that are not running?
                // Yeah let's assume so...
                final int key = makeKey(SETTINGS_TYPE_SECURE, userId);
                mGenerationRegistry.incrementGeneration(key);

                if (!mUserManager.isUserRunning(UserHandle.of(userId))) {
                    continue;
                }

                final int key = makeKey(SETTINGS_TYPE_GLOBAL, userId);
                final Uri uri = getNotificationUriFor(key, Secure.LOCATION_PROVIDERS_ALLOWED);

                mHandler.obtainMessage(MyHandler.MSG_NOTIFY_URI_CHANGED,