From 8865275ebcf2cb1078917de78fa1184ce7eaa902 Mon Sep 17 00:00:00 2001 From: Ji-Hwan Lee Date: Sat, 21 Jun 2014 05:54:38 +0900 Subject: DO NOT MERGE: Use main looper for PackageMonitor This is to work-around the issue that TvInputManagerService does not receive package change callbacks from PackageMonitor. In ATV emulator build, the background thread is blocked at android_location_GpsLocationProvider_init(), and PackageMonitor that uses background thread fails to handle broadcast intent. Bug: 15767453 Change-Id: Ieef00cedf1357d57e4217ec202d50655ba3aa35a --- services/core/java/com/android/server/tv/TvInputManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java index acd79ed61630..7a95823f770e 100644 --- a/services/core/java/com/android/server/tv/TvInputManagerService.java +++ b/services/core/java/com/android/server/tv/TvInputManagerService.java @@ -132,7 +132,7 @@ public final class TvInputManagerService extends SystemService { } } }; - monitor.register(mContext, null, UserHandle.ALL, true); + monitor.register(mContext, Looper.getMainLooper(), UserHandle.ALL, true); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(Intent.ACTION_USER_SWITCHED); -- cgit v1.2.3-59-g8ed1b