This cl inlcudes: while user is in desktop mode, we will add state description(active, minimized) of each app icon to it's content description.
Test: Manual
Bug: 397555157
Flag: EXEMPT bugfix
Change-Id: Iaec18e7099108e8b076b76c637a41e29ed837265
This Cl includes
- addition of entry/exit callback methods in DesktopVisibilityController.
- taskbar manager now listens to desktop mode changes.
- TaskbarBackrgroundRedererer can now individually animation backgrounds for transient and persistent taskbars
- new channel for taskbar icon alpha added to TaskbarViewController
- new animated float to handle background alpha while we are recreating taskbar with animation.
Solution:
we use the callabck we get from DekstopVisibilty for entry/exit to first change logic of when we are considered inDesktopMode. Upon entry/exit we notify display controller for info change.
we also at notify taskbar manager who is now a listener to the desktop mode change and start the recreate process. TaskbarManager first animates existing taskbar out of user view and then follows the original recreate flow.
Test: Presubmit
Bug: 343882478
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Ib827564cacd194f499e7d9b1965e2bb13e3548ab
See go/refactor-group-task for details. This CL removes all the usages
of `task1` and `task2` from `GroupTask` in Launcher3. Follow-up CLs will
remove it from NexusLauncher and remove the fields altogether.
Bug: 388593902
Test: m
Flag: EXEMPT pure refactor with no behavior change.
Change-Id: I902c8135b3a0aae95acf25267b3bcbf286bd4e7d
Shift the taskbar to fulfill the 12dp distance if the distance between
the taskbar and the bubble bar is below this threshold.
Fixes: 376929094
Test: TaskbarViewControllerTest
Test: Manual. Test that the transient taskbar shifts properly.
Increased the minimum distance to 120 dp and verified that the taskbar
shifts correctly. Moved bubbles side to side, confirming the taskbar
follows. The return-to-home-screen animation to the hotseat plays as
expected from either side.
Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/bJZ8PclmltZu7IupvBFrLn
Test: Manual. Test that the transient taskbar stashes properly.
Increased the minimum distance to 120 dp and verified that the taskbar
shifts correctly. Go to any application. Stash and un-stash the taskbar.
Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/hCGRhUgIqvcehOrTQ2Ulvj
Test: Manual. Test that the transient taskbar pin/unpin properly.
Increased the minimum distance to 120 dp and verified that the taskbar
shifts correctly. Pin/unpin the taskbar.
Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/f3fy5JKVZAk4wLCpVra4DK
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Id4bd713da93053f90d9c2be8503dc93531a03b29
The static boolean also affects Taskbar within the Launcher process. We
only want this disabled for the Taskbar test Sandbox.
Flag: TEST_ONLY
Bug: 230027385
Test: NexusLauncherTests:com.android.launcher3.taskbar
Change-Id: Ife12e95ab34755d1aec42d79188c15232d8da092
Remove and merge the usage of the enableBubbleBarInPersistentTaskBar
flag to the enableBubbleBar flag.
Bug: 383181643
Flag: com.android.wm.shell.enable_bubble_bar
Test: NONE - removed and merged flag usage.
Change-Id: I4f131e1ddf8367425b91c8fb597857ee222b75d8
The animations mostly match the spec, though the recents indicators scale/fade with icon currently.
The change transitions need to incorporate translateX since that changes based on the number of icons in Taskbar. We need the translateX for pinning update to happen before TaskbarView lays out its children so that the animator computes the correct start and end values.
Flag: com.android.launcher3.taskbar_recents_layout_transition
Bug: 343521765
Test: go/testedequals
Change-Id: I13aa49abf80ddc09fab890f78bde924a8f7f1d6e
The tests verify that number of icons in the task bar does not go beyond
the intended max number, that the taskbar remains centered as it hits
max number of icons, and maintains a minimal margin to the display
edges.
Also, has a test that the max naumber of icons and the taskbar margins
adapt as bubble bar visibility chages.
Adds a TestRule to mock the recents model in the taskbar window sandbox.
The mocked recents model is used to add fake running app icons to the
taskbar.
Bug: 368119679
Test: atest TaskbarOverflowTest
Flag: EXEMPT test only
Change-Id: I8d033c3e95d7c0a4b139502cd7d70882482117c0
This cl includes
- making pinned taskbar animate slide in/out animation from bottom of screen.
- no icon aligment with hotseat when taksbar is pinned
The solution
- upon state change applied on TaskbarLauncherStateController. offset taskbar background and icons to bottom of screeen and animate with slide in/out effects.
Test: manual, presubmit
Bug: 314279101
Flag: EXEMPT bugfix
Change-Id: Ife336ebd57eb2f60c2bc33ed6a4527c42111808f
When caculating number of icons to show in taskbar, account for bubble
bar size (the max size when in collapsed state) when bubble bar has
bubbles (even if the bubble bar is stashed). Note that the bubble bar
visibility may change, so max number of icons in the taskbar may change
during the taskbar view lieftime. TaskbarViewController already had a
method called when the bubble bar visibility changed - adapt it to also
reclaculate max number of icons to show in the taskbar, and update the
list of icons shown in the UI if necessary (if the change in the bubble
bar visibility would also cause a change in number of icons shown in the
taskbar).
Bug: 368119679
Test: Launch enough apps for taskbar to enter overflow, open an app that
supports bubbles, and trigger 2 or more bubbles so bubble bar shows up.
Verify that the buble bar does not overlap with taskbar bounds, both
in transient and persistent taskbar. Remove bubbles, and verify the
taskbar bounds expand, allowing more icons to be shown.
Flag: com.android.launcher3.taskbar_overflow
Change-Id: Ifed4e5e5dd64df5256090f5ba55f24203c09e839
Creates a new view for the taskbar overflow button that draws up to 4
recent item previews. The items are stacked on top of each other in
counter clockwise order, with overlapping bounds, recent items closer
to the top. The item icons have a 2 dip ring around them, of the taskbar
background color.
Adjusts logic to calculate which items become part of the overflow
button, so more recent items get shown in the taskbar.
Initial consideration was to usse FolderIcon to represent the overflow
button, but decided against it because:
* FolderIcon is fairly entangled with the associated folder view
* item information uses different data structure (ItemInfo) than
recent items (GroupTasks)
* item preview layout within the main icon is similar, but
sufficiently different that using clipped folder layout rules felt
like hacking around assumptions made for folder icon UI
Bug: 368119679
Test: Keep opening apps until the task bar enters overflow - verify that
overview button shows up, and contains least recent task
representations. Keep adding items, then closing windows, and verify
the icon gets updated accordingly. Done in landscape and portrait, and
ltr and rtl layout.
Flag: com.android.launcher3.taskbar_overflow
Change-Id: I2824cb0db1f7516ebd74361ce00fb8887857325d
When laying out its contents, TaskBarView generally lays the icons so
they get centered in the task bar - this is done by calculating the
total size of all icons during layout (this will generally be transient
taskbar icon sizes), and substracting extra margins that get removed
from the divider view. After initial layout, `TaskbarViewController`
adjusts the icon view positions to match expected icon sizes (it
offsets icons horizontally reducing margins between icons to match
intended icon sizes for the taskbar type). Additionally,
`TaskbarViewController` translates all apps button container - this
transformation is asymetric, and causes the task bar contents to become
off-center. To account for this, update taskbar layout to reduce the
total icon size used for centering icons by the amount all apps button
is offset. This makes the taskbar off-center after initial layout, but
by the amount by which all apps button is eventually offset (resulting
in centered taskbar content).
This alone worked for left-to-right UI direction, but not right-to-left.
To fix this, correct the reference point from which
TaskBarViewController offsets icon positions. The offset used to be
calculated by distance of an icon index from half of the icon count -
instead offset needs to be calculated relative to mid-index.
For example, icon at index i needs to be offset by
(mid_index - i) * difference_in_icon_size: ((n-1) / 2 - i) * diff).
Code used to work for LTR UI layout because the list of icons contained
invisible qsb view, which incresed both n and indices by 1, so
(n' / 2 - i') * diff_in_icon_size worked fine, as it evaluated to
((n + 1) / 2 - i - 1) * diff = ((n - 1) / - i) * diff
Bug: 372567501
Test: Verify that taskbar icons are centered when it needs to be, both
with ltr and rtl language UI.
Flag: EXEMPT bugfix
Change-Id: Ic06873cc225a4361d9140d72c055db23f446a1ad
Made retrieval of the hotseat translation X easier to use.
Test: Manual. Set the navigation mode to 3-button. Moved the bubble bar
from one side to the other. Switched the navigation mode to gestures.
Moved the bubble bar from one side to the other again.
Bug: 373422448
Flag: EXEMPT refactoring
Change-Id: Ie69f1ecf178244008e5c752882c4b91a30928756
When bottom sheet is visible, such as in SUW or when app launcher pauses, the taskbar three buttons are translated upwards clashing with SUW UI.
Flag: EXEMPT bugfix
Bug: 358532768
Test: Manual
Change-Id: I0d18bda5cb7aeae894f5058df89cc413e34c00fc
Moved out logic that computes the translation X for the hotseat icons.
Fixes: 368379159
Test: Manual. Have the hotseat adjusted. Open any application from the
hotseat bar. Go back to home.
Flag: EXEMPT refactoring
Change-Id: If9dfa70be537f87b075bd865e7f9c5cd1ae78f00
Updated logic that computest the hotseat shift.
Fixes: 372014534
Flag: com.android.wm.shell.enable_bubble_bar
Test: Manual. Put device into 3 buttons navigation mode, force RTL.
Hotseat is placed next to the navigation buttons bar.
Change-Id: Ie7b6be11a093ffa4006182bdc0b73018ba799246
Updated logic of laying out the 3 nav buttons container. Also updated
placement of the hotseat, so it is not shifted on the phone.
Test: Manual. Fold and unfold felix with and without bubbles. Reboot
the devices and perform the same test.
Fixes: 370773620
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I7d5ba51f7ded275f7456a8690d04001b9651f6c5
- There are multiple signals that come just after FLAG_DEVICE_LOCKED
is removed, and those should still be considered part of the unlock
transition. We already did this for TaskbarStashController so I copied
it to TaskbarLauncherStateController.
- Also animate when changing SYSUI_STATE_OVERVIEW_DISABLED, since this
happens when the device is locked/unlocked and changes the visibility
of TaskbarView icons.
Test: manually unlock over both home screen and in-app, verify clean
transition without jump (e.g. Hotseat is immediately visible as part of
Workspace, and Taskbar fades in during unlock to an app)
Flag: EXEMPT bug fix
Fixes: 364586744
Change-Id: If0497fcc17bb0ec44294c4ea1163104b4d8be459
Whenever the location of the bubble bar is changed, the navigation bar
moves with a "teleport" animation to the opposite side.
Bug: 346381754
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Test: manual. Drag bubble bar from one location to another observe that
navigation is animated to the opposite side.
Video: http://recall/-/gx8ASgewUeUS3QYohfrd1J/g3zFtGYWFpCsBTkoCAhBUH
Change-Id: I6e32bb7ff7be56a0b616fec8485cc6a97d7ac872
Update the hotseat and Qsb placement according to the 3 nav buttons bar.
Test: Manual.
Set navigation mode to 3 buttons.
On launcher home screen move the bubble bar from one side to another.
Observe that the Hotseat and Qsb moving together with the navigation
bar.
Once moved the bubble bar, expand the bubble bar and collapse it.
Observe how the Hotseat is stashing and un-stashing.
After bubble bar changes position hit the recent apps button, observe
the transition.
On launcher home screen start application with the hotseat icon and exit
opened application. Observe that flying icon comes back to the correct
position in the hotseat.
Video with the above scenarios:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/blTYrKopTyufOcRoPuVpYK
Bug: 346381754
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Change-Id: Ic8c6acdffbbb111cbe4f3fd6bc60195578d7035d
- Opening KQS from keyboard shortcuts shows all the tasks.
- Opening KQS from taskbar will filter out all the running pinned apps
from the list of views.
Bug: 368119679
Change-Id: I6090679f9fc359212db00a325917892ae6e1eb39
Test: open KQS via taskbar affordance, obseerve filtered list,
use alt + option
observe list changes to show all tasks
click affordance again, observe list changes back to filtered
Flag: com.android.launcher3.taskbar_overflow
This reverts commit 5dc07d786f.
Reason for revert: b/360116669
Bug: 345768019
Change-Id: Id70ceed141e2106f746d4a0e68a09675ba45dd28
Fixes: 360116669
Test: open taskbar, open all apps w/ ime, use ime back button
Flag: com.android.launcher3.enable_scaling_reveal_home_animation
- Adds placeholder view to represent the Overflow affordance.
- Overflow button will always appear as long as there are any
recent apps.*
- Click / long click on the button will open KeyboardQuickSwitch
- Relevant code is Guarded by Flags.taskbarOverflow.
*Note that this is not up to spec. This change is only meant to
setup the codebase to support Taskbar Overflow.
Bug: 368119679
Test: open app, enter desktop windowing, click overflow button
Flag: com.android.launcher3.taskbar_overflow
Change-Id: I47f96797408fda09e8326ba8fb7981c91de80e36
Moved logic that adjusts the hotseat position from the constructor of
the NavbarButtonsViewController to onTaskbarLayoutChange() method that
is called from the TaskbarViewController TaskbarView layout change
listener.
Test: Manual:
Moved the bubble bar to the default right position. Rebooted the device.
Navigation bar was placed on the left side of the screen.
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Bug: 367829539
Change-Id: Ife0c48a72b318d6051b7b09bde13818546e65d98
Implemented nav bar placement update to be located opposite to the
bubble bar.
When bubble bar is moved to the other side of the bar, 3 button nav will
swap sides (without animation).
If taskbar has to be repositioned it does that with the animation.
Test: TaskbarViewControllerTest
Bug: 346381754
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Id031706183c60cbd9c67537b01530acb43bae614
Moved DesktopVisibilityController to TIS for 3P launcher support.
Flag: EXEMPT bug fix
Fixes: 338063030
Fixes: 357859025
Test: Launched overview and resumed desktop task from desktop mode on 1P and 3P launchers
Change-Id: I64e99a32ed13bcb6e4a81a18c29df2643373dc35
This cl includes
- Usage of TaskbarAllAppsButtonContainer and TaskbarDividerContainer in TaskbarView. This can be seen as a refactor.
- Animation refactor related to all apps button container refactor
Test: Presubmit
Bug: 356465292
Flag: com.android.launcher3.enable_taskbar_customization
Change-Id: I5b7c4f56aacac18fc6872f77b15e2e9ae896799e
- Also removed unused rotation button code
- Skip adding certain property holders in phone mode
- Update FLAG_SMALL_SCREEN value from isPhoneButtonNavMode to isPhoneMode, so that it's more aligned with what the name suggests (it shouldn't affect the functionality regardless as the view is invisible in small screen)
Based on https://b.corp.google.com/issues/361593564#comment4
Bug: 361593564
Test: manual
Flag: EXEMPT bugfix
Change-Id: I1de7fa061a6c6aba9f949a0bcf8cfced84273e3f
Before: when launching an app and immediately swiping home, the icon alignment
animation would become stale, which lead us to playing the wrong interpolator
for the action key alpha animator.
Fixes: 359579152
Test: open app, then immediately swipe home
Flag: EXEMPT bugfix
Change-Id: Ief08bd0fcb9fdc60efd0b8dd0821c1122cfa6f4f
Also fix calculation for divider position during this transition
when there are recent apps. Added tests as well.
Flag: com.android.launcher3.enable_recents_in_taskbar
Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps
Test: TaskbarViewControllerTest
Bug: 343522351
Change-Id: Ifffd620c1d4c156b37561584d6e3278b39804439
Debugging locally, it seems there were a couple of state changes
and the last one (which is correct) was getting clobbered by a
previously destroyed instance of TaskbarLauncherStateController.
Fixed this by updating the isDestroyed() call which previously
only checked TaskbarActivityContext to now check
TaskbarLauncherStateController's destroyed state directly. This
is needed because TaskbarLauncherStateController is part of
LauncherTaskbarUIController which can be destroyed independently
of the other Taskbar controllers when Launcher is destroyed.
Also fix a debug log that was not updated long ago in ag/21122190
Flag: EXEMPT bugfix
Test: Go to overview, change Font Scale or Dark Theme from Quick
settings, ensure Taskbar is not visible over Hotseat
Fixes: 302923055
Change-Id: I1299462955b51a2bf931f022177045b1cec039c5