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

Commit e4c57d72 authored by Matthew Ng's avatar Matthew Ng
Browse files

Fixes clear all button disappearing after rotate on low ram device

When configuration occurs it would hide the button. To fix this issue,
do not hide the button when rotating.

Change-Id: I2073652a3744cdf4e3a67cef73c507d9ea27bf81
Fixes: 65384096
Test: manual - load apps into recents, rotate screen
parent bff95c0d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2396,10 +2396,14 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
    }

    private void updateStackActionButtonVisibility() {
        if (Recents.getConfiguration().isLowRamDevice) {
            return;
        }

        // Always show the button in grid layout.
        if (useGridLayout() ||
                (mStackScroller.getStackScroll() < SHOW_STACK_ACTION_BUTTON_SCROLL_THRESHOLD &&
                        mStack.getTaskCount() > 0 && !Recents.getConfiguration().isLowRamDevice)) {
                        mStack.getTaskCount() > 0)) {
            EventBus.getDefault().send(new ShowStackActionButtonEvent(false /* translate */));
        } else {
            EventBus.getDefault().send(new HideStackActionButtonEvent());