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

Commit 85d664ef authored by Alex Chau's avatar Alex Chau
Browse files

Use transient taskbar size/margin to calculate taskbar position for persistent taskbar

- DeviceProfileTest should use persistent taskbar in 3-button mode

Fix: 260596114
Test: DeviceProfileTest
Change-Id: Iadcca218dab2bc2eedc006c86dbbe3f9a0fa5e51
parent 60c7dfec
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -260,6 +260,7 @@ public class DeviceProfile {
    // Whether Taskbar will inset the bottom of apps by taskbarSize.
    public boolean isTaskbarPresentInApps;
    public int taskbarSize;
    public int transientTaskbarSize;
    public int stashedTaskbarSize;
    public int transientTaskbarMargin;

@@ -324,12 +325,12 @@ public class DeviceProfile {
        }

        if (isTaskbarPresent) {
            transientTaskbarSize = res.getDimensionPixelSize(R.dimen.transient_taskbar_size);
            transientTaskbarMargin = res.getDimensionPixelSize(R.dimen.transient_taskbar_margin);
            if (DisplayController.isTransientTaskbar(context)) {
                taskbarSize = res.getDimensionPixelSize(R.dimen.transient_taskbar_size);
                taskbarSize = transientTaskbarSize;
                stashedTaskbarSize =
                        res.getDimensionPixelSize(R.dimen.transient_taskbar_stashed_size);
                transientTaskbarMargin =
                        res.getDimensionPixelSize(R.dimen.transient_taskbar_margin);
            } else {
                taskbarSize = res.getDimensionPixelSize(R.dimen.taskbar_size);
                stashedTaskbarSize = res.getDimensionPixelSize(R.dimen.taskbar_stashed_size);
@@ -1383,7 +1384,7 @@ public class DeviceProfile {
    public int getOverviewActionsClaimedSpaceBelow() {
        if (isTaskbarPresent) {
            if (FeatureFlags.ENABLE_TASKBAR_IN_OVERVIEW.get()) {
                return taskbarSize + transientTaskbarMargin * 2;
                return transientTaskbarSize + transientTaskbarMargin * 2;
            }

            return isGestureMode