Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +4 −2 Original line number Diff line number Diff line Loading @@ -1098,8 +1098,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin final float menuRight = menuLeft + menuWidth; final float menuBottom = menuTop + menuHeight; // If the menu is out of screen bounds, shift it up/left as needed if (menuRight > displayWidth) { // If the menu is out of screen bounds, shift it as needed if (menuLeft < 0) { menuLeft = 0; } else if (menuRight > displayWidth) { menuLeft = (displayWidth - menuWidth); } if (menuBottom > displayHeight) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MaximizeMenu.kt +15 −4 Original line number Diff line number Diff line Loading @@ -291,13 +291,24 @@ class MaximizeMenu( requireViewById(R.id.maximize_menu_snap_container) as View private val snapWindowText = requireViewById(R.id.maximize_menu_snap_window_text) as TextView private val snapRightButton = requireViewById(R.id.maximize_menu_snap_right_button) as Button private val snapLeftButton = requireViewById(R.id.maximize_menu_snap_left_button) as Button private val snapButtonsLayout = requireViewById(R.id.maximize_menu_snap_menu_layout) // If layout direction is RTL, maximize menu will be mirrored, switching the order of the // snap right/left buttons. val isRtl: Boolean = (context.resources.configuration.layoutDirection == View.LAYOUT_DIRECTION_RTL) private val snapRightButton = if (isRtl) { requireViewById(R.id.maximize_menu_snap_left_button) as Button } else { requireViewById(R.id.maximize_menu_snap_right_button) as Button } private val snapLeftButton = if (isRtl) { requireViewById(R.id.maximize_menu_snap_right_button) as Button } else { requireViewById(R.id.maximize_menu_snap_left_button) as Button } private val decorThemeUtil = DecorThemeUtil(context) private val outlineRadius = context.resources Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +4 −2 Original line number Diff line number Diff line Loading @@ -1098,8 +1098,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin final float menuRight = menuLeft + menuWidth; final float menuBottom = menuTop + menuHeight; // If the menu is out of screen bounds, shift it up/left as needed if (menuRight > displayWidth) { // If the menu is out of screen bounds, shift it as needed if (menuLeft < 0) { menuLeft = 0; } else if (menuRight > displayWidth) { menuLeft = (displayWidth - menuWidth); } if (menuBottom > displayHeight) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MaximizeMenu.kt +15 −4 Original line number Diff line number Diff line Loading @@ -291,13 +291,24 @@ class MaximizeMenu( requireViewById(R.id.maximize_menu_snap_container) as View private val snapWindowText = requireViewById(R.id.maximize_menu_snap_window_text) as TextView private val snapRightButton = requireViewById(R.id.maximize_menu_snap_right_button) as Button private val snapLeftButton = requireViewById(R.id.maximize_menu_snap_left_button) as Button private val snapButtonsLayout = requireViewById(R.id.maximize_menu_snap_menu_layout) // If layout direction is RTL, maximize menu will be mirrored, switching the order of the // snap right/left buttons. val isRtl: Boolean = (context.resources.configuration.layoutDirection == View.LAYOUT_DIRECTION_RTL) private val snapRightButton = if (isRtl) { requireViewById(R.id.maximize_menu_snap_left_button) as Button } else { requireViewById(R.id.maximize_menu_snap_right_button) as Button } private val snapLeftButton = if (isRtl) { requireViewById(R.id.maximize_menu_snap_right_button) as Button } else { requireViewById(R.id.maximize_menu_snap_left_button) as Button } private val decorThemeUtil = DecorThemeUtil(context) private val outlineRadius = context.resources Loading