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

Unverified Commit 0cdda336 authored by Dark Eyes's avatar Dark Eyes Committed by Michael Bestas
Browse files

Fix nav bar showing always on the left when rotated to 270 degrees.

Also, fix the order of the buttons so the back button always shows
on the bottom

Change-Id: I7754fbe36848e9163bb3925403669dd3154c071a
parent b03d54af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -563,7 +563,7 @@ public class NavigationBarView extends LinearLayout implements TunerService.Tuna
        }
        mCurrentView = mRotatedViews[rot];
        mCurrentView.setVisibility(View.VISIBLE);
        mNavigationInflaterView.setAlternativeOrder(rot == Surface.ROTATION_90);
        mNavigationInflaterView.setAlternativeOrder(rot == Surface.ROTATION_90 || rot == Surface.ROTATION_270);
        for (int i = 0; i < mButtonDisatchers.size(); i++) {
            mButtonDisatchers.valueAt(i).setCurrentView(mCurrentView);
        }
+3 −5
Original line number Diff line number Diff line
@@ -3222,12 +3222,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            } else if (mNavigationBarPosition == NAV_BAR_RIGHT) {
                if (transit == TRANSIT_EXIT
                        || transit == TRANSIT_HIDE) {
                    return mNavigationBarLeftInLandscape
                            ? R.anim.dock_left_exit : R.anim.dock_right_exit;
                    return R.anim.dock_right_exit;
                } else if (transit == TRANSIT_ENTER
                        || transit == TRANSIT_SHOW) {
                    return mNavigationBarLeftInLandscape
                            ? R.anim.dock_left_enter : R.anim.dock_right_enter;
                    return R.anim.dock_right_enter;
                }
            } else if (mNavigationBarPosition == NAV_BAR_LEFT) {
                if (transit == TRANSIT_EXIT
@@ -4814,7 +4812,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {

    private int navigationBarPosition(int displayWidth, int displayHeight, int displayRotation) {
        if (mNavigationBarCanMove && displayWidth > displayHeight) {
            if (displayRotation == Surface.ROTATION_270) {
            if (mNavigationBarLeftInLandscape) {
                return NAV_BAR_LEFT;
            } else {
                return NAV_BAR_RIGHT;