Location provider app ops remapping
The platform has the concept of a location provider which could be a plugin implemented by another package. The implementation of a location provider plugin can make calls to APIs that require a location permission, e.g. fusing data from different sources. However, such accesses are counted in app ops as a location access but the accessor is in this case the data source. It is also possible that the package that provides the implementation of a location provider also hosts other funcionality which may need to call APIs that require a location permission. This change allows a location provider to specify app op attribution tags which which could be used when calling location to singal to the OS that the access is for the location providing functionality of the location provider. For location accesses of the provider package that are not related to providing location to the OS the provider can use any other non delcared as location attribution tags. Accesses with the location attribution tags would be counted in app ops but instead of towards the OP_COARSE_LOCATION/OP_FINE_LOCATION the would be counted towards dedicated OP_COARSE_LOCATION_PROVIDER/ OP_FINE_LOCATION_PROVIDER ops. This would allow proper classification while enabling auditability and tracking via the standard app op APIs. <meta-data android:name="android:location_allow_listed_tags" android:value="foo;bar;baz"/> Test: atest android.location.cts.fine.LocationManagerFineTest#testLocationAttributionTagBlaming Bug:179062648 Change-Id: I36739ab42cedc94e1aa7a3bfd3b9aa213f5b3e97
Loading
Please register or sign in to comment