Merge "Remove unused broadcasts from GNSS"

This commit is contained in:
Soonil Nagarkar
2019-03-07 04:48:02 +00:00
committed by Android (Google) Code Review
3 changed files with 0 additions and 46 deletions

View File

@@ -398,10 +398,8 @@
<protected-broadcast android:name="android.intent.action.SUB_DEFAULT_CHANGED" />
<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" />
<protected-broadcast android:name="android.telecom.action.DEFAULT_DIALER_CHANGED" />

View File

@@ -165,17 +165,6 @@ public class LocationManager {
*/
public static final String KEY_LOCATION_CHANGED = "location";
/**
* Broadcast intent action indicating that the GPS has either been
* enabled or disabled. An intent extra provides this state as a boolean,
* where {@code true} means enabled.
* @see #EXTRA_GPS_ENABLED
*
* @hide
*/
public static final String GPS_ENABLED_CHANGE_ACTION =
"android.location.GPS_ENABLED_CHANGE";
/**
* Broadcast intent action when the set of enabled location providers changes. To check the
* status of a provider, use {@link #isProviderEnabled(String)}.
@@ -201,26 +190,6 @@ public class LocationManager {
@Deprecated
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
* boolean, where {@code true} means that the GPS is actively receiving fixes.
* @see #EXTRA_GPS_ENABLED
*
* @hide
*/
public static final String GPS_FIX_CHANGE_ACTION =
"android.location.GPS_FIX_CHANGE";
/**
* The lookup key for a boolean that indicates whether GPS is enabled or
* disabled. {@code true} means GPS is enabled. Retrieve it with
* {@link android.content.Intent#getBooleanExtra(String,boolean)}.
*
* @hide
*/
public static final String EXTRA_GPS_ENABLED = "enabled";
/**
* Broadcast intent action indicating that a high power location requests
* has either started or stopped being active. The current state of

View File

@@ -1319,10 +1319,6 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
mAlarmManager.cancel(mTimeoutIntent);
}
// send an intent to notify that the GPS is receiving fixes.
Intent intent = new Intent(LocationManager.GPS_FIX_CHANGE_ACTION);
intent.putExtra(LocationManager.EXTRA_GPS_ENABLED, true);
mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
updateStatus(LocationProvider.AVAILABLE);
}
@@ -1354,11 +1350,6 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
if (wasNavigating != mNavigating) {
mGnssStatusListenerHelper.onStatusChanged(mNavigating);
// send an intent to notify that the GPS has been enabled or disabled
Intent intent = new Intent(LocationManager.GPS_ENABLED_CHANGE_ACTION);
intent.putExtra(LocationManager.EXTRA_GPS_ENABLED, mNavigating);
mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
}
}
@@ -1438,10 +1429,6 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
if (mNavigating && mStatus == LocationProvider.AVAILABLE && mLastFixTime > 0 &&
SystemClock.elapsedRealtime() - mLastFixTime > RECENT_FIX_TIMEOUT) {
// send an intent to notify that the GPS is no longer receiving fixes.
Intent intent = new Intent(LocationManager.GPS_FIX_CHANGE_ACTION);
intent.putExtra(LocationManager.EXTRA_GPS_ENABLED, false);
mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
updateStatus(LocationProvider.TEMPORARILY_UNAVAILABLE);
}
}