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

Commit bc2f0869 authored by Alex Florescu's avatar Alex Florescu
Browse files

Test should handle both device orientations

Fixes: 196022981
Test: atest SystemUITests:AccessibilityFloatingMenuViewTest
Change-Id: I23e115e9dade4c4d4f72c2c506c4b90698f1eadf
parent b37ecaa4
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


package com.android.systemui.accessibility.floatingmenu;
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_ALWAYS;
import static android.view.View.OVER_SCROLL_NEVER;
import static android.view.View.OVER_SCROLL_NEVER;
import static android.view.WindowInsets.Type.ime;
import static android.view.WindowInsets.Type.ime;
@@ -134,7 +135,10 @@ public class AccessibilityFloatingMenuViewTest extends SysuiTestCase {
        mMenuHalfHeight = menuHeight / 2;
        mMenuHalfHeight = menuHeight / 2;
        mScreenHalfWidth = screenWidth / 2;
        mScreenHalfWidth = screenWidth / 2;
        mScreenHalfHeight = mScreenHeight / 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;
        mMenuWindowHeight = menuHeight + margin * 2;
        mMaxWindowY = mScreenHeight - mMenuWindowHeight;
        mMaxWindowY = mScreenHeight - mMenuWindowHeight;
    }
    }