Merge "Don't return passive location provider unless app has fine permissions."
This commit is contained in:
committed by
Android (Google) Code Review
commit
4b9f74a2d3
@@ -561,7 +561,8 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
|
||||
}
|
||||
|
||||
private boolean isAllowedProviderSafe(String provider) {
|
||||
if (LocationManager.GPS_PROVIDER.equals(provider)
|
||||
if ((LocationManager.GPS_PROVIDER.equals(provider)
|
||||
|| LocationManager.PASSIVE_PROVIDER.equals(provider))
|
||||
&& (mContext.checkCallingOrSelfPermission(ACCESS_FINE_LOCATION)
|
||||
!= PackageManager.PERMISSION_GRANTED)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user