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

Commit cf10603e authored by fbaron's avatar fbaron
Browse files

Fix bug where hotseat disappears

Fix: 336096469
Bug: 339700174
Flag: NONE
Test: n/a
Change-Id: Ie567c08445d7743281f501c782a8fd51a75ad9bc
parent 499b9d06
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.ComponentName;
import android.util.Log;
import android.view.HapticFeedbackConstants;
import android.view.View;
import android.view.ViewGroup;
@@ -80,6 +81,7 @@ public class HotseatPredictionController implements DragController.DragListener,
        SystemShortcut.Factory<QuickstepLauncher>, DeviceProfile.OnDeviceProfileChangeListener,
        DragSource, ViewGroup.OnHierarchyChangeListener {

    private static final String TAG = "HotseatPredictionController";
    private static final int FLAG_UPDATE_PAUSED = 1 << 0;
    private static final int FLAG_DRAG_IN_PROGRESS = 1 << 1;
    private static final int FLAG_FILL_IN_PROGRESS = 1 << 2;
@@ -291,6 +293,16 @@ public class HotseatPredictionController implements DragController.DragListener,
        }
    }

    /**
     * Ensures that if the flag FLAG_UPDATE_PAUSED is active we set it to false.
     */
    public void verifyUIUpdateNotPaused() {
        if ((mPauseFlags & FLAG_UPDATE_PAUSED) != 0) {
            setPauseUIUpdate(false);
            Log.e(TAG, "FLAG_UPDATE_PAUSED should not be set to true (see b/339700174)");
        }
    }

    /**
     * Sets or updates the predicted items
     */
+6 −0
Original line number Diff line number Diff line
@@ -397,6 +397,12 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer
        return result;
    }

    @Override
    public void startBinding() {
        super.startBinding();
        mHotseatPredictionController.verifyUIUpdateNotPaused();
    }

    @Override
    protected void onActivityFlagsChanged(int changeBits) {
        if ((changeBits & ACTIVITY_STATE_STARTED) != 0) {