mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Merge "Add tooltip for taskbar overflow button" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
ca739ac8ae
@@ -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..<createdTasks)
|
||||
assertThat(getOverflowIconTooltipText()).isNull()
|
||||
|
||||
tapOverflowIcon()
|
||||
assertThat(keyboardQuickSwitchController.isShown).isFalse()
|
||||
assertThat(getOverflowIconTooltipText()).isEqualTo("Other recent apps")
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -721,6 +725,14 @@ class TaskbarOverflowTest {
|
||||
}
|
||||
}
|
||||
|
||||
private fun getOverflowIconTooltipText(): String? {
|
||||
return getOnUiThread {
|
||||
val overflowIcon =
|
||||
taskbarViewController.iconViews.firstOrNull { it is TaskbarOverflowView }
|
||||
(overflowIcon as? TaskbarOverflowView)?.getTextForTooltipPopup()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds enough running apps for taskbar to enter overflow of `targetOverflowSize`, and verifies
|
||||
* * max number of icons in the taskbar remains unchanged
|
||||
|
||||
Reference in New Issue
Block a user