Add passive location provider.
The passive location provider allows receiving location updates without actually triggering them. This allows an application to receive location updates that are being generated due to other clients of the location manager. Change-Id: Ibf7a96b089c56875d4f62d3210252ae8d9f32768 Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
@@ -71,6 +71,10 @@ public abstract class LocationProvider {
|
||||
* false otherwise.
|
||||
*/
|
||||
public boolean meetsCriteria(Criteria criteria) {
|
||||
// We do not want to match the special passive provider based on criteria.
|
||||
if (LocationManager.PASSIVE_PROVIDER.equals(mName)) {
|
||||
return false;
|
||||
}
|
||||
if ((criteria.getAccuracy() != Criteria.NO_REQUIREMENT) &&
|
||||
(criteria.getAccuracy() < getAccuracy())) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user