Add service for applying per-app compat overrides delivered via Device Config.

This CL only adds the listener on device config changes, package
added/changed/removed support will be added in a follow up.

Bug: 190024878
Test: atest FrameworksMockingServicesTests:AppCompatOverridesServiceTest
Test: atest FrameworksMockingServicesTests:AppCompatOverridesParserTest
Change-Id: Ifda798abca5ed97cd4699dfd1244053ab2796586
This commit is contained in:
tomnatan
2021-06-25 11:41:13 +00:00
parent 7d2d139462
commit 843601987f
6 changed files with 1362 additions and 0 deletions

View File

@@ -377,6 +377,8 @@ public final class SystemServer implements Dumpable {
"com.android.server.connectivity.IpConnectivityMetrics";
private static final String MEDIA_COMMUNICATION_SERVICE_CLASS =
"com.android.server.media.MediaCommunicationService";
private static final String APP_COMPAT_OVERRIDES_SERVICE_CLASS =
"com.android.server.compat.overrides.AppCompatOverridesService$Lifecycle";
private static final String ROLE_SERVICE_CLASS = "com.android.role.RoleService";
private static final String GAME_MANAGER_SERVICE_CLASS =
@@ -2649,6 +2651,10 @@ public final class SystemServer implements Dumpable {
mSystemServiceManager.startService(MEDIA_COMMUNICATION_SERVICE_CLASS);
t.traceEnd();
t.traceBegin("AppCompatOverridesService");
mSystemServiceManager.startService(APP_COMPAT_OVERRIDES_SERVICE_CLASS);
t.traceEnd();
ConcurrentUtils.waitForFutureNoInterrupt(mBlobStoreServiceStart,
START_BLOB_STORE_SERVICE);