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

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

Merge "Use isGestureNav signal from TaskbarActivityContext for getTaskbarPhoneDimensions" into main

parents 9df62364 a51ee6a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT

        int setupSize = mControllers.taskbarActivityContext.getSetupWindowSize();
        Point p = DimensionUtils.getTaskbarPhoneDimensions(deviceProfile, resources,
                mContext.isPhoneMode());
                mContext.isPhoneMode(), mContext.isGestureNav());
        ViewGroup.LayoutParams navButtonsViewLayoutParams = mNavButtonsView.getLayoutParams();
        navButtonsViewLayoutParams.width = p.x;
        if (!mContext.isUserSetupComplete()) {
+1 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
            if (mActivity.isPhoneMode()) {
                Resources resources = mActivity.getResources();
                Point taskbarDimensions = DimensionUtils.getTaskbarPhoneDimensions(deviceProfile,
                        resources, true /* isPhoneMode */);
                        resources, true /* isPhoneMode */, mActivity.isGestureNav());
                return taskbarDimensions.y == -1 ?
                        deviceProfile.getDisplayInfo().currentSize.y :
                        taskbarDimensions.y;
+3 −2
Original line number Diff line number Diff line
@@ -31,7 +31,8 @@ object DimensionUtils {
    fun getTaskbarPhoneDimensions(
            deviceProfile: DeviceProfile,
            res: Resources,
            isPhoneMode: Boolean
            isPhoneMode: Boolean,
            isGestureNav: Boolean,
    ): Point {
        val p = Point()
        // Taskbar for large screen
@@ -42,7 +43,7 @@ object DimensionUtils {
        }

        // Taskbar on phone using gesture nav, it will always be stashed
        if (deviceProfile.isGestureMode) {
        if (isGestureNav) {
            p.x = ViewGroup.LayoutParams.MATCH_PARENT
            p.y = res.getDimensionPixelSize(R.dimen.taskbar_stashed_size)
            return p