Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +1 −0 Original line number Diff line number Diff line Loading @@ -484,6 +484,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin if (isHandleMenuActive()) { mHandleMenu.relayout( startT, taskInfo.configuration, mResult.mCaptionX, // Add top padding to the caption Y so that the menu is shown over what is the // actual contents of the caption, ignoring padding. This is currently relevant Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +25 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.app.WindowConfiguration import android.content.Context import android.content.Intent import android.content.res.ColorStateList import android.content.res.Configuration import android.content.res.Resources import android.graphics.Bitmap import android.graphics.PixelFormat Loading Loading @@ -57,6 +58,7 @@ import androidx.core.view.accessibility.AccessibilityNodeInfoCompat.Accessibilit import androidx.core.view.isGone import com.android.window.flags.Flags import com.android.wm.shell.R import com.android.wm.shell.common.split.SplitScreenUtils import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_APP_HANDLE_MENU_DESKTOP_VIEW import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_APP_HANDLE_MENU_FULLSCREEN Loading Loading @@ -387,10 +389,16 @@ private constructor( } /** Update pill layout, in case task changes have caused positioning to change. */ fun relayout(t: SurfaceControl.Transaction, captionX: Int, captionY: Int) { fun relayout( t: SurfaceControl.Transaction, configuration: Configuration, captionX: Int, captionY: Int, ) { handleMenuViewContainer?.let { container -> updateHandleMenuPillPositions(captionX, captionY) container.setPosition(t, handleMenuPosition.x, handleMenuPosition.y) handleMenuView?.updateSplitScreenButtonOrientation(configuration) } } Loading Loading @@ -947,6 +955,7 @@ private constructor( drawableInsets = iconButtonDrawableInsetsBase, ) } updateSplitScreenButtonOrientation(taskInfo.configuration) floatingBtn.apply { background = Loading @@ -967,6 +976,21 @@ private constructor( } } /** Update the split screen button (horizontal vs. vertical split) orientation. */ fun updateSplitScreenButtonOrientation(configuration: Configuration) { splitscreenBtn.rotation = if ( SplitScreenUtils.isLeftRightSplit( SplitScreenUtils.allowLeftRightSplitInPortrait(context.resources), configuration, ) ) { 0f } else { 90f } } private fun bindMoreActionsPill(style: MenuStyle) { moreActionsPill.background.setTint(style.backgroundColor) val buttons = Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/caption/AppHandleController.kt +6 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,12 @@ class AppHandleController( wct, ) handleMenu?.relayout(startT, captionLayout.captionX, captionLayout.captionY) handleMenu?.relayout( startT, taskInfo.configuration, captionLayout.captionX, captionLayout.captionY, ) openByDefaultDialog?.relayout(taskInfo) updateViewHolder(captionLayout) Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/caption/AppHeaderController.kt +1 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,7 @@ class AppHeaderController( ) handleMenu?.relayout( startT, taskInfo.configuration, captionLayout.captionX, // Add top padding to the caption Y so that the menu is shown over what is the // actual contents of the caption, ignoring padding. This is currently relevant Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +1 −0 Original line number Diff line number Diff line Loading @@ -484,6 +484,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin if (isHandleMenuActive()) { mHandleMenu.relayout( startT, taskInfo.configuration, mResult.mCaptionX, // Add top padding to the caption Y so that the menu is shown over what is the // actual contents of the caption, ignoring padding. This is currently relevant Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +25 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.app.WindowConfiguration import android.content.Context import android.content.Intent import android.content.res.ColorStateList import android.content.res.Configuration import android.content.res.Resources import android.graphics.Bitmap import android.graphics.PixelFormat Loading Loading @@ -57,6 +58,7 @@ import androidx.core.view.accessibility.AccessibilityNodeInfoCompat.Accessibilit import androidx.core.view.isGone import com.android.window.flags.Flags import com.android.wm.shell.R import com.android.wm.shell.common.split.SplitScreenUtils import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_APP_HANDLE_MENU_DESKTOP_VIEW import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_APP_HANDLE_MENU_FULLSCREEN Loading Loading @@ -387,10 +389,16 @@ private constructor( } /** Update pill layout, in case task changes have caused positioning to change. */ fun relayout(t: SurfaceControl.Transaction, captionX: Int, captionY: Int) { fun relayout( t: SurfaceControl.Transaction, configuration: Configuration, captionX: Int, captionY: Int, ) { handleMenuViewContainer?.let { container -> updateHandleMenuPillPositions(captionX, captionY) container.setPosition(t, handleMenuPosition.x, handleMenuPosition.y) handleMenuView?.updateSplitScreenButtonOrientation(configuration) } } Loading Loading @@ -947,6 +955,7 @@ private constructor( drawableInsets = iconButtonDrawableInsetsBase, ) } updateSplitScreenButtonOrientation(taskInfo.configuration) floatingBtn.apply { background = Loading @@ -967,6 +976,21 @@ private constructor( } } /** Update the split screen button (horizontal vs. vertical split) orientation. */ fun updateSplitScreenButtonOrientation(configuration: Configuration) { splitscreenBtn.rotation = if ( SplitScreenUtils.isLeftRightSplit( SplitScreenUtils.allowLeftRightSplitInPortrait(context.resources), configuration, ) ) { 0f } else { 90f } } private fun bindMoreActionsPill(style: MenuStyle) { moreActionsPill.background.setTint(style.backgroundColor) val buttons = Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/caption/AppHandleController.kt +6 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,12 @@ class AppHandleController( wct, ) handleMenu?.relayout(startT, captionLayout.captionX, captionLayout.captionY) handleMenu?.relayout( startT, taskInfo.configuration, captionLayout.captionX, captionLayout.captionY, ) openByDefaultDialog?.relayout(taskInfo) updateViewHolder(captionLayout) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/caption/AppHeaderController.kt +1 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,7 @@ class AppHeaderController( ) handleMenu?.relayout( startT, taskInfo.configuration, captionLayout.captionX, // Add top padding to the caption Y so that the menu is shown over what is the // actual contents of the caption, ignoring padding. This is currently relevant Loading