From fac8783159b337638d728c5f13562cf88de059c5 Mon Sep 17 00:00:00 2001 From: Matthew Ng Date: Fri, 10 Nov 2017 11:27:29 -0800 Subject: [PATCH] Fixes the connection listener wrong thread crash for overview proxy Sending connection callbacks from binder thread crashes any layouts called from the listener. Use the original handler to post connections to fix this crash. Bug: 67957962 Test: manual, reinstall launcher to re-establish the connection Change-Id: I958d86346c41cbf1e9a0dc8bdeae957ec64f8a55 --- .../android/systemui/OverviewProxyService.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java index 0cefe44667747..039e13c41e9a6 100644 --- a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java +++ b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java @@ -25,6 +25,7 @@ import android.graphics.Rect; import android.os.Binder; import android.os.Handler; import android.os.IBinder; +import android.os.Looper; import android.os.RemoteException; import android.os.UserHandle; import android.util.Log; @@ -49,7 +50,7 @@ public class OverviewProxyService implements CallbackController mConnectionCallbacks = new ArrayList<>(); @@ -102,14 +103,14 @@ public class OverviewProxyService implements CallbackController