From 980ce6a7418dc4fea14dcbe076ad7970557e89c2 Mon Sep 17 00:00:00 2001 From: Soonil Nagarkar Date: Thu, 23 Jan 2020 18:06:31 -0800 Subject: Add DPM API to request location provider enable DPM can currently control the master location toggle, but cannot influence the behavior of individual providers. This adds an API for DPM (or other privileged entities) to request a provider to turn itself on. Practically, this is necessary to allow DPM to control network location, which may be gated by additional consents. This change also renames some internal location code to make clearer the distinction between provider enabled and provider allowed: enabled = location on && allowed Bug: 136219903 Test: CTS tests to be added Change-Id: I05f03c976428f0f5a8a2cf627a84dc9e2baf3e67 --- location/java/com/android/internal/location/ILocationProvider.aidl | 2 ++ .../java/com/android/internal/location/ILocationProviderManager.aidl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'location/java/com') diff --git a/location/java/com/android/internal/location/ILocationProvider.aidl b/location/java/com/android/internal/location/ILocationProvider.aidl index 4246c6cd1004..b7817ff1e1fc 100644 --- a/location/java/com/android/internal/location/ILocationProvider.aidl +++ b/location/java/com/android/internal/location/ILocationProvider.aidl @@ -37,4 +37,6 @@ interface ILocationProvider { @UnsupportedAppUsage oneway void sendExtraCommand(String command, in Bundle extras); + + oneway void requestSetAllowed(boolean allowed); } diff --git a/location/java/com/android/internal/location/ILocationProviderManager.aidl b/location/java/com/android/internal/location/ILocationProviderManager.aidl index 85e18ba5ec4b..439039148773 100644 --- a/location/java/com/android/internal/location/ILocationProviderManager.aidl +++ b/location/java/com/android/internal/location/ILocationProviderManager.aidl @@ -29,7 +29,7 @@ interface ILocationProviderManager { void onSetAdditionalProviderPackages(in List packageNames); @UnsupportedAppUsage - void onSetEnabled(boolean enabled); + void onSetAllowed(boolean allowed); @UnsupportedAppUsage void onSetProperties(in ProviderProperties properties); -- cgit v1.2.3-59-g8ed1b