From 1185d842f7688cdb93e614c7d84e65a60e039ab7 Mon Sep 17 00:00:00 2001 From: Julius D'souza Date: Wed, 22 Mar 2017 13:27:00 -0700 Subject: [PATCH] DO NOT MERGE: Add WearDisplayService to the system server; add a SET_DISPLAY_OFFSET permission. Bug: 36515029 Change-Id: I253766553a507e2ada7d631501d8d32d863a823f --- core/res/AndroidManifest.xml | 5 +++++ services/java/com/android/server/SystemServer.java | 3 +++ 2 files changed, 8 insertions(+) diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 6c64247c68ce3..72bc2c33c99ed 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1738,6 +1738,11 @@ android:description="@string/permdesc_systemAlertWindow" android:protectionLevel="signature|preinstalled|appop|pre23|development" /> + + + diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 6dd31894f303a..76b73d5130d18 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -160,6 +160,8 @@ public final class SystemServer { "com.google.android.clockwork.ThermalObserver"; private static final String WEAR_CONNECTIVITY_SERVICE_CLASS = "com.google.android.clockwork.connectivity.WearConnectivityService"; + private static final String WEAR_DISPLAY_SERVICE_CLASS = + "com.google.android.clockwork.display.WearDisplayService"; private static final String WEAR_TIME_SERVICE_CLASS = "com.google.android.clockwork.time.WearTimeService"; private static final String ACCOUNT_SERVICE_CLASS = @@ -1184,6 +1186,7 @@ public final class SystemServer { if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) { mSystemServiceManager.startService(WEAR_CONNECTIVITY_SERVICE_CLASS); if (!disableNonCoreServices) { + mSystemServiceManager.startService(WEAR_DISPLAY_SERVICE_CLASS); mSystemServiceManager.startService(WEAR_TIME_SERVICE_CLASS); } }