summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/SystemServer.java
diff options
context:
space:
mode:
authoratrost <atrost@google.com>2019-08-15 16:53:01 +0100
committerAnna Trostanetski <atrost@google.com>2019-08-19 16:10:31 +0000
commit8266ae32ba930cbad0a71443d6dbc225656c7a41 (patch)
tree67a6271be6509065f440884c87d75d9e8926594a /services/java/com/android/server/SystemServer.java
parent6ef5b6c183d44a3e1d99e430253d75fd9f459d47 (diff)
Start platform compat service eariler.
It's needed by ActivityManager and PackageManager. Also use a constant in Context for the name. Test: flashed device with ag/9025572 and ag/9204795 and the platfrom compat was accessible. Bug: 137769727 Change-Id: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6 Merged-In: Ie1130a3f0bdd1769fe0755db0089702ea64d9db6
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
-rw-r--r--services/java/com/android/server/SystemServer.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 1919f505f40a..6f7af3f49b57 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -635,6 +635,13 @@ public final class SystemServer {
SystemServerInitThreadPool.get().submit(SystemConfig::getInstance, TAG_SYSTEM_CONFIG);
traceEnd();
+ // Platform compat service is used by ActivityManagerService, PackageManagerService, and
+ // possibly others in the future. b/135010838.
+ traceBeginAndSlog("PlatformCompat");
+ ServiceManager.addService(Context.PLATFORM_COMPAT_SERVICE,
+ new PlatformCompat(mSystemContext));
+ traceEnd();
+
// Wait for installd to finish starting up so that it has a chance to
// create critical directories such as /data/user with the appropriate
// permissions. We need this to complete before we initialize other services.
@@ -1091,10 +1098,6 @@ public final class SystemServer {
SignedConfigService.registerUpdateReceiver(mSystemContext);
traceEnd();
- traceBeginAndSlog("PlatformCompat");
- ServiceManager.addService("platform_compat", new PlatformCompat(context));
- traceEnd();
-
} catch (RuntimeException e) {
Slog.e("System", "******************************************");
Slog.e("System", "************ Failure starting core service", e);