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

Commit 27d7b685 authored by Adithya R's avatar Adithya R Committed by Nishith Khanna
Browse files

SystemUI: Calculate paged QS tiles height properly

When QS is re-inflated during UI mode change and we're on the
3rd or higher QS page, the first QS page is misaligned and
hence height returns 0, resulting in footer and media panel
position overlapping the QS panel. Return the maximum height
among all present QS pages to fix this issue.

Change-Id: I539babdb75c114cc44b4213ff114d4272be22ef6
parent ef44578d
Loading
Loading
Loading
Loading
+9 −5
Original line number Original line Diff line number Diff line
@@ -144,12 +144,16 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {


    @Override
    @Override
    public int getTilesHeight() {
    public int getTilesHeight() {
        // Use the first page as that is the maximum height we need to show.
        // Find the maximum height among all pages.
        TileLayout tileLayout = mPages.get(0);
        int height = 0;
        if (tileLayout == null) {
        for (int i = 0; i < mPages.size(); i++) {
            return 0;
            TileLayout tileLayout = mPages.get(i);
            if (tileLayout != null) {
                height = Math.max(height, tileLayout.getTilesHeight());
            }
        }
        }
        return tileLayout.getTilesHeight();
        mLogger.d("getTilesHeight ret=", height);
        return height;
    }
    }


    @Override
    @Override