Send MODE_CHANGING broadcast before location mode change.

When location mode is about to change in Settings app, send
MODE_CHANGING broadcast.

Fixes: 28057031
Test: manual
Test: robotests
Change-Id: Id26325520211a8934c1670dfcd12e8d339766308
This commit is contained in:
Maggie
2017-11-21 11:57:30 -08:00
committed by Maggie Wang
parent 839edb1781
commit fab2e2cbaa
4 changed files with 100 additions and 3 deletions

View File

@@ -183,6 +183,17 @@ public class LocationManager {
*/
public static final String MODE_CHANGED_ACTION = "android.location.MODE_CHANGED";
/**
* Broadcast intent action when {@link android.provider.Settings.Secure#LOCATION_MODE} is
* about to be changed through Settings app or Quick Settings.
* For use with the {@link android.provider.Settings.Secure#LOCATION_MODE} API.
* If you're interacting with {@link #isProviderEnabled(String)}, use
* {@link #PROVIDERS_CHANGED_ACTION} instead.
*
* @hide
*/
public static final String MODE_CHANGING_ACTION = "com.android.settings.location.MODE_CHANGING";
/**
* Broadcast intent action indicating that the GPS has either started or
* stopped receiving GPS fixes. An intent extra provides this state as a