Commit Graph

16 Commits

Author SHA1 Message Date
Jeremy Sim
b392f61ced Refactor SplitBounds to always use creation-time measurements
In flexible split ratios like 90:10 and 10:90, we hide the Overview icon of the smaller app completely (ag/30949010). However, there was an unintentional side effect where one of the icons would disappear when rotating the display.

This happened (basically) because SplitBounds is not recalculated on device rotation, so fields like leftTaskPercent and topTaskPercent should not be used directly when the rotation state is not known. I added an API to SplitBounds that hopefully makes it harder to write bugs like this in the future.

Fixes: 395783367
Flag: com.android.wm.shell.enable_flexible_two_app_split
Test: Icons do not disappear on rotation. When app chip menus are enabled, the (existing) correct behavior is not changed.
Change-Id: I2c1b38f4bd9a76dfb127b7bbf230897d747d3c49
2025-02-20 12:45:33 -08:00
Schneider Victor-Tulias
0ae28ca5d0 Update KQS text font family to match new specs
Flag: com.android.launcher3.expressive_theme_in_taskbar_and_navigation
Fixes: 393615634
Test: opened KQS, be before/after in bug
Change-Id: Ia953e2b927b6e69c0c150df01925436b6247d751
2025-02-14 10:49:30 -05:00
Shuming Hao
3ff6087d98 Set KeyboardQuickSwitchView ratio correctly.
This CL sets the thumbnailView ratio correctly in Alt-Tab UI. The currently supported ratios are `SNAP_TO_30_70, SNAP_TO_50_50, SNAP_TO_70_30`. This can be extended when we add more split modes later.

Bug: 328691131
Test: manual in both landscape and portrait mode.
Flag: EXEMPT bugfix
Recall: http://recall/clips/79f3b250-d691-4b03-93c3-825a80478ae0

Change-Id: Idf4f174d1b222a8f3c80e5c6ed17c5bf53d3368c
2024-09-05 10:13:36 -07:00
Schneider Victor-tulias
55c0c5e75d Update KQS recents apps and desktop mode launching UX
- Updated recent apps KQS task view
- Added a desktop mode KQS task view
- Did some code cleanup to support this more cleanly

Flag: EXEMPT ENABLE_KEYBOARD_QUICK_SWITCH
Fixes: 357512178
Test: Used KQS with and without desktop mode; opened recent apps and desktop mode
Change-Id: Ib47a8a7f41b56af1ba9d0cbec65ababf8aad7881
2024-08-30 13:46:23 +00:00
Uwais Ashraf
1aa0e96d1f Use getter for thumbnail from converted ThumbnailData in Java
Bug: 334825222
Test: NA - one for one conversion
Flag: NA
Change-Id: Ibad85c59d7696f177d0fb723b7fd5b8983ecc974
2024-05-16 16:07:29 +00:00
Schneider Victor-tulias
841734e091 Use the task background color in KQS when we are missing a thumbnail
Flag: LEGACY ENABLE_KEYBOARD_QUICK_SWITCH ENABLED
Fixes: 328686729
Test: forcibly used a null bitmap in dark/light modes
Change-Id: Ie5e106d6b0e69a60a77d065b945fe036c6dd9ef9
2024-03-25 13:26:35 -04:00
Schneider Victor-tulias
dba7cbae1a Update KQS task view layouts to new specs
The small size of the screenshots and make text look odd. Implementing new UI specs to improve this.

- Updated icon position and size
- Added some blur to the thumbnail

Flag: LEGACY ENABLE_KEYBOARD_QUICK_SWITCH ENABLED
Fixes: 328259439
Fixes: 328692456
Test: opened KQS in dark and light mode
Change-Id: I2b20100ddeb562291edf5f0bacbce916002eee45
2024-03-13 15:03:45 -04:00
Schneider Victor-tulias
7335bcf7f5 Refactor the BorderAnimator for simplicity
The internal implementation of BorderAnimator does not need to be as exposed. refactored the class to be simpler to implement

