Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11923,6 +11923,7 @@ package android.location { field public static final java.lang.String KEY_PROVIDER_ENABLED = "providerEnabled"; field public static final java.lang.String KEY_PROXIMITY_ENTERING = "entering"; field public static final java.lang.String KEY_STATUS_CHANGED = "status"; field public static final java.lang.String MODE_CHANGED_ACTION = "android.location.MODE_CHANGED"; field public static final java.lang.String NETWORK_PROVIDER = "network"; field public static final java.lang.String PASSIVE_PROVIDER = "passive"; field public static final java.lang.String PROVIDERS_CHANGED_ACTION = "android.location.PROVIDERS_CHANGED"; core/res/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,7 @@ <protected-broadcast android:name="android.location.GPS_ENABLED_CHANGE" /> <protected-broadcast android:name="android.location.PROVIDERS_CHANGED" /> <protected-broadcast android:name="android.location.MODE_CHANGED" /> <protected-broadcast android:name="android.location.GPS_FIX_CHANGE" /> <protected-broadcast android:name="android.net.proxy.PAC_REFRESH" /> Loading location/java/android/location/LocationManager.java +13 −1 Original line number Diff line number Diff line Loading @@ -152,11 +152,23 @@ public class LocationManager { /** * Broadcast intent action when the configured location providers * change. * change. If you're interacting with the * {@link android.provider.Settings.Secure#LOCATION_MODE} API, * use {@link #MODE_CHANGED_ACTION} instead. */ public static final String PROVIDERS_CHANGED_ACTION = "android.location.PROVIDERS_CHANGED"; /** * Broadcast intent action when {@link android.provider.Settings.Secure#LOCATION_MODE} changes. * If you're interacting with provider-based APIs such as {@link #getProviders(boolean)}, you * use {@link #PROVIDERS_CHANGED_ACTION} instead. * * In the future, there may be mode changes that do not result in * {@link #PROVIDERS_CHANGED_ACTION} broadcasts. */ public static final String MODE_CHANGED_ACTION = "android.location.MODE_CHANGED"; /** * Broadcast intent action indicating that the GPS has either started or * stopped receiving GPS fixes. An intent extra provides this state as a Loading services/java/com/android/server/LocationManagerService.java +2 −0 Original line number Diff line number Diff line Loading @@ -1156,6 +1156,8 @@ public class LocationManagerService extends ILocationManager.Stub { if (changesMade) { mContext.sendBroadcastAsUser(new Intent(LocationManager.PROVIDERS_CHANGED_ACTION), UserHandle.ALL); mContext.sendBroadcastAsUser(new Intent(LocationManager.MODE_CHANGED_ACTION), UserHandle.ALL); } } Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11923,6 +11923,7 @@ package android.location { field public static final java.lang.String KEY_PROVIDER_ENABLED = "providerEnabled"; field public static final java.lang.String KEY_PROXIMITY_ENTERING = "entering"; field public static final java.lang.String KEY_STATUS_CHANGED = "status"; field public static final java.lang.String MODE_CHANGED_ACTION = "android.location.MODE_CHANGED"; field public static final java.lang.String NETWORK_PROVIDER = "network"; field public static final java.lang.String PASSIVE_PROVIDER = "passive"; field public static final java.lang.String PROVIDERS_CHANGED_ACTION = "android.location.PROVIDERS_CHANGED";
core/res/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,7 @@ <protected-broadcast android:name="android.location.GPS_ENABLED_CHANGE" /> <protected-broadcast android:name="android.location.PROVIDERS_CHANGED" /> <protected-broadcast android:name="android.location.MODE_CHANGED" /> <protected-broadcast android:name="android.location.GPS_FIX_CHANGE" /> <protected-broadcast android:name="android.net.proxy.PAC_REFRESH" /> Loading
location/java/android/location/LocationManager.java +13 −1 Original line number Diff line number Diff line Loading @@ -152,11 +152,23 @@ public class LocationManager { /** * Broadcast intent action when the configured location providers * change. * change. If you're interacting with the * {@link android.provider.Settings.Secure#LOCATION_MODE} API, * use {@link #MODE_CHANGED_ACTION} instead. */ public static final String PROVIDERS_CHANGED_ACTION = "android.location.PROVIDERS_CHANGED"; /** * Broadcast intent action when {@link android.provider.Settings.Secure#LOCATION_MODE} changes. * If you're interacting with provider-based APIs such as {@link #getProviders(boolean)}, you * use {@link #PROVIDERS_CHANGED_ACTION} instead. * * In the future, there may be mode changes that do not result in * {@link #PROVIDERS_CHANGED_ACTION} broadcasts. */ public static final String MODE_CHANGED_ACTION = "android.location.MODE_CHANGED"; /** * Broadcast intent action indicating that the GPS has either started or * stopped receiving GPS fixes. An intent extra provides this state as a Loading
services/java/com/android/server/LocationManagerService.java +2 −0 Original line number Diff line number Diff line Loading @@ -1156,6 +1156,8 @@ public class LocationManagerService extends ILocationManager.Stub { if (changesMade) { mContext.sendBroadcastAsUser(new Intent(LocationManager.PROVIDERS_CHANGED_ACTION), UserHandle.ALL); mContext.sendBroadcastAsUser(new Intent(LocationManager.MODE_CHANGED_ACTION), UserHandle.ALL); } } Loading