diff --git a/quickstep/res/values/strings.xml b/quickstep/res/values/strings.xml index 05f2397753..231970bb17 100644 --- a/quickstep/res/values/strings.xml +++ b/quickstep/res/values/strings.xml @@ -319,7 +319,7 @@ Taskbar Divider - Taskbar Overflow + Other recent apps diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarHoverToolTipController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarHoverToolTipController.java index 63d98d64a5..42ad5b2aa1 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarHoverToolTipController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarHoverToolTipController.java @@ -134,6 +134,8 @@ public class TaskbarHoverToolTipController implements View.OnHoverListener { return icon.mInfo.title.toString(); } else if (mHoverView instanceof AppPairIcon icon) { return icon.getTitleTextView().getText().toString(); + } else if (mHoverView instanceof TaskbarOverflowView icon) { + return icon.getTextForTooltipPopup(); } else { return null; } diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarOverflowView.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarOverflowView.java index d909d19fb8..34787641c2 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarOverflowView.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarOverflowView.java @@ -39,6 +39,7 @@ import androidx.annotation.VisibleForTesting; import androidx.core.graphics.ColorUtils; import com.android.app.animation.Interpolators; +import com.android.launcher3.R; import com.android.launcher3.Reorderable; import com.android.launcher3.Utilities; import com.android.launcher3.icons.IconNormalizer; @@ -339,6 +340,17 @@ public class TaskbarOverflowView extends FrameLayout implements Reorderable { } } + /** + * @return Tooltip to be used for the taskbar overflow view - returns null if the view should + * not have a tooltip. + */ + public String getTextForTooltipPopup() { + if (mIsActive) { + return null; + } + return getResources().getString(R.string.taskbar_overflow_a11y_title); + } + /** * Returns the view's state (whether it shows a set of app icons or a leave-behind circle). */ diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java index 3f5e425688..25d320d55f 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java @@ -363,6 +363,9 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar mControllerCallbacks.getOverflowOnClickListener()); mTaskbarOverflowView.setOnLongClickListener( mControllerCallbacks.getOverflowOnLongClickListener()); + if (enableCursorHoverStates()) { + setHoverListenerForIcon(mTaskbarOverflowView); + } } if (ENABLE_TASKBAR_OVERFLOW.isTrue()) { diff --git a/quickstep/tests/multivalentTests/src/com/android/launcher3/taskbar/TaskbarOverflowTest.kt b/quickstep/tests/multivalentTests/src/com/android/launcher3/taskbar/TaskbarOverflowTest.kt index 0d94a6f869..7485b3080b 100644 --- a/quickstep/tests/multivalentTests/src/com/android/launcher3/taskbar/TaskbarOverflowTest.kt +++ b/quickstep/tests/multivalentTests/src/com/android/launcher3/taskbar/TaskbarOverflowTest.kt @@ -369,6 +369,8 @@ class TaskbarOverflowTest { createDesktopTask(createdTasks) assertThat(taskbarOverflowIconIndex).isEqualTo(initialIconCount) + assertThat(getOverflowIconTooltipText()).isEqualTo("Other recent apps") + tapOverflowIcon() // Keyboard quick switch view is shown only after list of recent task is asynchronously // retrieved from the recents model. @@ -377,9 +379,11 @@ class TaskbarOverflowTest { assertThat(getOnUiThread { keyboardQuickSwitchController.isShownFromTaskbar }).isTrue() assertThat(getOnUiThread { keyboardQuickSwitchController.shownTaskIds() }) .containsExactlyElementsIn(0..