From 4ce799a459e69e8331952fa137e4184590ab41cc Mon Sep 17 00:00:00 2001 From: Damien Bargiacchi Date: Wed, 30 May 2018 13:28:15 -0700 Subject: [PATCH] Start the WearPowerService with the other Wear system services The WearPowerService is in charge of coordinating and keeping track of devices and state concerned with power. Bug: 77293569 Change-Id: Ia40ad44a53ef6872dd7ebefd58e17179126dde92 --- services/java/com/android/server/SystemServer.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 1880e9fa362c6..b4613bfc88933 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -203,6 +203,8 @@ public final class SystemServer { "com.google.android.clockwork.WearConfigManagerService"; private static final String WEAR_CONNECTIVITY_SERVICE_CLASS = "com.android.clockwork.connectivity.WearConnectivityService"; + private static final String WEAR_POWER_SERVICE_CLASS = + "com.android.clockwork.power.WearPowerService"; private static final String WEAR_SIDEKICK_SERVICE_CLASS = "com.google.android.clockwork.sidekick.SidekickService"; private static final String WEAR_DISPLAY_SERVICE_CLASS = @@ -1555,12 +1557,20 @@ public final class SystemServer { mSystemServiceManager.startService(WEAR_CONFIG_SERVICE_CLASS); traceEnd(); + // Must be started before services that depend it, e.g. WearConnectivityService + traceBeginAndSlog("StartWearPowerService"); + mSystemServiceManager.startService(WEAR_POWER_SERVICE_CLASS); + traceEnd(); + traceBeginAndSlog("StartWearConnectivityService"); mSystemServiceManager.startService(WEAR_CONNECTIVITY_SERVICE_CLASS); traceEnd(); - traceBeginAndSlog("StartWearTimeService"); + traceBeginAndSlog("StartWearDisplayService"); mSystemServiceManager.startService(WEAR_DISPLAY_SERVICE_CLASS); + traceEnd(); + + traceBeginAndSlog("StartWearTimeService"); mSystemServiceManager.startService(WEAR_TIME_SERVICE_CLASS); traceEnd();