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

Commit 9633e5b7 authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "Fix phone mode task bar inset values not correctly initialized" into main

parents c1d05a71 de28c115
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -107,17 +107,14 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
        mControllers = controllers;
        DeviceProfile deviceProfile = mActivity.getDeviceProfile();
        Resources resources = mActivity.getResources();
        final int stashedTaskbarHeight;
        if (isPhoneGestureNavMode(mActivity.getDeviceProfile())) {
            mTaskbarSize = resources.getDimensionPixelSize(R.dimen.taskbar_size);
            mStashedHandleWidth =
                    resources.getDimensionPixelSize(R.dimen.taskbar_stashed_small_screen);
            stashedTaskbarHeight = resources.getDimensionPixelSize(R.dimen.taskbar_stashed_size);
        } else {
            mTaskbarSize = deviceProfile.taskbarHeight;
            mStashedHandleWidth = resources
                    .getDimensionPixelSize(R.dimen.taskbar_stashed_handle_width);
            stashedTaskbarHeight = mControllers.taskbarStashController.getStashedHeight();
        }
        int taskbarBottomMargin = deviceProfile.taskbarBottomMargin;
        mStashedHandleView.getLayoutParams().height = mTaskbarSize + taskbarBottomMargin;
@@ -126,6 +123,7 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
                isPhoneGestureNavMode(deviceProfile) ? 1 : 0);
        mTaskbarStashedHandleHintScale.updateValue(1f);

        final int stashedTaskbarHeight = mControllers.taskbarStashController.getStashedHeight();
        mStashedHandleView.setOutlineProvider(new ViewOutlineProvider() {
            @Override
            public void getOutline(View view, Outline outline) {
+8 −2
Original line number Diff line number Diff line
@@ -278,9 +278,15 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
        mSystemUiProxy = SystemUiProxy.INSTANCE.get(activity);
        mAccessibilityManager = mActivity.getSystemService(AccessibilityManager.class);

        if (isPhoneMode()) {
            mUnstashedHeight = mActivity.getResources().getDimensionPixelSize(R.dimen.taskbar_size);
            mStashedHeight = mActivity.getResources().getDimensionPixelSize(
                    R.dimen.taskbar_stashed_size);
        } else {
            mUnstashedHeight = mActivity.getDeviceProfile().taskbarHeight;
            mStashedHeight = mActivity.getDeviceProfile().stashedTaskbarHeight;
        }
    }

    /**
     * Show Taskbar upon receiving broadcast