diff options
| author | Neil Fuller <nfuller@google.com> | 2020-04-23 19:31:31 +0100 |
|---|---|---|
| committer | Neil Fuller <nfuller@google.com> | 2020-09-30 14:23:07 +0100 |
| commit | d82ef68ec6ce2e4e90ae5e28298a14b1df3cd1c2 (patch) | |
| tree | 8b63119e58ce70b4c34d1bf05d93e2a182c27778 | |
| parent | 790edb871fc3e1e2b44be5e70c747a0b2c31d5e9 (diff) | |
Add config for the LocationTimeZoneManagerService
Add config for the LocationTimeZoneManagerService to enable the
binder-based LocationTimeZoneProviderProxy implementation.
CTS-Coverage-Bug: 169748177
Bug: 152744911
Bug: 149014708
Test: Build / treehugger only
Change-Id: I723d4fbbf6eafca8370fdf2b76518338c439a9e9
| -rw-r--r-- | api/system-current.txt | 1 | ||||
| -rw-r--r-- | core/res/AndroidManifest.xml | 7 | ||||
| -rw-r--r-- | core/res/res/values/config.xml | 10 | ||||
| -rw-r--r-- | core/res/res/values/symbols.xml | 2 | ||||
| -rw-r--r-- | non-updatable-api/system-current.txt | 1 | ||||
| -rw-r--r-- | services/core/java/com/android/server/location/timezone/LocationTimeZoneManagerService.java | 4 |
6 files changed, 21 insertions, 4 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 949a54a781db..ac7b876354ed 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -95,6 +95,7 @@ package android { field public static final String INJECT_EVENTS = "android.permission.INJECT_EVENTS"; field public static final String INSTALL_DYNAMIC_SYSTEM = "android.permission.INSTALL_DYNAMIC_SYSTEM"; field public static final String INSTALL_GRANT_RUNTIME_PERMISSIONS = "android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS"; + field public static final String INSTALL_LOCATION_TIME_ZONE_PROVIDER = "android.permission.INSTALL_LOCATION_TIME_ZONE_PROVIDER"; field public static final String INSTALL_PACKAGE_UPDATES = "android.permission.INSTALL_PACKAGE_UPDATES"; field public static final String INSTALL_SELF_UPDATES = "android.permission.INSTALL_SELF_UPDATES"; field public static final String INTENT_FILTER_VERIFICATION_AGENT = "android.permission.INTENT_FILTER_VERIFICATION_AGENT"; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index cc75dbb2e85a..25b8d24e8906 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1553,6 +1553,13 @@ <permission android:name="android.permission.INSTALL_LOCATION_PROVIDER" android:protectionLevel="signature|privileged" /> + <!-- @SystemApi @hide Allows an application to install a LocationTimeZoneProvider into the + LocationTimeZoneProviderManager. + <p>Not for use by third-party applications. + --> + <permission android:name="android.permission.INSTALL_LOCATION_TIME_ZONE_PROVIDER" + android:protectionLevel="signature|privileged" /> + <!-- @SystemApi @hide Allows HDMI-CEC service to access device and configuration files. This should only be used by HDMI-CEC service. --> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 89e348ab57b3..a6ed6f5a3ed4 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1583,6 +1583,16 @@ config_timeZoneRulesUpdateTrackingEnabled are true.] --> <integer name="config_timeZoneRulesCheckRetryCount">5</integer> + <!-- Whether to enable primary location time zone provider overlay which allows the primary + location time zone provider to be replaced by an app at run-time. When disabled, only the + config_primaryLocationTimeZoneProviderPackageName package will be searched for the primary + location time zone provider, otherwise any system package is eligible. Anyone who wants to + disable the overlay mechanism can set it to false. --> + <bool name="config_enablePrimaryLocationTimeZoneOverlay" translatable="false">false</bool> + <!-- Package name providing the primary location time zone provider. Used only when + config_enablePrimaryLocationTimeZoneOverlay is false. --> + <string name="config_primaryLocationTimeZoneProviderPackageName" translatable="false">@null</string> + <!-- Whether to enable network location overlay which allows network location provider to be replaced by an app at run-time. When disabled, only the config_networkLocationProviderPackageName package will be searched for network location diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 996e1f9fde9a..401a303249ca 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2159,6 +2159,8 @@ <java-symbol type="string" name="config_defaultNetworkScorerPackageName" /> <java-symbol type="string" name="config_persistentDataPackageName" /> <java-symbol type="string" name="config_deviceConfiguratorPackageName" /> + <java-symbol type="bool" name="config_enablePrimaryLocationTimeZoneOverlay" /> + <java-symbol type="string" name="config_primaryLocationTimeZoneProviderPackageName" /> <java-symbol type="layout" name="resolver_list" /> <java-symbol type="id" name="resolver_list" /> diff --git a/non-updatable-api/system-current.txt b/non-updatable-api/system-current.txt index 916e21f43f61..db1981b8f507 100644 --- a/non-updatable-api/system-current.txt +++ b/non-updatable-api/system-current.txt @@ -95,6 +95,7 @@ package android { field public static final String INJECT_EVENTS = "android.permission.INJECT_EVENTS"; field public static final String INSTALL_DYNAMIC_SYSTEM = "android.permission.INSTALL_DYNAMIC_SYSTEM"; field public static final String INSTALL_GRANT_RUNTIME_PERMISSIONS = "android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS"; + field public static final String INSTALL_LOCATION_TIME_ZONE_PROVIDER = "android.permission.INSTALL_LOCATION_TIME_ZONE_PROVIDER"; field public static final String INSTALL_PACKAGE_UPDATES = "android.permission.INSTALL_PACKAGE_UPDATES"; field public static final String INSTALL_SELF_UPDATES = "android.permission.INSTALL_SELF_UPDATES"; field public static final String INTENT_FILTER_VERIFICATION_AGENT = "android.permission.INTENT_FILTER_VERIFICATION_AGENT"; diff --git a/services/core/java/com/android/server/location/timezone/LocationTimeZoneManagerService.java b/services/core/java/com/android/server/location/timezone/LocationTimeZoneManagerService.java index 238f999ff8a6..7d8120378567 100644 --- a/services/core/java/com/android/server/location/timezone/LocationTimeZoneManagerService.java +++ b/services/core/java/com/android/server/location/timezone/LocationTimeZoneManagerService.java @@ -177,9 +177,6 @@ public class LocationTimeZoneManagerService extends Binder { if (isInSimulationMode(PRIMARY_PROVIDER_NAME)) { proxy = new SimulatedLocationTimeZoneProviderProxy(mContext, mThreadingDomain); } else { - // TODO Uncomment this code in a later commit. - throw new UnsupportedOperationException("Not implemented"); - /* proxy = RealLocationTimeZoneProviderProxy.createAndRegister( mContext, mThreadingDomain, @@ -187,7 +184,6 @@ public class LocationTimeZoneManagerService extends Binder { com.android.internal.R.bool.config_enablePrimaryLocationTimeZoneOverlay, com.android.internal.R.string.config_primaryLocationTimeZoneProviderPackageName ); - */ } return createLocationTimeZoneProvider(PRIMARY_PROVIDER_NAME, proxy); } |
