Merge "Avoid CalledFromWrongThreadException in BubbleController" into main
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 541c0f0..2b3ee76 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
@@ -307,16 +307,20 @@
new OneHandedTransitionCallback() {
@Override
public void onStartFinished(Rect bounds) {
- if (mStackView != null) {
- mStackView.onVerticalOffsetChanged(bounds.top);
- }
+ mMainExecutor.execute(() -> {
+ if (mStackView != null) {
+ mStackView.onVerticalOffsetChanged(bounds.top);
+ }
+ });
}
@Override
public void onStopFinished(Rect bounds) {
- if (mStackView != null) {
- mStackView.onVerticalOffsetChanged(bounds.top);
- }
+ mMainExecutor.execute(() -> {
+ if (mStackView != null) {
+ mStackView.onVerticalOffsetChanged(bounds.top);
+ }
+ });
}
});
}