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
This commit is contained in:
Neil Fuller
2020-04-23 19:31:31 +01:00
parent 790edb871f
commit d82ef68ec6
6 changed files with 21 additions and 4 deletions

View File

@@ -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";

View File

@@ -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.
-->

View File

@@ -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

View File

@@ -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" />

View File

@@ -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";

View File

@@ -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);
}