diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 8d644e96dca8f..e1b50d6e1f8b0 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2193,6 +2193,9 @@
com.android.devicelockcontroller
+
+
+
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 77542564fa804..233813edaf604 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -4926,6 +4926,7 @@
+
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index d22be9ec01d05..5c6cc9f6ecaa3 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -38,6 +38,7 @@ import android.app.INotificationManager;
import android.app.SystemServiceRegistry;
import android.app.admin.DevicePolicySafetyChecker;
import android.app.usage.UsageStatsManagerInternal;
+import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -2894,6 +2895,27 @@ public final class SystemServer implements Dumpable {
t.traceEnd();
}
+ if (isWatch) {
+ t.traceBegin("StartWearService");
+ String wearServiceComponentNameString =
+ context.getString(R.string.config_wearServiceComponent);
+
+ if (!TextUtils.isEmpty(wearServiceComponentNameString)) {
+ ComponentName wearServiceComponentName = ComponentName.unflattenFromString(
+ wearServiceComponentNameString);
+
+ if (wearServiceComponentName != null) {
+ Intent intent = new Intent();
+ intent.setComponent(wearServiceComponentName);
+ intent.addFlags(Intent.FLAG_DIRECT_BOOT_AUTO);
+ context.startServiceAsUser(intent, UserHandle.SYSTEM);
+ } else {
+ Slog.d(TAG, "Null wear service component name.");
+ }
+ }
+ t.traceEnd();
+ }
+
// Enable airplane mode in safe mode. setAirplaneMode() cannot be called
// earlier as it sends broadcasts to other services.
// TODO: This may actually be too late if radio firmware already started leaking