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

Commit 29af19c5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Test should handle both device orientations" into sc-v2-dev am: 2f48e697 am: 3cbca333

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15517448

Change-Id: I187363eec9d61b6c4f08fde691d6cae8e44bf907
parents 6fdaa24f 3cbca333
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.accessibility.floatingmenu;

import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
import static android.view.View.OVER_SCROLL_ALWAYS;
import static android.view.View.OVER_SCROLL_NEVER;
import static android.view.WindowInsets.Type.ime;
@@ -134,7 +135,10 @@ public class AccessibilityFloatingMenuViewTest extends SysuiTestCase {
        mMenuHalfHeight = menuHeight / 2;
        mScreenHalfWidth = screenWidth / 2;
        mScreenHalfHeight = mScreenHeight / 2;
        mMaxWindowX = screenWidth - margin - menuWidth;
        int marginStartEnd =
                mContext.getResources().getConfiguration().orientation == ORIENTATION_PORTRAIT
                        ? margin : 0;
        mMaxWindowX = screenWidth - marginStartEnd - menuWidth;
        mMenuWindowHeight = menuHeight + margin * 2;
        mMaxWindowY = mScreenHeight - mMenuWindowHeight;
    }