Commit Graph

558 Commits

Author SHA1 Message Date
Jon Miranda
7645ef2ebd Simple implementation of Taskbar Overflow.
- 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
2024-09-21 00:28:20 +00:00
Liran Binyamin
7b0c32567f Merge "Update bubble bar flyout according to spec" into main 2024-09-20 16:42:34 +00:00
Liran Binyamin
19a43fb7cf Update bubble bar flyout according to spec
Also add a triangle

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: atest BubbleBarFlyoutViewScreenshotTest
Test: atest BubbleBarFlyoutControllerTest
Change-Id: I1a16ba6c9e1a2ca4efe01524ba3ef1d049f81d68
2024-09-19 14:02:43 -04:00
Treehugger Robot
1880988d5f Merge "Make AllSetActivity IDP change-aware" into main 2024-09-18 19:21:18 +00:00
Schneider Victor-Tulias
e57c034554 Make AllSetActivity IDP change-aware
Flag: EXEMPT bug fix
Fixes: 366129654
Test: adb shell cmd overlay enable-exclusive --category com.android.internal.systemui.navbar.threebutton while in AllSetActivity
Change-Id: I42dec6a94bf445866828b7404ae5451d505fda02
2024-09-18 10:22:23 -04:00
Liran Binyamin
36b5ef2271 Create BubbleBarFlyoutView
Initial version of the flyout view for displaying bubble bar
notification.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: atest BubbleBarFlyoutViewScreenshotTest
Test: atest BubbleBarFlyoutControllerTest
Change-Id: I5d0643fe5d2691ad2349b45eaaad6cd2660d9df0
2024-09-17 11:14:54 -04:00
Alex Chau
98484db4ea Set DigitalWellBeingToast to GONE when there is no limit
- Surprisingly swithcing between GONE and VISIBLE doesn't cause a jank when swiping up
- Having DigitalWellBeingToast GONE should reduce the amount of time to layout RecentsView when there is no banner, which should fix b/364621823
- It might or might not reduce memory usage in b/364568201
- Also add missing accessibiltiy node for DigitalWellBeingToast

Bug: 364621823
Test: Swipe up with the app having DWB banner in different index, no jank when landing to Overivew
Flag: EXEMPT BUG_FIX
Change-Id: Ibf5a7f5318de509fe572779dd774dce71881aabe
2024-09-06 14:26:14 +00:00
Alex Chau
fae91d5e57 Include DigitalWelllBeing banner in task XML to avoid addView during animation
- Also simplified DigitalWellBeingToast to be an actual View that is a children of TaskView
- Split out getDwbLayoutTranslations into 2 methods
  - One that update layout will be called earlier during TaskView.updateTaskSize. It now takes calcualted split snaphsot size and layoutParams sizes instead of using measured sizes so it can run before onMeasure. Also make sure updateLayoutParams is called.
  - One that calulate translations only can be called more frequently without causing jank during animation
- TaskView.updateTaskSize now always set the exact sizes as layoutParams instead of MATCH_PARENT, so we can use the values for updateDwbBannerLayout
- Simplified outline and splitOffsetTranslation calculations

Fix: 345789862
Fix: 362435532
Test: Presubmit and manually testing DWB banner in variaous configuration single/split real/fake portrait/landscape/fake
Flag: EXEMPT bugfix
Change-Id: Ibde877c5f983689e0ef8104ba344b5947d0e3948
2024-09-03 17:02:31 +00:00
Schneider Victor-tulias
f0a6d1df57 Update KQS UX to better support square aspect ratio devices
Flag: EXEMPT ENABLE_KEYBOARD_QUICK_SWITCH
Bug: 357512178
Test: Used KQS on a square device
Change-Id: I3e97ec834512521b417f2e707a6838c96bef5752
2024-08-30 13:47:38 +00: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
e0a0ebeece Prevent requestLayout() when updating drawables that don't change size
Fix: 354224963
Test: presubmits passing, manual
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I31d9a51ed621f411bcafbb5bf885ee2587df057f
2024-08-21 15:45:05 +00:00
Uwais Ashraf
f1c14902ca Fix splash icon size to 52dp
Fix: 360804090
Test: presubmits passing, manual
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I1bc14be7d2d25a985d26709eb59b8aa4887d4764
2024-08-21 15:44:03 +00:00
vinayjoglekar
95e590229a Announce “Desktop” when focusing on the desktop mode in Overview
https://drive.google.com/file/d/1MNUyDtRhyU8tKRZ5JONLAeUBQ_8Vrids/view?usp=drive_link

