OSDN Git Service

Remove a Handler constructor parameter Looper in TIS
authorYoungsang Cho <youngsang@google.com>
Wed, 6 Aug 2014 06:35:48 +0000 (15:35 +0900)
committerYoungsang Cho <youngsang@google.com>
Wed, 6 Aug 2014 06:44:35 +0000 (15:44 +0900)
getMainLooper() returns null in the variable initialization phase.

Change-Id: Iebe52eac8955c0a8394501575f90ff6f2825451c

media/java/android/media/tv/TvInputService.java

index 3a188ab..d6d2d48 100644 (file)
@@ -92,7 +92,7 @@ public abstract class TvInputService extends Service {
      * Handler instance to handle request from TV Input Manager Service. Should be run in the main
      * looper to be synchronously run with {@code Session.mHandler}.
      */
-    private final Handler mServiceHandler = new ServiceHandler(getMainLooper());
+    private Handler mServiceHandler = new ServiceHandler();
     private final RemoteCallbackList<ITvInputServiceCallback> mCallbacks =
             new RemoteCallbackList<ITvInputServiceCallback>();
 
@@ -1167,10 +1167,6 @@ public abstract class TvInputService extends Service {
         private static final int DO_ADD_HDMI_CEC_TV_INPUT = 5;
         private static final int DO_REMOVE_HDMI_CEC_TV_INPUT = 6;
 
-        public ServiceHandler(Looper looper) {
-            super(looper);
-        }
-
         private void broadcastAddHardwareTvInput(int deviceId, TvInputInfo inputInfo) {
             int n = mCallbacks.beginBroadcast();
             for (int i = 0; i < n; ++i) {