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

Commit 2799eca2 authored by Winson's avatar Winson
Browse files

Removing boot completed check before hiding Recents.

- This was legacy from old code that was calling sendBroadcast(), and 
  with the event bus, we no longer need to wait until boot is completed
  before launching home.

Bug: 26616934
Change-Id: I4d542a096174ac8b69035836e9311cbf8340b15b
parent d9342907
Loading
Loading
Loading
Loading
+13 −19
Original line number Diff line number Diff line
@@ -161,10 +161,8 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
    Handler mHandler;
    TaskStackListenerImpl mTaskStackListener;
    RecentsAppWidgetHost mAppWidgetHost;
    boolean mBootCompleted;
    boolean mCanReuseTaskStackViews = true;
    boolean mDraggingInRecents;
    boolean mReloadTasks;
    boolean mLaunchedWhileDocking;

    // Task launching
@@ -236,7 +234,6 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
    }

    public void onBootCompleted() {
        mBootCompleted = true;
        updateHeaderBarLayout(true /* tryAndBindSearchWidget */, null /* stack */);
    }

@@ -317,7 +314,6 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
    }

    public void hideRecents(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) {
        if (mBootCompleted) {
        if (triggeredFromAltTab && mFastAltTabTrigger.isDozing()) {
            // The user has released alt-tab before the trigger has run, so just show the next
            // task immediately
@@ -334,7 +330,6 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
        EventBus.getDefault().post(new HideRecentsEvent(triggeredFromAltTab,
                triggeredFromHomeKey));
    }
    }

    public void toggleRecents() {
        // Skip this toggle if we are already waiting to trigger recents via alt-tab
@@ -347,7 +342,6 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
        mTriggeredFromAltTab = false;

        try {
            ViewConfiguration viewConfig = ViewConfiguration.get(mContext);
            SystemServicesProxy ssp = Recents.getSystemServices();
            ActivityManager.RunningTaskInfo topTask = ssp.getTopMostTask();
            MutableBoolean isTopTaskHome = new MutableBoolean(true);