Test: NA
BUG: 329375034
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: I36460002be94697746fb085e4aeca9a6ac804002
2024-08-13 13:16:10 +00:00
Treehugger Robot
3307f87b82 Merge "Implement e2e test for desktop windowing" into main 2024-08-08 11:32:10 +00:00
Alex Chau
1ceac5ddfe Implement e2e test for desktop windowing
Code changes:
- TaskView, GroupedTaskView and DesktopTaskView now uses different resId, so it can be differentiated by TAPL
- Extracted result handling of icon loading, so we can override in DesktopTaskView
- DesktopTaskView now load icons, so titleDescription can be loaded. When icons are loaded, contentDescription are applied to respective snapshotViews; icon unloading is ignored
- Track launchDesktopFromRecents and composeRecentsLaunchAnimator in TAPL events so we can test if the TaskView launch path is correct

Test changes:
- Added TaplTestsOverviewDesktop that move 2 TestActivities into Desktop, and launch the DesktopTaskView as static and live tile
- TaplTestsOverviewDesktop is limited to Tangor/cf_tablet only, and added LimitDeviceRule to AbstractLauncherUiTest to enable @AllowedDevices and @IgnoreLimit

TAPL changes (2 APIs added/modified):
- Changed TaskView matcher to use id/task_view_* to match all TaskView types
- When Overview is launcehd from Background, mark the currentTask after the launch as liveTile. When an OverviewTask has the same accessibility node as the liveTile, it'll expect different event when launching.
- [API change] BaseOverview.getTestActivityTask can now matches mutiple test activiites, useful for matching GroupedTaskView and DesktopTaskView; Fix a bug that getTestActivityTask wrongly use `getParent()` which is RecentsView to match activityName.
- In OverviewTask.open, we'll expect different events based on TaskView types and whether it's a live tile. Launching DesktopTaskView will in additional verify Desktop header is present on screen.
- [API change] In OverviewTaskMenu, support tapping Desktop menu and verify Desktop header is present on screen.
- Removed unused OverviewTaskMenuItem

Fix: 320313527
Test: TaplTestsOverviewDesktop
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: I89261c787364901320f3acb18f01ddad5f62d17c
2024-08-08 10:37:40 +01:00
Jeremy Sim
394f5d2b7f Fix problem with "Cancel" text not double-bolding
This CL changes the way the "Cancel" string is bolded, so that it can automatically react to the "Use bold text" accessibility setting and double-bold itself appropriately. (Previously the bolding was hard coded in XML, this change allows TextView to handle its own bolding.)

Fixes: 323111449
Test: Visually confirmed
Flag: EXEMPT bugfix
Change-Id: Ie50b5a1aab569cebd0101814b6ba896ad4151e7b
2024-08-06 16:10:20 -07:00
mpodolian
484ff0fe9c Integrated new BubbleStashControllers into the existing code.
Integrated the PersistentTaskbarStashController and the
TransientTaskbarStashController into the launcher code. Made changes to
the TaskbarInsetsController to set appropriate touchable zones. Updated
the TaskbarUIController to not start the overview transition on clicks
for the collapsed bubble bar.

Bug: 346391377
Fixes: 350065038
Fixes: 355664783
Flag: com.android.wm.shell.enable_bubble_bar_in_persistent_task_bar
Test: com.android.launcher3.taskbar package tests

persistent taskbar and transient taskbar manual testing:
- on launcher home screen expand bubble bar, switch between bubbles,
remove bubble via bubble menu, add bubble, remove bubble with the drug
gesture, add bubble, collapse bubble bar
- repeat previous test on launcher overview screen and inside any
application
- after last test drag expanded bubble view to the opposite side of the
screen

Change-Id: I50f2c510854c4895fdfc9bd453a261c2103286fd
2024-07-30 18:36:05 -07:00
Uwais Ashraf
06dd94c66a Add splash state to new TTV
Bug: 334826842
Test: test classes added in CL
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ia7c2de18b5ff932430946df6b4c27929d715e79c
2024-07-25 14:35:00 +00:00
Marcelo Arteiro
f38d98d1a6 Align color resources in launcher projects.
This is an effort to align/unify color usage across all launcher projects and the system itself.
This fix recreates all dynamic color attributes present in the OS since many launcher areas cannot access private attributes.
It is recomemnded to use these new local attributes in all launcher areas and avoid creating new color resources when these can be used directly.

