From a416ee18a682d75532da9b62a2a2211b090a4b97 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 3 Mar 2021 17:23:55 -0800 Subject: [PATCH] Use the right executor for callbacks in Shell code Bug: 181814254 Test: atest SystemUITests Change-Id: I60a196360f9ff435ce99cb5e1d42d3da400d1206 --- .../src/com/android/wm/shell/bubbles/BubbleController.java | 4 ++++ .../src/com/android/wm/shell/bubbles/BubbleExpandedView.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java index 1320780bfb8fc..d31e637b778ee 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java @@ -327,6 +327,10 @@ public class BubbleController { return mImpl; } + public ShellExecutor getMainExecutor() { + return mMainExecutor; + } + /** * Hides the current input method, wherever it may be focused, via InputMethodManagerInternal. */ diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java index 2f31acd41408d..9ef3fb54fb356 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java @@ -340,7 +340,7 @@ public class BubbleExpandedView extends LinearLayout { mSettingsIcon.setVisibility(GONE); } else { mTaskView = new TaskView(mContext, mController.getTaskOrganizer()); - mTaskView.setListener(mContext.getMainExecutor(), mTaskViewListener); + mTaskView.setListener(mController.getMainExecutor(), mTaskViewListener); mExpandedViewContainer.addView(mTaskView); bringChildToFront(mTaskView); }