summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeUiEventLogger.kt30
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java1
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java21
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt51
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MaximizeMenu.kt89
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt17
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt88
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTestsBase.kt2
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java16
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/HandleMenuTest.kt4
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolderTest.kt5
11 files changed, 249 insertions, 75 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeUiEventLogger.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeUiEventLogger.kt
index b9cb32d8a14f..e0300d688379 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeUiEventLogger.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeUiEventLogger.kt
@@ -167,7 +167,35 @@ class DesktopModeUiEventLogger(
@UiEvent(doc = "Exit desktop mode education tooltip on the app header menu is clicked")
EXIT_DESKTOP_MODE_EDUCATION_TOOLTIP_CLICKED(2104),
@UiEvent(doc = "Exit desktop mode education tooltip is dismissed by the user")
- EXIT_DESKTOP_MODE_EDUCATION_TOOLTIP_DISMISSED(2105);
+ EXIT_DESKTOP_MODE_EDUCATION_TOOLTIP_DISMISSED(2105),
+ @UiEvent(doc = "A11y service opened app handle menu by selecting handle from fullscreen")
+ A11Y_APP_HANDLE_MENU_OPENED(2156),
+ @UiEvent(doc = "A11y service opened app handle menu through Switch Access actions menu ")
+ A11Y_SYSTEM_ACTION_APP_HANDLE_MENU(2157),
+ @UiEvent(doc = "A11y service selected desktop mode from app handle menu")
+ A11Y_APP_HANDLE_MENU_DESKTOP_VIEW(2158),
+ @UiEvent(doc = "A11y service selected fullscreen mode from app handle menu")
+ A11Y_APP_HANDLE_MENU_FULLSCREEN(2159),
+ @UiEvent(doc = "A11y service selected split screen mode from app handle menu")
+ A11Y_APP_HANDLE_MENU_SPLIT_SCREEN(2160),
+ @UiEvent(doc = "A11y service selected maximize/restore button from app header")
+ A11Y_APP_WINDOW_MAXIMIZE_RESTORE_BUTTON(2161),
+ @UiEvent(doc = "A11y service selected minimize button from app header")
+ A11Y_APP_WINDOW_MINIMIZE_BUTTON(2162),
+ @UiEvent(doc = "A11y service selected close button from app header")
+ A11Y_APP_WINDOW_CLOSE_BUTTON(2163),
+ @UiEvent(doc = "A11y service selected maximize button from app header maximize menu")
+ A11Y_MAXIMIZE_MENU_MAXIMIZE(2164),
+ @UiEvent(doc = "A11y service selected resize left button from app header maximize menu")
+ A11Y_MAXIMIZE_MENU_RESIZE_LEFT(2165),
+ @UiEvent(doc = "A11y service selected resize right button from app header maximize menu")
+ A11Y_MAXIMIZE_MENU_RESIZE_RIGHT(2166),
+ @UiEvent(doc = "A11y service triggered a11y action to maximize/restore app window")
+ A11Y_ACTION_MAXIMIZE_RESTORE(2167),
+ @UiEvent(doc = "A11y service triggered a11y action to resize app window left")
+ A11Y_ACTION_RESIZE_LEFT(2168),
+ @UiEvent(doc = "A11y service triggered a11y action to resize app window right")
+ A11Y_ACTION_RESIZE_RIGHT(2169);
override fun getId(): Int = mId
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
index 07b385bdb045..69e1f36dec0b 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
@@ -1802,6 +1802,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
mMultiInstanceHelper,
mWindowDecorCaptionHandleRepository,
mDesktopModeEventLogger,
+ mDesktopModeUiEventLogger,
mDesktopModeCompatPolicy);
mWindowDecorByTaskId.put(taskInfo.taskId, windowDecoration);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
index 49c380a1a736..50bc7b5e865b 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
@@ -93,6 +93,7 @@ import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.common.SyncTransactionQueue;
import com.android.wm.shell.desktopmode.CaptionState;
import com.android.wm.shell.desktopmode.DesktopModeEventLogger;
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger;
import com.android.wm.shell.desktopmode.DesktopModeUtils;
import com.android.wm.shell.desktopmode.DesktopUserRepositories;
import com.android.wm.shell.desktopmode.WindowDecorCaptionHandleRepository;
@@ -211,6 +212,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
private final MultiInstanceHelper mMultiInstanceHelper;
private final WindowDecorCaptionHandleRepository mWindowDecorCaptionHandleRepository;
private final DesktopUserRepositories mDesktopUserRepositories;
+ private final DesktopModeUiEventLogger mDesktopModeUiEventLogger;
private boolean mIsRecentsTransitionRunning = false;
private boolean mIsDragging = false;
private Runnable mLoadAppInfoRunnable;
@@ -243,6 +245,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
MultiInstanceHelper multiInstanceHelper,
WindowDecorCaptionHandleRepository windowDecorCaptionHandleRepository,
DesktopModeEventLogger desktopModeEventLogger,
+ DesktopModeUiEventLogger desktopModeUiEventLogger,
DesktopModeCompatPolicy desktopModeCompatPolicy) {
this (context, userContext, displayController, taskResourceLoader, splitScreenController,
desktopUserRepositories, taskOrganizer, taskInfo, taskSurface, handler,
@@ -257,7 +260,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
DefaultMaximizeMenuFactory.INSTANCE,
DefaultHandleMenuFactory.INSTANCE, multiInstanceHelper,
windowDecorCaptionHandleRepository, desktopModeEventLogger,
- desktopModeCompatPolicy);
+ desktopModeUiEventLogger, desktopModeCompatPolicy);
}
DesktopModeWindowDecoration(
@@ -294,6 +297,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
MultiInstanceHelper multiInstanceHelper,
WindowDecorCaptionHandleRepository windowDecorCaptionHandleRepository,
DesktopModeEventLogger desktopModeEventLogger,
+ DesktopModeUiEventLogger desktopModeUiEventLogger,
DesktopModeCompatPolicy desktopModeCompatPolicy) {
super(context, userContext, displayController, taskOrganizer, taskInfo,
taskSurface, surfaceControlBuilderSupplier, surfaceControlTransactionSupplier,
@@ -321,6 +325,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
mTaskResourceLoader = taskResourceLoader;
mTaskResourceLoader.onWindowDecorCreated(taskInfo);
mDesktopModeCompatPolicy = desktopModeCompatPolicy;
+ mDesktopModeUiEventLogger = desktopModeUiEventLogger;
}
/**
@@ -895,10 +900,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
mOnCaptionTouchListener,
mOnCaptionButtonClickListener,
mWindowManagerWrapper,
- mHandler
+ mHandler,
+ mDesktopModeUiEventLogger
);
- } else if (mRelayoutParams.mLayoutResId
- == R.layout.desktop_mode_app_header) {
+ } else if (mRelayoutParams.mLayoutResId == R.layout.desktop_mode_app_header) {
return mAppHeaderViewHolderFactory.create(
mResult.mRootView,
mOnCaptionTouchListener,
@@ -908,7 +913,8 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
mOnLeftSnapClickListener,
mOnRightSnapClickListener,
mOnMaximizeOrRestoreClickListener,
- mOnMaximizeHoverListener);
+ mOnMaximizeHoverListener,
+ mDesktopModeUiEventLogger);
}
throw new IllegalArgumentException("Unexpected layout resource id");
}
@@ -1372,7 +1378,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
mMaximizeMenu = mMaximizeMenuFactory.create(mSyncQueue, mRootTaskDisplayAreaOrganizer,
mDisplayController, mTaskInfo, mContext,
(width, height) -> calculateMaximizeMenuPosition(width, height),
- mSurfaceControlTransactionSupplier);
+ mSurfaceControlTransactionSupplier, mDesktopModeUiEventLogger);
mMaximizeMenu.show(
/* isTaskInImmersiveMode= */
@@ -1488,6 +1494,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
shouldShowRestartButton,
isBrowserApp,
isBrowserApp ? getAppLink() : getBrowserLink(),
+ mDesktopModeUiEventLogger,
mResult.mCaptionWidth,
mResult.mCaptionHeight,
mResult.mCaptionX,
@@ -1973,6 +1980,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
MultiInstanceHelper multiInstanceHelper,
WindowDecorCaptionHandleRepository windowDecorCaptionHandleRepository,
DesktopModeEventLogger desktopModeEventLogger,
+ DesktopModeUiEventLogger desktopModeUiEventLogger,
DesktopModeCompatPolicy desktopModeCompatPolicy) {
return new DesktopModeWindowDecoration(
context,
@@ -2000,6 +2008,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
multiInstanceHelper,
windowDecorCaptionHandleRepository,
desktopModeEventLogger,
+ desktopModeUiEventLogger,
desktopModeCompatPolicy);
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt
index f64b0d8695d2..25cf06b4247c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt
@@ -28,6 +28,7 @@ import android.graphics.Bitmap
import android.graphics.Point
import android.graphics.PointF
import android.graphics.Rect
+import android.os.Bundle
import android.view.LayoutInflater
import android.view.MotionEvent
import android.view.MotionEvent.ACTION_OUTSIDE
@@ -35,6 +36,7 @@ import android.view.SurfaceControl
import android.view.View
import android.view.WindowInsets.Type.systemBars
import android.view.WindowManager
+import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction
import android.widget.ImageButton
import android.widget.ImageView
import android.widget.Space
@@ -49,6 +51,10 @@ import androidx.core.view.isGone
import com.android.window.flags.Flags
import com.android.wm.shell.R
import com.android.wm.shell.bubbles.ContextUtils.isRtl
+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
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_APP_HANDLE_MENU_SPLIT_SCREEN
import com.android.wm.shell.shared.annotations.ShellBackgroundThread
import com.android.wm.shell.shared.annotations.ShellMainThread
import com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper
@@ -97,6 +103,7 @@ class HandleMenu(
private val shouldShowRestartButton: Boolean,
private val isBrowserApp: Boolean,
private val openInAppOrBrowserIntent: Intent?,
+ private val desktopModeUiEventLogger: DesktopModeUiEventLogger,
private val captionWidth: Int,
private val captionHeight: Int,
captionX: Int,
@@ -208,6 +215,7 @@ class HandleMenu(
) {
val handleMenuView = HandleMenuView(
context = context,
+ desktopModeUiEventLogger = desktopModeUiEventLogger,
menuWidth = menuWidth,
captionHeight = captionHeight,
shouldShowWindowingPill = shouldShowWindowingPill,
@@ -475,6 +483,7 @@ class HandleMenu(
@SuppressLint("ClickableViewAccessibility")
class HandleMenuView(
private val context: Context,
+ private val desktopModeUiEventLogger: DesktopModeUiEventLogger,
menuWidth: Int,
captionHeight: Int,
private val shouldShowWindowingPill: Boolean,
@@ -615,6 +624,45 @@ class HandleMenu(
return@setOnTouchListener true
}
+ desktopBtn.accessibilityDelegate = object : View.AccessibilityDelegate() {
+ override fun performAccessibilityAction(
+ host: View,
+ action: Int,
+ args: Bundle?
+ ): Boolean {
+ if (action == AccessibilityAction.ACTION_CLICK.id) {
+ desktopModeUiEventLogger.log(taskInfo, A11Y_APP_HANDLE_MENU_DESKTOP_VIEW)
+ }
+ return super.performAccessibilityAction(host, action, args)
+ }
+ }
+
+ fullscreenBtn.accessibilityDelegate = object : View.AccessibilityDelegate() {
+ override fun performAccessibilityAction(
+ host: View,
+ action: Int,
+ args: Bundle?
+ ): Boolean {
+ if (action == AccessibilityAction.ACTION_CLICK.id) {
+ desktopModeUiEventLogger.log(taskInfo, A11Y_APP_HANDLE_MENU_FULLSCREEN)
+ }
+ return super.performAccessibilityAction(host, action, args)
+ }
+ }
+
+ splitscreenBtn.accessibilityDelegate = object : View.AccessibilityDelegate() {
+ override fun performAccessibilityAction(
+ host: View,
+ action: Int,
+ args: Bundle?
+ ): Boolean {
+ if (action == AccessibilityAction.ACTION_CLICK.id) {
+ desktopModeUiEventLogger.log(taskInfo, A11Y_APP_HANDLE_MENU_SPLIT_SCREEN)
+ }
+ return super.performAccessibilityAction(host, action, args)
+ }
+ }
+
with(context) {
// Update a11y announcement out to say "double tap to enter Fullscreen"
ViewCompat.replaceAccessibilityAction(
@@ -917,6 +965,7 @@ interface HandleMenuFactory {
shouldShowRestartButton: Boolean,
isBrowserApp: Boolean,
openInAppOrBrowserIntent: Intent?,
+ desktopModeUiEventLogger: DesktopModeUiEventLogger,
captionWidth: Int,
captionHeight: Int,
captionX: Int,
@@ -942,6 +991,7 @@ object DefaultHandleMenuFactory : HandleMenuFactory {
shouldShowRestartButton: Boolean,
isBrowserApp: Boolean,
openInAppOrBrowserIntent: Intent?,
+ desktopModeUiEventLogger: DesktopModeUiEventLogger,
captionWidth: Int,
captionHeight: Int,
captionX: Int,
@@ -963,6 +1013,7 @@ object DefaultHandleMenuFactory : HandleMenuFactory {
shouldShowRestartButton,
isBrowserApp,
openInAppOrBrowserIntent,
+ desktopModeUiEventLogger,
captionWidth,
captionHeight,
captionX,
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MaximizeMenu.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MaximizeMenu.kt
index 5d1a7a0cc3a2..a10826fca3e2 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MaximizeMenu.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MaximizeMenu.kt
@@ -60,14 +60,16 @@ import android.window.TaskConstants
import androidx.compose.material3.ColorScheme
import androidx.compose.ui.graphics.toArgb
import androidx.core.animation.addListener
-import androidx.core.view.ViewCompat
-import androidx.core.view.accessibility.AccessibilityNodeInfoCompat.AccessibilityActionCompat
import androidx.core.view.isGone
import androidx.core.view.isVisible
import com.android.wm.shell.R
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.common.DisplayController
import com.android.wm.shell.common.SyncTransactionQueue
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_MAXIMIZE_MENU_MAXIMIZE
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_MAXIMIZE_MENU_RESIZE_LEFT
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_MAXIMIZE_MENU_RESIZE_RIGHT
import com.android.wm.shell.desktopmode.isTaskMaximized
import com.android.wm.shell.shared.animation.Interpolators.EMPHASIZED_DECELERATE
import com.android.wm.shell.shared.animation.Interpolators.FAST_OUT_LINEAR_IN
@@ -85,13 +87,14 @@ import java.util.function.Supplier
* to the right or left half of the screen.
*/
class MaximizeMenu(
- private val syncQueue: SyncTransactionQueue,
- private val rootTdaOrganizer: RootTaskDisplayAreaOrganizer,
- private val displayController: DisplayController,
- private val taskInfo: RunningTaskInfo,
- private val decorWindowContext: Context,
- private val positionSupplier: (Int, Int) -> Point,
- private val transactionSupplier: Supplier<Transaction> = Supplier { Transaction() }
+ private val syncQueue: SyncTransactionQueue,
+ private val rootTdaOrganizer: RootTaskDisplayAreaOrganizer,
+ private val displayController: DisplayController,
+ private val taskInfo: RunningTaskInfo,
+ private val decorWindowContext: Context,
+ private val positionSupplier: (Int, Int) -> Point,
+ private val transactionSupplier: Supplier<Transaction> = Supplier { Transaction() },
+ private val desktopModeUiEventLogger: DesktopModeUiEventLogger
) {
private var maximizeMenu: AdditionalViewHostViewContainer? = null
private var maximizeMenuView: MaximizeMenuView? = null
@@ -132,7 +135,7 @@ class MaximizeMenu(
onLeftSnapClickListener = onLeftSnapClickListener,
onRightSnapClickListener = onRightSnapClickListener,
onHoverListener = onHoverListener,
- onOutsideTouchListener = onOutsideTouchListener
+ onOutsideTouchListener = onOutsideTouchListener,
)
maximizeMenuView?.let { view ->
view.animateOpenMenu(onEnd = {
@@ -167,7 +170,7 @@ class MaximizeMenu(
onLeftSnapClickListener: () -> Unit,
onRightSnapClickListener: () -> Unit,
onHoverListener: (Boolean) -> Unit,
- onOutsideTouchListener: () -> Unit
+ onOutsideTouchListener: () -> Unit,
) {
val t = transactionSupplier.get()
val builder = SurfaceControl.Builder()
@@ -186,6 +189,7 @@ class MaximizeMenu(
"MaximizeMenu")
maximizeMenuView = MaximizeMenuView(
context = decorWindowContext,
+ desktopModeUiEventLogger = desktopModeUiEventLogger,
sizeToggleDirection = getSizeToggleDirection(),
immersiveConfig = if (showImmersiveOption) {
MaximizeMenuView.ImmersiveConfig.Visible(
@@ -265,6 +269,7 @@ class MaximizeMenu(
*/
class MaximizeMenuView(
context: Context,
+ private val desktopModeUiEventLogger: DesktopModeUiEventLogger,
private val sizeToggleDirection: SizeToggleDirection,
immersiveConfig: ImmersiveConfig,
showSnapOptions: Boolean,
@@ -425,7 +430,10 @@ class MaximizeMenu(
) {
super.onInitializeAccessibilityNodeInfo(host, info)
- info.addAction(AccessibilityAction.ACTION_CLICK)
+ info.addAction(AccessibilityAction(
+ AccessibilityAction.ACTION_CLICK.id,
+ context.getString(R.string.maximize_menu_talkback_action_maximize_restore_text)
+ ))
host.isClickable = true
}
@@ -435,6 +443,7 @@ class MaximizeMenu(
args: Bundle?
): Boolean {
if (action == AccessibilityAction.ACTION_CLICK.id) {
+ desktopModeUiEventLogger.log(taskInfo, A11Y_MAXIMIZE_MENU_MAXIMIZE)
onMaximizeClickListener?.invoke()
}
return super.performAccessibilityAction(host, action, args)
@@ -447,7 +456,10 @@ class MaximizeMenu(
info: AccessibilityNodeInfo
) {
super.onInitializeAccessibilityNodeInfo(host, info)
- info.addAction(AccessibilityAction.ACTION_CLICK)
+ info.addAction(AccessibilityAction(
+ AccessibilityAction.ACTION_CLICK.id,
+ context.getString(R.string.maximize_menu_talkback_action_snap_left_text)
+ ))
host.isClickable = true
}
@@ -457,6 +469,7 @@ class MaximizeMenu(
args: Bundle?
): Boolean {
if (action == AccessibilityAction.ACTION_CLICK.id) {
+ desktopModeUiEventLogger.log(taskInfo, A11Y_MAXIMIZE_MENU_RESIZE_LEFT)
onLeftSnapClickListener?.invoke()
}
return super.performAccessibilityAction(host, action, args)
@@ -469,7 +482,10 @@ class MaximizeMenu(
info: AccessibilityNodeInfo
) {
super.onInitializeAccessibilityNodeInfo(host, info)
- info.addAction(AccessibilityAction.ACTION_CLICK)
+ info.addAction(AccessibilityAction(
+ AccessibilityAction.ACTION_CLICK.id,
+ context.getString(R.string.maximize_menu_talkback_action_snap_right_text)
+ ))
host.isClickable = true
}
@@ -479,35 +495,13 @@ class MaximizeMenu(
args: Bundle?
): Boolean {
if (action == AccessibilityAction.ACTION_CLICK.id) {
+ desktopModeUiEventLogger.log(taskInfo, A11Y_MAXIMIZE_MENU_RESIZE_RIGHT)
onRightSnapClickListener?.invoke()
}
return super.performAccessibilityAction(host, action, args)
}
}
- with(context.resources) {
- ViewCompat.replaceAccessibilityAction(
- snapLeftButton,
- AccessibilityActionCompat.ACTION_CLICK,
- getString(R.string.maximize_menu_talkback_action_snap_left_text),
- null
- )
-
- ViewCompat.replaceAccessibilityAction(
- snapRightButton,
- AccessibilityActionCompat.ACTION_CLICK,
- getString(R.string.maximize_menu_talkback_action_snap_right_text),
- null
- )
-
- ViewCompat.replaceAccessibilityAction(
- sizeToggleButton,
- AccessibilityActionCompat.ACTION_CLICK,
- getString(R.string.maximize_menu_talkback_action_maximize_restore_text),
- null
- )
- }
-
// Maximize/restore button.
val sizeToggleBtnTextId = if (sizeToggleDirection == SizeToggleDirection.RESTORE)
R.string.desktop_mode_maximize_menu_restore_button_text
@@ -792,15 +786,15 @@ class MaximizeMenu(
}
/** Measure width of the root view of this menu. */
- fun measureWidth() : Int {
- rootView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
- return rootView.getMeasuredWidth()
+ fun measureWidth(): Int {
+ rootView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED)
+ return rootView.measuredWidth
}
/** Measure height of the root view of this menu. */
- fun measureHeight() : Int {
- rootView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
- return rootView.getMeasuredHeight()
+ fun measureHeight(): Int {
+ rootView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED)
+ return rootView.measuredHeight
}
private fun deactivateSnapOptions() {
@@ -1048,7 +1042,8 @@ interface MaximizeMenuFactory {
taskInfo: RunningTaskInfo,
decorWindowContext: Context,
positionSupplier: (Int, Int) -> Point,
- transactionSupplier: Supplier<Transaction>
+ transactionSupplier: Supplier<Transaction>,
+ desktopModeUiEventLogger: DesktopModeUiEventLogger,
): MaximizeMenu
}
@@ -1061,7 +1056,8 @@ object DefaultMaximizeMenuFactory : MaximizeMenuFactory {
taskInfo: RunningTaskInfo,
decorWindowContext: Context,
positionSupplier: (Int, Int) -> Point,
- transactionSupplier: Supplier<Transaction>
+ transactionSupplier: Supplier<Transaction>,
+ desktopModeUiEventLogger: DesktopModeUiEventLogger,
): MaximizeMenu {
return MaximizeMenu(
syncQueue,
@@ -1070,7 +1066,8 @@ object DefaultMaximizeMenuFactory : MaximizeMenuFactory {
taskInfo,
decorWindowContext,
positionSupplier,
- transactionSupplier
+ transactionSupplier,
+ desktopModeUiEventLogger
)
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt
index 9d16be59ba34..f09c500dcdd0 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt
@@ -39,6 +39,8 @@ import androidx.core.view.accessibility.AccessibilityNodeInfoCompat.Accessibilit
import com.android.internal.policy.SystemBarUtils
import com.android.window.flags.Flags
import com.android.wm.shell.R
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_APP_HANDLE_MENU_OPENED
import com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper
import com.android.wm.shell.windowdecor.AppHandleAnimator
import com.android.wm.shell.windowdecor.WindowManagerWrapper
@@ -53,7 +55,8 @@ class AppHandleViewHolder(
onCaptionTouchListener: View.OnTouchListener,
onCaptionButtonClickListener: OnClickListener,
private val windowManagerWrapper: WindowManagerWrapper,
- private val handler: Handler
+ private val handler: Handler,
+ private val desktopModeUiEventLogger: DesktopModeUiEventLogger,
) : WindowDecorationViewHolder<AppHandleViewHolder.HandleData>(rootView) {
data class HandleData(
@@ -201,6 +204,7 @@ class AppHandleViewHolder(
// Passthrough the a11y click action so the caption handle, so that app handle menu
// is opened on a11y click, similar to a real click
if (action == AccessibilityAction.ACTION_CLICK.id) {
+ desktopModeUiEventLogger.log(taskInfo, A11Y_APP_HANDLE_MENU_OPENED)
captionHandle.performClick()
}
return super.performAccessibilityAction(host, action, args)
@@ -216,10 +220,13 @@ class AppHandleViewHolder(
}
}
- // Update a11y action text so that Talkback announces "Press double tap to open app handle
- // menu" while focused on status bar input layer
+ // Update a11y action text so that Talkback announces "Press double tap to open menu"
+ // while focused on status bar input layer
ViewCompat.replaceAccessibilityAction(
- view, AccessibilityActionCompat.ACTION_CLICK, "Open app handle menu", null
+ view,
+ AccessibilityActionCompat.ACTION_CLICK,
+ context.getString(R.string.app_handle_chip_accessibility_announce),
+ null
)
}
@@ -297,12 +304,14 @@ class AppHandleViewHolder(
onCaptionButtonClickListener: OnClickListener,
windowManagerWrapper: WindowManagerWrapper,
handler: Handler,
+ desktopModeUiEventLogger: DesktopModeUiEventLogger,
): AppHandleViewHolder = AppHandleViewHolder(
rootView,
onCaptionTouchListener,
onCaptionButtonClickListener,
windowManagerWrapper,
handler,
+ desktopModeUiEventLogger,
)
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt
index 0e2698d0b6fa..d2e3a07f4651 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt
@@ -49,6 +49,13 @@ import com.android.internal.R.color.materialColorSurfaceContainerHigh
import com.android.internal.R.color.materialColorSurfaceContainerLow
import com.android.internal.R.color.materialColorSurfaceDim
import com.android.wm.shell.R
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_ACTION_MAXIMIZE_RESTORE
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_ACTION_RESIZE_LEFT
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_ACTION_RESIZE_RIGHT
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_APP_WINDOW_CLOSE_BUTTON
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_APP_WINDOW_MAXIMIZE_RESTORE_BUTTON
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger.DesktopUiEventEnum.A11Y_APP_WINDOW_MINIMIZE_BUTTON
import com.android.wm.shell.windowdecor.MaximizeButtonView
import com.android.wm.shell.windowdecor.common.DecorThemeUtil
import com.android.wm.shell.windowdecor.common.DrawableInsets
@@ -75,6 +82,7 @@ class AppHeaderViewHolder(
mOnRightSnapClickListener: () -> Unit,
mOnMaximizeOrRestoreClickListener: () -> Unit,
onMaximizeHoverAnimationFinishedListener: () -> Unit,
+ private val desktopModeUiEventLogger: DesktopModeUiEventLogger,
) : WindowDecorationViewHolder<AppHeaderViewHolder.HeaderData>(rootView) {
data class HeaderData(
@@ -151,6 +159,8 @@ class AppHeaderViewHolder(
private lateinit var a11yTextMaximize: String
private lateinit var a11yTextRestore: String
+ private lateinit var currentTaskInfo: RunningTaskInfo
+
init {
captionView.setOnTouchListener(onCaptionTouchListener)
captionHandle.setOnTouchListener(onCaptionTouchListener)
@@ -197,9 +207,18 @@ class AppHeaderViewHolder(
args: Bundle?
): Boolean {
when (action) {
- R.id.action_snap_left -> mOnLeftSnapClickListener.invoke()
- R.id.action_snap_right -> mOnRightSnapClickListener.invoke()
- R.id.action_maximize_restore -> mOnMaximizeOrRestoreClickListener.invoke()
+ R.id.action_snap_left -> {
+ desktopModeUiEventLogger.log(currentTaskInfo, A11Y_ACTION_RESIZE_LEFT)
+ mOnLeftSnapClickListener.invoke()
+ }
+ R.id.action_snap_right -> {
+ desktopModeUiEventLogger.log(currentTaskInfo, A11Y_ACTION_RESIZE_RIGHT)
+ mOnRightSnapClickListener.invoke()
+ }
+ R.id.action_maximize_restore -> {
+ desktopModeUiEventLogger.log(currentTaskInfo, A11Y_ACTION_MAXIMIZE_RESTORE)
+ mOnMaximizeOrRestoreClickListener.invoke()
+ }
}
return super.performAccessibilityAction(host, action, args)
@@ -224,10 +243,56 @@ class AppHeaderViewHolder(
args: Bundle?
): Boolean {
when (action) {
- AccessibilityAction.ACTION_CLICK.id -> host.performClick()
- R.id.action_snap_left -> mOnLeftSnapClickListener.invoke()
- R.id.action_snap_right -> mOnRightSnapClickListener.invoke()
- R.id.action_maximize_restore -> mOnMaximizeOrRestoreClickListener.invoke()
+ AccessibilityAction.ACTION_CLICK.id -> {
+ desktopModeUiEventLogger.log(
+ currentTaskInfo, A11Y_APP_WINDOW_MAXIMIZE_RESTORE_BUTTON
+ )
+ host.performClick()
+ }
+ R.id.action_snap_left -> {
+ desktopModeUiEventLogger.log(currentTaskInfo, A11Y_ACTION_RESIZE_LEFT)
+ mOnLeftSnapClickListener.invoke()
+ }
+ R.id.action_snap_right -> {
+ desktopModeUiEventLogger.log(currentTaskInfo, A11Y_ACTION_RESIZE_RIGHT)
+ mOnRightSnapClickListener.invoke()
+ }
+ R.id.action_maximize_restore -> {
+ desktopModeUiEventLogger.log(currentTaskInfo, A11Y_ACTION_MAXIMIZE_RESTORE)
+ mOnMaximizeOrRestoreClickListener.invoke()
+ }
+ }
+
+ return super.performAccessibilityAction(host, action, args)
+ }
+ }
+
+ closeWindowButton.accessibilityDelegate = object : View.AccessibilityDelegate() {
+ override fun performAccessibilityAction(
+ host: View,
+ action: Int,
+ args: Bundle?
+ ): Boolean {
+ when (action) {
+ AccessibilityAction.ACTION_CLICK.id -> desktopModeUiEventLogger.log(
+ currentTaskInfo, A11Y_APP_WINDOW_CLOSE_BUTTON
+ )
+ }
+
+ return super.performAccessibilityAction(host, action, args)
+ }
+ }
+
+ minimizeWindowButton.accessibilityDelegate = object : View.AccessibilityDelegate() {
+ override fun performAccessibilityAction(
+ host: View,
+ action: Int,
+ args: Bundle?
+ ): Boolean {
+ when (action) {
+ AccessibilityAction.ACTION_CLICK.id -> desktopModeUiEventLogger.log(
+ currentTaskInfo, A11Y_APP_WINDOW_MINIMIZE_BUTTON
+ )
}
return super.performAccessibilityAction(host, action, args)
@@ -310,7 +375,8 @@ class AppHeaderViewHolder(
enableMaximizeLongClick: Boolean,
isCaptionVisible: Boolean,
) {
- if (DesktopModeFlags.ENABLE_THEMED_APP_HEADERS.isTrue()) {
+ currentTaskInfo = taskInfo
+ if (DesktopModeFlags.ENABLE_THEMED_APP_HEADERS.isTrue) {
bindDataWithThemedHeaders(
taskInfo,
isTaskMaximized,
@@ -361,7 +427,7 @@ class AppHeaderViewHolder(
minimizeWindowButton.background = getDrawable(1)
}
maximizeButtonView.setAnimationTints(isDarkMode())
- minimizeWindowButton.isGone = !DesktopModeFlags.ENABLE_MINIMIZE_BUTTON.isTrue()
+ minimizeWindowButton.isGone = !DesktopModeFlags.ENABLE_MINIMIZE_BUTTON.isTrue
}
private fun bindDataWithThemedHeaders(
@@ -417,7 +483,7 @@ class AppHeaderViewHolder(
drawableInsets = minimizeDrawableInsets
)
}
- minimizeWindowButton.isGone = !DesktopModeFlags.ENABLE_MINIMIZE_BUTTON.isTrue()
+ minimizeWindowButton.isGone = !DesktopModeFlags.ENABLE_MINIMIZE_BUTTON.isTrue
// Maximize button.
maximizeButtonView.apply {
setAnimationTints(
@@ -761,6 +827,7 @@ class AppHeaderViewHolder(
mOnRightSnapClickListener: () -> Unit,
mOnMaximizeOrRestoreClickListener: () -> Unit,
onMaximizeHoverAnimationFinishedListener: () -> Unit,
+ desktopModeUiEventLogger: DesktopModeUiEventLogger
): AppHeaderViewHolder = AppHeaderViewHolder(
rootView,
onCaptionTouchListener,
@@ -771,6 +838,7 @@ class AppHeaderViewHolder(
mOnRightSnapClickListener,
mOnMaximizeOrRestoreClickListener,
onMaximizeHoverAnimationFinishedListener,
+ desktopModeUiEventLogger,
)
}
}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTestsBase.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTestsBase.kt
index ed69d912c4ef..2126d1d9b986 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTestsBase.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTestsBase.kt
@@ -337,7 +337,7 @@ open class DesktopModeWindowDecorViewModelTestsBase : ShellTestCase() {
mockDesktopModeWindowDecorFactory.create(
any(), any(), any(), any(), any(), any(), any(), eq(task), any(), any(), any(),
any(), any(), any(), any(), any(), any(), any(), any(), any(), any(), any(),
- any(), any(), any(), any())
+ any(), any(), any(), any(), any())
).thenReturn(decoration)
decoration.mTaskInfo = task
whenever(decoration.user).thenReturn(mockUserHandle)
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java
index 77513adf0088..0908f56e1cfb 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java
@@ -106,6 +106,7 @@ import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.common.SyncTransactionQueue;
import com.android.wm.shell.desktopmode.CaptionState;
import com.android.wm.shell.desktopmode.DesktopModeEventLogger;
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger;
import com.android.wm.shell.desktopmode.DesktopRepository;
import com.android.wm.shell.desktopmode.DesktopUserRepositories;
import com.android.wm.shell.desktopmode.WindowDecorCaptionHandleRepository;
@@ -246,6 +247,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
@Mock
private DesktopModeEventLogger mDesktopModeEventLogger;
@Mock
+ private DesktopModeUiEventLogger mDesktopModeUiEventLogger;
+ @Mock
private DesktopRepository mDesktopRepository;
@Mock
private WindowDecorTaskResourceLoader mMockTaskResourceLoader;
@@ -303,15 +306,15 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
doReturn(mInsetsState).when(mMockDisplayController).getInsetsState(anyInt());
when(mMockHandleMenuFactory.create(any(), any(), any(), any(), any(), anyInt(), any(),
anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean(),
- anyBoolean(), any(), anyInt(), anyInt(), anyInt(), anyInt()))
+ anyBoolean(), any(), any(), anyInt(), anyInt(), anyInt(), anyInt()))
.thenReturn(mMockHandleMenu);
when(mMockMultiInstanceHelper.supportsMultiInstanceSplit(any(), anyInt()))
.thenReturn(false);
when(mMockAppHeaderViewHolderFactory
- .create(any(), any(), any(), any(), any(), any(), any(), any(), any()))
+ .create(any(), any(), any(), any(), any(), any(), any(), any(), any(), any()))
.thenReturn(mMockAppHeaderViewHolder);
when(mMockAppHandleViewHolderFactory
- .create(any(), any(), any(), any(), any()))
+ .create(any(), any(), any(), any(), any(), any()))
.thenReturn(mMockAppHandleViewHolder);
when(mMockDesktopUserRepositories.getCurrent()).thenReturn(mDesktopRepository);
when(mMockDesktopUserRepositories.getProfile(anyInt())).thenReturn(mDesktopRepository);
@@ -1797,7 +1800,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
any(), anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean(),
anyBoolean(), anyBoolean(), argThat(intent ->
(uri == null && intent == null) || intent.getData().equals(uri)),
- anyInt(), anyInt(), anyInt(), anyInt());
+ any(), anyInt(), anyInt(), anyInt(), anyInt());
}
private void createMaximizeMenu(DesktopModeWindowDecoration decoration) {
@@ -1894,7 +1897,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
new WindowManagerWrapper(mMockWindowManager), mMockSurfaceControlViewHostFactory,
mMockWindowDecorViewHostSupplier, maximizeMenuFactory, mMockHandleMenuFactory,
mMockMultiInstanceHelper, mMockCaptionHandleRepository, mDesktopModeEventLogger,
- mDesktopModeCompatPolicy);
+ mDesktopModeUiEventLogger, mDesktopModeCompatPolicy);
windowDecor.setCaptionListeners(mMockTouchEventListener, mMockTouchEventListener,
mMockTouchEventListener, mMockTouchEventListener);
windowDecor.setExclusionRegionListener(mMockExclusionRegionListener);
@@ -2020,7 +2023,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
@NonNull Context decorWindowContext,
@NonNull Function2<? super Integer,? super Integer,? extends Point>
positionSupplier,
- @NonNull Supplier<SurfaceControl.Transaction> transactionSupplier) {
+ @NonNull Supplier<SurfaceControl.Transaction> transactionSupplier,
+ @NonNull DesktopModeUiEventLogger desktopModeUiEventLogger) {
return mMaximizeMenu;
}
}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/HandleMenuTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/HandleMenuTest.kt
index e4b897264883..b0b95c97ae18 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/HandleMenuTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/HandleMenuTest.kt
@@ -43,6 +43,7 @@ import com.android.wm.shell.ShellTestCase
import com.android.wm.shell.TestRunningTaskInfoBuilder
import com.android.wm.shell.common.DisplayController
import com.android.wm.shell.common.DisplayLayout
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger
import com.android.wm.shell.shared.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT
import com.android.wm.shell.shared.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT
import com.android.wm.shell.shared.split.SplitScreenConstants.SPLIT_POSITION_UNDEFINED
@@ -95,6 +96,8 @@ class HandleMenuTest : ShellTestCase() {
private lateinit var mockTaskResourceLoader: WindowDecorTaskResourceLoader
@Mock
private lateinit var mockAppIcon: Bitmap
+ @Mock
+ private lateinit var mockDesktopModeUiEventLogger: DesktopModeUiEventLogger
private lateinit var handleMenu: HandleMenu
@@ -290,6 +293,7 @@ class HandleMenuTest : ShellTestCase() {
shouldShowRestartButton = true,
isBrowserApp = false,
null /* openInAppOrBrowserIntent */,
+ mockDesktopModeUiEventLogger,
captionWidth = HANDLE_WIDTH,
captionHeight = 50,
captionX = captionX,
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolderTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolderTest.kt
index 2c3009cb8dc4..e23019a59307 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolderTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolderTest.kt
@@ -26,6 +26,7 @@ import androidx.test.filters.SmallTest
import com.android.internal.policy.SystemBarUtils
import com.android.wm.shell.R
import com.android.wm.shell.ShellTestCase
+import com.android.wm.shell.desktopmode.DesktopModeUiEventLogger
import com.android.wm.shell.windowdecor.WindowManagerWrapper
import org.junit.Before
import org.junit.runner.RunWith
@@ -57,6 +58,7 @@ class AppHandleViewHolderTest : ShellTestCase() {
private val mockWindowManagerWrapper = mock<WindowManagerWrapper>()
private val mockHandler = mock<Handler>()
private val mockTaskInfo = mock<RunningTaskInfo>()
+ private val mockDesktopModeUiEventLogger = mock<DesktopModeUiEventLogger>()
@Before
fun setup() {
@@ -92,7 +94,8 @@ class AppHandleViewHolderTest : ShellTestCase() {
mockOnTouchListener,
mockOnClickListener,
mockWindowManagerWrapper,
- mockHandler
+ mockHandler,
+ mockDesktopModeUiEventLogger,
)
}
}