Bug: 352690172
Test: Presubmits
Flag: EXEMPT bugfix
Change-Id: Ic36b8bf70ee37f2fdd32e459e66f0e2d001d6ba2
2024-07-19 14:22:21 +00:00
Alex Chau
893f4c6a45 Apply PreviewPositionHelper matrix to TTV and Overlay
- Added GetThumbnailMatrixUseCase to retrieve task using taskId and calcualte Matrix using provided canvas size and isRTL
- TTVM and OverlayVM will uses GetThumbnailMatrixUseCaseTest with runBlocking to obtain the matrix from the loaded thumbnail
- TTV and Overlay listen for size change, and call VM to get the latest Matrix and apply to the view

Fix: 343101424
Test: GetThumbnailMatrixUseCaseTest
Test: TaskThumbnailViewModelTest
Test: TaskOverlayViewModelTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: If3f37824bed84d5cbaa54d7a4b12f5f1ef4e2c09
2024-07-18 13:07:14 +01:00
Jagrut Desai
dafd7f55ed Adding Skeleton Code for Customizable Taksbar
This cl includes
        - new skeleton xml view customizable taskbar view
        - new skeleton xml view for customizable taksbar container and a view class.
        - new taskbar all apps button view container class
        - pxFromDp util method introduction to launcher utilities

Test: Presubmit
Bug: 349885828
Bug: 349886203
Flag: com.android.launcher3.enable_taskbar_customization
Change-Id: Id83906ed0717da495c33275e52261153a1598074
2024-07-15 13:06:12 -07:00
Uwais Ashraf
7e7afac7c0 Change drawing in TTV to use Views rather than Canvas
Fix: 352332386
Test: Presubmit, Manual
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ia1b7b6dc3d093d431ce022e793f40e61cec38ac6
2024-07-11 13:19:21 +00:00
Alex Chau
3fde467b41 Make DeskopTaskView use latest TTV
- Made TaskThumbnailViewDeprecated nullable in TaskContainer, with non-null getter that requires feature flag to be on/off
- Removed TaskThumbnailViewDeprecated.setTaskOverlay, as it'll now be null with feature flag on
- Removed TaskThumbnailViewDeprecated from DesktopTaskView xml
- Simplifed DesktopTaskView binding logic, to always get thumbnailViews from viewPool, removeView and recycle all thumbnailViews in onRecycle
- Didn't implement view pooling of TaskThumbnailView due to difficulty with TaskContainer not being recycled togetehr with TaskThumbnailView

Bug: 338360089
Test: TaskThumbnailViewModelTest
Test: manual testing for DesktopTaskView for both enable_refactor_task_thumbnail on and off
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: I38a6dfc6bc561689578d1660794f91d30bad4a68
2024-07-05 18:39:56 +01:00
mpodolian
563c2101cf Animate bubble bar icon sizes and padding
Added animation for the updates of bubble bar icon sizes and padding

Fixes: 335575529
Flag: com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Test: BubbleBarViewAnimatorTest
Change-Id: I07d66b3a9d565f4fa6040c3c4bf4866e4d81a3a6
2024-06-14 01:25:05 +01:00
Winson Chung
73cf3bc3a1 Add max width to the screen instructions view text
- This ensures that the instruction wraps if the text is too long

Fixes: 328577545
Fixes: 345128488
Flag: EXEMPT bugfix
Test: Visual inspection of instructions view in different languages/form
      factors
Change-Id: I73e889372a5c482277b0e4b61fb834304304c0a6
2024-06-07 20:59:07 +00:00
Alex Chau
7779855ab4 Merge "Fix icon and DWB toast focus transition" into main 2024-06-05 14:58:52 +00:00
Alex Chau
481e3ae079 Fix icon and DWB toast focus transition
- icon and DWB toast now transition in with animation when swipe up from apps to Overview
- Refacotred focusTransition into MultiProperty, with separate control from fullScreenProgress and scaleAndDim, and get rid of "invert" parameter and iconScaleAnimStartProgress variable which is very confusing
- Added a SCALE_AND_DIM_OUT property for use with PendingAnmation during dismiss, as PendingAnimation does not support per animator interpolator
- Use height from resource in DWB toast when calcualting translation, so translation can be properly set before view is measured
- Always set bannerOffsetPercentage regardless if banner is added

