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

Commit 22ee4ac2 authored by Winson Chung's avatar Winson Chung
Browse files

Fix crash when creating overview proxy service from background thread

Bug: 80132561
Test: Switch users, ensure that the overview service connects without
      crashing and updates accordingly from the interaction flags from
      the new launcher

Change-Id: Ia7f3fd77f6bd8fd1f2aeacb0956ce1a37db04428
parent 553fc8b8
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -123,10 +123,16 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
     */
    class TaskStackListenerImpl extends SysUiTaskStackChangeListener {

        private OverviewProxyService mOverviewProxyService;

        public TaskStackListenerImpl() {
            mOverviewProxyService = Dependency.get(OverviewProxyService.class);
        }

        @Override
        public void onTaskStackChangedBackground() {
            // Skip background preloading recents in SystemUI if the overview services is bound
            if (Dependency.get(OverviewProxyService.class).isEnabled()) {
            if (mOverviewProxyService.isEnabled()) {
                return;
            }