Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59eaf312 authored by sai.gairuboina-IN009276's avatar sai.gairuboina-IN009276
Browse files

Avoid CalledFromWrongThreadException in BubbleController

Problem: {
            1.CalledFromWrongThreadException can happen if OneHandedTransitionCallback is called from another thread
}

Solution: {
    1. Update the views in UI thread to avoid CalledFromWrongThreadException
}

Bug: 288588813
Change-Id: I23f535f89be9a14491d19dd16ec844d946dc486a
parent 03724475
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -277,16 +277,20 @@ public class BubbleController implements ConfigurationChangeListener {
                new OneHandedTransitionCallback() {
                    @Override
                    public void onStartFinished(Rect bounds) {
                        mMainExecutor.execute(() -> {
                            if (mStackView != null) {
                                mStackView.onVerticalOffsetChanged(bounds.top);
                            }
                        });
                    }

                    @Override
                    public void onStopFinished(Rect bounds) {
                        mMainExecutor.execute(() -> {
                            if (mStackView != null) {
                                mStackView.onVerticalOffsetChanged(bounds.top);
                            }
                        });
                    }
                });
    }