Fix: 344786723
Fix: 315972057
Fix: 313644427
Flag: EXEMPT bugfix
Test: Quick switch from home, icon and DWB toast don't transition in until gesture release
Test: Quick switch from app, icon and DWB toast don't transition in until gesture release to Overview
Test: Dismiss focus task, icon and DWB toast transition in after transition settle
Test: Swipe down task, icon and DWB toast transition out with finger
Test: Launcher central task, icon and DWB toast transition out
Change-Id: Ie16a2ceff10967de38b5f66c52f4be00d0051c5f
2024-06-05 12:33:25 +01:00
Jagrut Desai
e263730c1e Merge "Make Taskbar Divider PopUp Menu Width Dynamic" into main 2024-06-04 17:13:36 +00:00
Jagrut Desai
38478e74f9 Make Taskbar Divider PopUp Menu Width Dynamic
Test: Manual
Bug: 327647761
Flag: com.android.launcher3.enable_taskbar_pinning
Change-Id: Ib5c13324afee46b45b2c71e3af86c15a6384a278
2024-06-03 10:26:41 -07:00
Jagrut Desai
4c6913395c Merge "Accessibility Annoucement for the always show taskbar switch" into main 2024-05-31 05:33:15 +00:00
Jagrut Desai
7570f36e28 Accessibility Annoucement for the always show taskbar switch
Test: Manual
Bug: 326012899
Flag: com.android.launcher3.enable_taskbar_pinning

Change-Id: Idad1c6349d14153468e0c660703f5ff1808ab8e5
2024-05-30 14:50:53 -07:00
Jeremy Sim
1ab32a7942 Address jank and memory issues with OverviewActionsView
Attempt to improve jank and memory regressions by simplifying the view layout of OverviewActionsView.

Bug: 339688091
Bug: 339853741
Test: testSaveAppPairMenuItemOrActionExistsOnSplitPair()
Flag: EXEMPT bugfix
Change-Id: Ib4a7c5a813b221c0a083144e7fb1e1c5f3fedb1c
2024-05-28 13:16:52 -07:00
Helen Cheuk
bd10f8f08d Merge "Fix navigation buttons focus state" into main 2024-05-16 10:27:02 +00:00
helencheuk
7278073b57 Fix navigation buttons focus state
Two focus states in the same screen because taskbar and launcher are two processes. And we could not use keyboard to navigate to the nav button, agreed with UX that it should not have focus state. Make it not focusable to remove focus state as we are unable to focus on it by keyboard anyways. Tested that it would not affect TalkBack and SwitchAccess.

Only one focus in testing video: https://drive.google.com/file/d/18X3dtsvqfCMpdI7sBRxnaKwUCQzhHn8n/view?usp=sharing

Bug: 327386991
Test: Manual, navigate by keyboard in homepage and ensure there is no focus in the nav buttons
Flag: ACONFIG com.android.launcher3.enable_focus_outline Nextfood
Change-Id: I289ecb1784f8eb9b58bb36b28059ce4f367cf84e
2024-05-15 12:03:09 +00:00
Pragya Bajoria
d9900e0d17 Remove obsolete desktop stashing logic from platform/packages/apps/Launcher3 [5/n]
Bug: 309481654
Change-Id: Id7b5db662d578eb625171055d30c37cd59e7d73c
Flag: EXEMPT refactor since it is removing obsolete code with no changes to current behavior.
2024-05-15 09:16:13 +00:00
Saumya Prakash
9352374c08 Merge "Move the Done button in gesture navigation tutorial" into main 2024-05-11 00:41:54 +00:00
Saumya Prakash
b8782e7341 Move the Done button in gesture navigation tutorial
To align with updated UX specs, this change moves the Done button in
each gesture's tutorial from the middle of the screen to the bottom
right.

Fix: 293285057
Test: Run through the gesture tutorial in all font/display sizes for
different form factors and check that the Done button after each step is
in the new location.
Flag: LEGACY ENABLE_NEW_GESTURE_NAV_TUTORIAL ENABLED

Change-Id: I2f2a7be0bf365727cff030f827e539add8533c18
2024-05-10 21:18:36 +00:00
Ats Jenk
5b650d0796 Merge "Update expanded view drop target size based on value from shell" into main 2024-05-09 20:06:10 +00:00
Alex Chau
ec547e0c32 Merge "Recycle thumbnailViews in DesktopTaskView" into main 2024-05-08 22:20:22 +00:00
Alex Chau
4205013b0a Recycle thumbnailViews in DesktopTaskView
- Changed mTaskContainers to a List
- Added an XML for TaskThumbnailView to make it compatible with ViewPool
- Removed mSnapshotViews variable, and streamlined DesktopTaskView binding logic to re-use thumbnailvIew from mTaskContainers or ViewPool

Bug: 249371338
Fix: 251586230
Test: manual
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode DEVELOPMENT
Change-Id: Iab7575e9c36b8ebf3eb62f19f13d75ba671f9f4f
2024-05-08 22:19:27 +00:00
Ats Jenk
f3224cf847 Update expanded view drop target size based on value from shell
When a bubble drag starts, shell sends the current expanded view size
over as part of BubbleBarData. Update the size stored in
BubblePinController based on latest value.
Update drop target visual to match the spec. It should have 24dp insets
compared to expanded view and 28dp corner radius.

