OSDN Git Service

Move CompanionDeviceManagerService to a place of its own
authorEugene Susla <eugenesusla@google.com>
Tue, 18 Apr 2017 17:56:37 +0000 (10:56 -0700)
committerEugene Susla <eugenesusla@google.com>
Tue, 18 Apr 2017 19:00:11 +0000 (12:00 -0700)
Fixes: 37473452
Test: Ensure companion devi9ce functionality still works
Change-Id: I89624217373b3e77296c71f9429387d99d15e236

services/Android.mk
services/companion/Android.mk [new file with mode: 0644]
services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java [moved from services/print/java/com/android/server/print/CompanionDeviceManagerService.java with 99% similarity]
services/java/com/android/server/SystemServer.java

index a4c891b..5c863b0 100644 (file)
@@ -27,6 +27,7 @@ services := \
     appwidget \
     autofill \
     backup \
+    companion \
     coverage\
     devicepolicy \
     midi \
diff --git a/services/companion/Android.mk b/services/companion/Android.mk
new file mode 100644 (file)
index 0000000..be48761
--- /dev/null
@@ -0,0 +1,12 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := services.companion
+
+LOCAL_SRC_FILES += \
+      $(call all-java-files-under,java)
+
+LOCAL_JAVA_LIBRARIES := services.core
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
@@ -15,7 +15,7 @@
  */
 
 
-package com.android.server.print;
+package com.android.server.companion;
 
 import static com.android.internal.util.CollectionUtils.size;
 import static com.android.internal.util.Preconditions.checkArgument;
@@ -81,7 +81,6 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.function.Function;
 
-//TODO move to own package!
 //TODO onStop schedule unbind in 5 seconds
 //TODO make sure APIs are only callable from currently focused app
 //TODO schedule stopScan on activity destroy(except if configuration change)
index 42a9232..978803d 100644 (file)
@@ -159,7 +159,7 @@ public final class SystemServer {
     private static final String PRINT_MANAGER_SERVICE_CLASS =
             "com.android.server.print.PrintManagerService";
     private static final String COMPANION_DEVICE_MANAGER_SERVICE_CLASS =
-            "com.android.server.print.CompanionDeviceManagerService";
+            "com.android.server.companion.CompanionDeviceManagerService";
     private static final String USB_SERVICE_CLASS =
             "com.android.server.usb.UsbService$Lifecycle";
     private static final String MIDI_SERVICE_CLASS =