OSDN Git Service

DO NOT MERGE: Add WearDisplayService to the system server;
authorJulius D'souza <jdsouza@google.com>
Wed, 22 Mar 2017 20:27:00 +0000 (13:27 -0700)
committerJulius D'souza <jdsouza@google.com>
Thu, 6 Apr 2017 00:16:39 +0000 (17:16 -0700)
add a SET_DISPLAY_OFFSET permission.

Bug: 36515029
Change-Id: I253766553a507e2ada7d631501d8d32d863a823f

core/res/AndroidManifest.xml
services/java/com/android/server/SystemServer.java

index 6c64247..72bc2c3 100644 (file)
         android:description="@string/permdesc_systemAlertWindow"
         android:protectionLevel="signature|preinstalled|appop|pre23|development" />
 
+    <!-- @hide Allows an application to set display offsets for the screen.
+         This permission is not available to third party applications. -->
+    <permission android:name="android.permission.SET_DISPLAY_OFFSET"
+        android:protectionLevel="signature|privileged|development" />
+
     <!-- ================================== -->
     <!-- Permissions affecting the system wallpaper -->
     <!-- ================================== -->
index 6dd3189..76b73d5 100644 (file)
@@ -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);
           }
         }