Bug: 330585402
Test: drag bubble in landscape, check that drop target for expanded view
  matches with what is shown when expanded view is dragged
Test: drag bubble in portrait, check that the drop target for expanded
  view, matches with what is shown when expanded view is dragged
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Change-Id: Ic11c4c5c675107543ba08f24a4138cda422d24c1
2024-05-08 14:05:03 -07:00
Jeremy Sim
41eadd1a91 Fix bug with double-relayout of Overview Actions View
This CL refactors Overview Actions View so that a separate view, R.id.group_action_buttons, is used for buttons related to grouped tasks. This also changes the way visibility is handled with actions buttons -- instead of all buttons living on one bar and being toggled on and off, sometimes the whole bar is toggled on and off (to change from single task actions to group actions and vice versa).

This prevents the same view from having its visibility changed twice in in one layout and causing the wrong visibility to be rendered.

Fixes: 333844287
Test: Manual
Flag: ACONFIG com.android.wm.shell.enable_app_pairs NEXTFOOD
Change-Id: I1b6be4637ac8c8d424e7633c437fca376ecdd757
2024-05-07 11:18:24 -07:00
Ats Jenk
363a841a04 Drag bubble in bubble bar to other side
Adds support to pin bubble bar to other side of the screen by dragging
from one bubble. The entire bubble bar will move to the other side.
Implements the BaseBubbleBarPinController to handle dragging an
individual BubbleView.
Updates how translation and alpha get applied during BubbleBarView
location animation when a bubble is being dragged.
Dragged bubble is part of the BubbleBarView and when it is being
dragged, and we animate the bubble bar to the other side, we need to
ensure that the animation does not affect the dragged bubble.
Updating the translation and alpha for the BubbleBarView ViewGroup will
affect the dragged bubble as well. Updating how translation and alpha
gets applied to BubbleBarView so that it gets applied to individual
child views and then we can skip applying it to the dragged view.

Bug: 330585402
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Test: drag bubble from expanded bubble bar to left and right

Change-Id: I1fe2ba9fd466ff97d3b3af763bdcce30c3f98606
2024-05-01 14:53:14 -07:00
Jordan Silva
4e741082dc Merge "Make TaskMenuViewWithArrow width wrap content with a minimum width" into main 2024-04-26 15:14:46 +00:00
Saumya Prakash
8245ac04e3 Merge "Only run search edu when enabled, also make code more generic." into main 2024-04-24 16:13:43 +00:00
Uwais Ashraf
e21525da40 Add a refactored TaskThumbnailView
- Live Tile, swipe (left+right) and dismiss working
- Tests of ViewModel state transitions
- Deprecate the old TaskThumbnailView
- Renaming TaskThumbnailView to TaskThumbnailViewDeprecated

Fix: 335440878
Fix: 331754672
Bug: 331753115
Test: TaskThumbnailViewModelTest
Test: Attached video on bug
Flag: ACONFIG com.android.launcher3.enable_refactor_task_thumbnail DEVELOPMENT
Change-Id: I063b957fe6e56960970dcaadc641848fbd73251c
2024-04-23 23:05:14 +01:00
Saumya Prakash
17cd6ca62a Only run search edu when enabled, also make code more generic.
We only need to run the Search edu if it is enabled on devices. The code
itself is also made more generic in terms of method and variable names.

Fix: 330401405
Test: Enable and disable the search function and check whether the edu tooltip shows
up for each specific use case.
Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning NEXTFOOD

Change-Id: I1cea3ee56922c0b47ae7e8379aad4b36570daa17
2024-04-23 22:02:15 +00:00
Alex Chau
0e64dbe149 Make TaskMenuViewWithArrow width wrap content with a minimum width
- Also add a end padding for the text
- http://screen/3yTa8tmJfJuVf2t

Fix: 331555315
Test: OverviewMenuImageTest
Flag: NONE
Change-Id: Ic9bc2799cd25f87d2ec6c7ce83d50d060513a292
2024-04-23 11:53:48 +01:00
Mykola Podolian
1f40fa0e7f Merge "Updated pointer to match visual specification." into main 2024-04-22 16:06:39 +00:00
Schneider Victor-tulias
ec39107105 Update KQS to better support desktop tasks
While we wait for a way to display a sreenshot of the desktop statically, using a placeholder solution.

Flag: LEGACY ENABLE_KEYBOARD_QUICK_SWITCH ENABLED
Fixes: 335632286
Test: TaplTestKeyboardQuickSwitch
Change-Id: I2525ab89eb3a5a902e7ab55367187d87aada1f10
2024-04-19 14:53:20 -04:00