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

Commit dc63f0ab authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Maintain order in GlobalActions when rotating to/from seascape."...

Merge "Merge "Maintain order in GlobalActions when rotating to/from seascape." into pi-dev am: e3fa94c1" into pi-dev-plus-aosp
parents 60161440 8f7707c8
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -175,9 +175,6 @@ public class HardwareUiLayout extends FrameLayout implements Tunable {
                mRotatedBackground = true;
                mBackground.setRotatedBackground(true);
                LinearLayout linearLayout = (LinearLayout) mChild;
                if (to == ROTATION_SEASCAPE) {
                    swapOrder(linearLayout);
                }
                if (mSwapOrientation) {
                    linearLayout.setOrientation(LinearLayout.HORIZONTAL);
                }
@@ -188,9 +185,6 @@ public class HardwareUiLayout extends FrameLayout implements Tunable {
                mRotatedBackground = false;
                mBackground.setRotatedBackground(false);
                LinearLayout linearLayout = (LinearLayout) mChild;
                if (from == ROTATION_SEASCAPE) {
                    swapOrder(linearLayout);
                }
                if (mSwapOrientation) {
                    linearLayout.setOrientation(LinearLayout.VERTICAL);
                }
@@ -199,15 +193,6 @@ public class HardwareUiLayout extends FrameLayout implements Tunable {
        }
    }

    private void swapOrder(LinearLayout linearLayout) {
        ArrayList<View> children = new ArrayList<>();
        for (int i = 0; i < linearLayout.getChildCount(); i++) {
            children.add(0, linearLayout.getChildAt(0));
            linearLayout.removeViewAt(0);
        }
        children.forEach(v -> linearLayout.addView(v));
    }

    private void rotateRight() {
        rotateRight(this);
        rotateRight(mChild);