Flag: ENABLE_KEYBOARD_QUICK_SWITCH, ENABLE_CURSOR_HOVER_STATES
Bug: 302334949
Test: check border animation in keyboard quick switch and recents view
Change-Id: I8a2e4fa0abc5af743352cd6409aee9f2912b41a2
2023-09-29 15:08:05 -04:00
helencheuk
27f23c7a35 Re-land "Add hover state border to overview task item"
Fix: 249859410
Test: b/291266459
Change-Id: I5ac1e9e77439e587f11c994d22fdc72d20d8502d
2023-07-20 18:35:22 +01:00
Schneider Victor-tulias
7dee27f470 Update BorderAnimator to work with layout updates
1. if a 'ViewScaleTargetProvider' is being used, this can cause a crash
2. otherwise, the old border bounds are reapplied, which is likely no longer correct

Updated BorderAnimator to use 'BorderAnimationParams' rather than 'ViewScaleTargetProvider'. This removes some unnecessary null checks while making the util class simpler to use. It also allows us to listen for specific view events for the border animation.

Flag: ENABLE_KEYBOARD_QUICK_SWITCH
Fixes: 283272516
Test: opened the keyboard quick switch view and highlighted a view in recents view, then rotated the screen several times
Change-Id: I7959d6cd892ebcdd2c68163dd56c358815494af6
2023-05-22 11:33:57 -07:00
Saumya Prakash
033412a892 Display app icons in quick switch task view when there are no updates.
Flag: ENABLE_KEYBOARD_QUICK_SWITCH
Fix: 275629107
Test: Launched keyboard quick switch view and changed focus back and forth

Change-Id: I6ce39e7842bb04c80d49d871002ef957708a8e59
2023-05-16 23:00:46 +00:00
Schneider Victor-tulias
4ee471fecf Merge "Update keyboard quick switch view ordering and add icons" into udc-dev 2023-05-16 05:12:47 +00:00
Schneider Victor-tulias
b6407699ae Update keyboard quick switch view ordering and add icons
- Updated the keyboard quick switch view ordering to left-to-right (vice versa in RTL)
- Added app icons to keyboard quick switch taskviews

Flag: ENABLE_KEYBOARD_QUICK_SWITCH
Fixes: 275629107
Test: launched keyboard quick switch view and changed focus back and forth
Change-Id: Ie2f0a1c08c7065c53075f6fa015000a2d6184491
2023-05-15 12:06:19 -07:00
Schneider Victor-tulias
581fd3eede Code cleanup: recycle typed arrays when they are no longer needed
The border animator does not need the typed array anymore after initialization. recycling the object.

Flag: ENABLE_KEYBOARD_QUICK_SWITCH
Fixes: 282202504
Test: changed focus in quick switch view and overview
Change-Id: Iea9077e49e754894008899dfc9b90e3876b53051
2023-05-15 11:38:17 -07:00
Schneider Victor-tulias
5e68914621 Update the BorderAnimator
Updated the BorderAnimator to allow it to animate the border outside the view's bounds. This makes it match the specs and makes it more compatible with other animations.

Flag: ENABLE_KEYBOARD_QUICK_SWITCH
Test: tried keyboard quick switching on a handheld, foldable and tablet
Fixes: 276336349
Change-Id: I025f8b0f431e78bcb5c7b4b3859a7d6dde5da600
2023-04-18 20:12:59 +00:00
Schneider Victor-tulias
de7ceba80b Add the KeyboardQuickSwitchView (2/2)
Adding KeyboardQuickSwitchView and associated flows.

Test: Manually tested alt-tab and alt-shift-tab in and out of overview on a tablet and phone
Bug: 258854035
Change-Id: Ifb48b005067b3a9c66acfd5ecdbae144b359d3be
2023-02-14 13:34:37 -08:00