Commit Graph

18103 Commits

Author SHA1 Message Date
Shamali P
809e1a8efb Fix issue that old search results list show up momentarily
After exiting the search, we clear the search results and hide the
results lists (because that recycler view shouldn't be accessible after it). However, it often doesn't get chance to layout the empty data.
So, the next time we show the search results list again with new data,
it first animates to clear the old results and then animates in the new
ones. In this fix,
[demo](http://screencast/cast/NDg5OTg2NzIyMTU1NzI0OHxhMTk0NzEzZS1hYw), we swap the adapter to remove any old views, because old search results aren't valid anymore. Spoke with yigit who worked on RV in past and they suggested swapAdapter
was fine for this.

Other options explored:
1. set item animator = null; so, it doesn't animate flushing out old
results -> but we want animations
2. delay the visibility update to let layout happen -> but, if we are
 hiding the section,  why wait making the other UI updates until
layout?

Bug: 274051332
Flag: N/A
Test: Manual
Change-Id: I9f9c5a67b47b5415b2d9e4caa23fd4b6daf7cdea
2024-04-01 23:07:03 +00:00
Shamali P
48c2f8a0dc Don't show badge for widgets in recommendations
- Now that we display app logo, it will already be badged. So, another
badge on widget itself is not necessary. Moreover, when widget previews
don't fill bounds, its position feels inconsistent.

Bug: 331838199
Test: Manual (see screenshot in bug comment)
Flag: N/A
Change-Id: Id411d054de634d7735b70fff9540e580b078b741
2024-04-01 14:39:58 +00:00
Jeremy Sim
da4ba9336e Merge "Reparent folders and app pairs" into main 2024-03-30 03:06:44 +00:00
Jeremy Sim
742630c2f8 Reparent folders and app pairs
Previously, app pairs and folders shared a common data model, FolderInfo. Now we need to separate them, so a new type, CollectionInfo, will serve as the parent of both types.

Bug: 315731527
Fixes: 326664798
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, unit tests to follow
Change-Id: Ia8c429cf6e6a376f2554ae1866549ef0bcab2a22
2024-03-29 15:39:28 -07:00
Treehugger Robot
520d91f93b Merge "Don't toggle scrollbar during predicitve back swipe to avoid flicker" into main 2024-03-29 09:56:10 +00:00
Brandon Dayauon
4958ecfadb Merge "Move adding views logic to privateProfileManager" into main 2024-03-29 04:03:42 +00:00
Brandon Dayauon
136f9d6f8a Move adding views logic to privateProfileManager
- Have the animation happen according to the state of private space.
- Have the transition happen only once by setting the current transition to null at the end of transition and by ensuring
where the transitions are allowed.
- Removing controller class.

- The onClick controls the enablement of the profile. On reset (when getting the transition) is what controls the animation
during expand.

tldr- In the collapse case:  execute() is called -> animation happens  -> addPsHeader
tldr- Expand case: post() is called -> addPsHeader -> animation happens.

Collapse:
onClick() -> AACV.onAppsUpdated() that resets & apply/RUNS runnable because EXECUTE
-> AAList.onAppsUpdated() (which is called at the same time animating happens which we should cancel and do at end callback)
-> AAList.onAppsUpdated() gets called again

Expand:
onCLick() -> AACV.onAppsUpdated() that resets & apply runnable
-> AAList.onAppsUpdated() (no animation running)
-> AAList.onAppsUpdated() (no animation running)
-> addPrivateSpaceHeader
-> then unlockAction() runnable because its posted at this point

bug: 326206132
bug: 330444548
bug: 299294792
Test: manually locally and presubmit: https://screenshot.googleplex.com/9wavvwKQ8hY6oUw & https://screenshot.googleplex.com/BiqmidLFjPwS28j
video: https://drive.google.com/file/d/1XGhmTncdUFtJj188_l7alGyyNz_fhXNw/view?usp=sharing

Scrolling fix before: https://drive.google.com/file/d/1XykDm4UELoCvcwZdj8ZlJ6TszptB8W0W/view?usp=sharing
scrolling fix after when not a lot of apps: https://drive.google.com/file/d/1Y4VY1eX7WE8ShSLXRrT56ieBdAuJo_zn/view?usp=sharing
scrolling fix after with a lot of apps: https://drive.google.com/file/d/1Y58c-Z9xnU1GILp0Ih-oLORXYkMB-jWn/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation

Change-Id: I8d03ae60e2c9fe0ec145c4b0a2e9604b9e6e9017
2024-03-28 17:39:42 -07:00
Sebastián Franco
0ec7c1e4a8 Merge "Generate grid migration cases and test if they are valid" into main 2024-03-28 16:31:37 +00:00
Fengjiang Li
61102b66e8 Merge "Extend CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK to start as early as when user starts predictive back swipe" into main 2024-03-28 01:02:00 +00:00
Fengjiang Li
10c03e499d Extend CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK to start as early as when user starts predictive back swipe
Bug: 330405993
Test: prefetto trace https://ui.perfetto.dev/#!/?s=58c0513fe0190f84ea1621a96d790a53b83fefc1ee402085b0d75bfc7b51e019
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Change-Id: I76c32975e5ae6dcb0395d2eee68417f761455262
2024-03-27 16:03:47 -07:00
Sebastian Franco
efab2489d6 Generate grid migration cases and test if they are valid
This makes sure the grid migration logic always produces
valid results.

Bug: 313900847
Bug: 323525592
Flag: NA
Test: ValidGridMigrationUnitTest.kt
Change-Id: I76b19e1fa315f8a997afad34e5a4df7cc465b0c2
2024-03-27 14:03:07 -07:00
Jagrut Desai
112691f2f0 Merge "Customize BubbleTextView for Taskbar Icon Size" into main 2024-03-27 16:46:16 +00:00
Holly Jiuyu Sun
5455931d9d Merge "[PS] Return earlier if the input is null for matches." into main 2024-03-26 21:30:04 +00:00
Jagrut Desai
8fbdf51d18 Customize BubbleTextView for Taskbar Icon Size
Test: Presubmit, manual
Flag: NONE
Bug: 322734668
Change-Id: I50503a45cdf43abed942a846c2517f49124c75e5
2024-03-26 11:31:36 -07:00
Sunny Goyal
77954bae4e Cleaning up some build configurations
> Removing Launcher3Go-without-quickstep
> Removing src_ui_overrides to src_no_quickstep
> Removing unnecessary code swpa for GO builds

Bug: 330920490
Flag: None
Test: Presubmit, everything builds
Change-Id: I5746dbc7c5a37c1d99d78b55bf2a6adce1a711c9
2024-03-26 17:16:52 +00:00
Schneider Victor-tulias
b4d102e75a Merge "Add debug logs to ActivityTracker" into main 2024-03-26 17:02:13 +00:00
Jeremy Sim
46ca78ee78 Merge "Refactor how app pair icons draw" into main 2024-03-26 02:39:37 +00:00
Treehugger Robot
a8efc84122 Merge "Using xml override instead of code swap for predicted icon" into main 2024-03-26 00:53:37 +00:00
Jeremy Sim
b37faec287 Refactor how app pair icons draw
This changes (and cleans up) the way app pair icons are composed. Previously, the background and 2 icons were drawn individually and separately onto the canvas. Now, they are composed into a combined drawable first. This also allows the full icon drawable to be requested by external functions (which will be needed for display app pairs in folder previews).

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Visually confirmed that app pairs loooks the same in all scenarios: rotation, disabled, themed, taskbar, pinned taskbar. Screenshot test to follow.
Change-Id: I7242e0c525ef578a54a06fb9137fcfc42c6f0e86
2024-03-25 16:43:40 -07:00
Fengjiang Li
9eee6df676 Don't toggle scrollbar during predicitve back swipe to avoid flicker
Fix: 329437430
Test: manual - attach video to bug
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Change-Id: I8c959fbb02948011be59a17752a140b1a07ca6b9
2024-03-25 16:34:44 -07:00
Treehugger Robot
43879a7256 Merge "Handle widgets added with tap-to-add in AppEventProducer" into main 2024-03-25 23:25:39 +00:00
Sunny Goyal
bd7ec3335b Using xml override instead of code swap for predicted icon
Bug: 330920490
Flag: None
Test: Presubmit
Change-Id: I5ff52464b931630da003fb6aeff2a4fd9d2dd3b3
2024-03-25 15:18:48 -07:00
Schneider Victor-tulias
18821d1c1f Add debug logs to ActivityTracker
Flag: N/A
Bug: 274280837
Test: checked logs during gestures and 3-button, and dumped Launcher logs
Change-Id: Icbb1edb0e59fa9cce9364e39823a664cda4ebf1b
2024-03-25 13:48:44 -04:00
Sunny Goyal
85b40b37c5 Merge "Removing ext_test directory" into main 2024-03-25 17:42:21 +00:00
Fengjiang Li
9adc988412 Merge "Update WidgetSize on binding workspace, and when dropping widget with config activity" into main 2024-03-22 23:57:01 +00:00
Sunny Goyal
9d2ece156d Removing ext_test directory
Except for a few methods, most of the testing code was already in the main
codebase. Maintaining the additional source directory adds unnecessary overhead

Bug: 330920490
Test: Presubmit
Flag: None
Change-Id: I56c43ab7a4869b26858d622d0b8b14f286d50e90
2024-03-22 15:45:32 -07:00
Brandon Dayauon
9727caec8d Merge "Remove applyBackground param in decorator" into main 2024-03-22 21:29:01 +00:00
Treehugger Robot
ef17913e72 Merge "add more logging for failure to load Widgets" into main 2024-03-22 16:15:31 +00:00
Charlie Anderson
7779852bbe add more logging for failure to load Widgets
Bug: 294386159
Test: locally
Flag: N/A
Change-Id: Ib1fc2c28d1f20142658077047bbe6bc2eabe49d4
2024-03-22 10:43:49 -04:00
Fengjiang Li
6f8069a8dc Update WidgetSize on binding workspace, and when dropping widget with config activity
ag/25923606 seems to have changed when we update widget size, this CL will make sure widget sizes are updated when dropping a widget that requires a config activity

Fix: 328133427
Test: manual
Flag: NONE
Change-Id: I5b62b78a9afde3b79b933f233361b409258649c9
2024-03-22 03:59:23 +00:00
Anushree Ganjam
6dadf21a7f Add FastScrollSectionInfo with "info icon" when work educard exists.
Before: https://b.corp.google.com/issues/325490294#comment1

After: https://b.corp.google.com/issues/325490294#comment5

Bug: 325490294
Test: Manual
Flag: NA
Change-Id: I557971cddd5829f46697004159d62a9343e75f69
2024-03-21 12:29:47 -07:00
Brandon Dayauon
65e373912b Remove applyBackground param in decorator
- This applyBackground() internally calls setBackground which is something that should not be
done in onDraw. Not needed anymore since privateprofile doesn't use the recyclerViewAnimationController anymore.
If it is still needed, when applyingBackground it should be done probably during onBind().
- When setBackground() is called during onDraw() there's a cyclic situation that ends up blocking the thread
and thats why you cannot see the privatespace be deleted.

bug: 329317904
Test: manual:
before: https://drive.google.com/file/d/1vAaA_juK8Bg2QB3oHhRmtiZxcHzEHHP1/view?usp=sharing
after: https://drive.google.com/file/d/1vAR6Okw17uskruHre8RrhsKa7-GiqE6k/view?usp=sharing
Flag: None
Change-Id: I06d31abb31496994d12b96fe6c0ca8cb26c93f69
2024-03-21 11:24:44 -07:00
Alex Chau
59781a7d79 Remove DesktopTaskView.isDesktopModeSupported
- Use Flags.eanbleDesktopWindowingMode directly
- Also clean up unnecessary and improper flag usage

Bug: 309008406
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode DEVELOPMENT
Test: presubmit
Change-Id: I86ce317ce577f279d2ce819d6dc1738204c2631e
2024-03-21 14:05:27 +00:00
Helen Cheuk
8896580b58 Merge "Change single stroke focus outline to double stroke" into main 2024-03-21 12:09:19 +00:00
Shamali Patwa
f8cd95314c Merge "Update the available size for suggestions in small landscape heights." into main 2024-03-21 02:55:58 +00:00
Shamali P
55f1a39c15 Update the available size for suggestions in small landscape heights.
Bug: 330514207
Test: TAPL test
Flag: N/A
Change-Id: I1e1f43a46f4aa339bcafac013817846d893b0a9b
2024-03-20 22:12:00 +00:00
Willie Koomson
2471805414 Handle widgets added with tap-to-add in AppEventProducer
Widgets added with tap-to-add do not emit an ITEM_DROP_COMPELTED event,
so this change updates AppEventProducer to check for
WIDGET_ADD_BUTTON_TAP event so that it can emit an ACTION_PIN
event for these widgets as well.

Also moves the stats logging for tap to add to after
Launcher.addPendingItem is called, so that the PendingAddItem's container
is set to CONTAINER_DESKTOP.

Bug: 323886237
Test: manual, add widget and confirm event is produced through logging,
 and widget no longer appears in suggestions
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add STAGING
Change-Id: Iaf46a408d05f61864a79f87b23160364b6513323
2024-03-20 22:07:02 +00:00
Holly Sun
f26fb3097a [PS] Return earlier if the input is null for matches.
In test environment, we get null string from resource, so just bypass this part.

Bug: 329442658
Test: manual
Flag: aconfig com.google.android.apps.nexuslauncher.enable_inject_private_space_tile trunkfood
Change-Id: If20586bcd882d6a705e8a670bc20a5cf5aa79ac2
2024-03-20 14:12:15 -07:00
Vinit Nayak
5afb093a58 Merge "Add CUJ Jank interactions for App Pair saving and launching" into main 2024-03-20 20:31:01 +00:00
Willie Koomson
1b0e8eea61 Merge "Set initial bind options for widgets added with tap-to-add" into main 2024-03-20 16:23:19 +00:00
Rohit Goyal
f21220c79d Bugfix: In case of unarchival, do not add an installer task to add workspace item. am: f8302c388f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/26598401

Change-Id: I538d3804b9fdd8ed6d8425abaad38087083d15d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 12:59:12 +00:00
Rohit Goyal
f8302c388f Bugfix: In case of unarchival, do not add an installer task to add workspace item.
* In case install queue is cleared (which happens when launcher comes back to foregorund from background) when app has successfully unarchived, since app is not archived anymore, `AddWorkspaceItemTask` successfully manages to add item to the workspace.
* We should avoid adding pending task for adding workspace item in the queue at all for unarchival to prevent this.

Test: verified bugfixes locally.
Bug: 326495267
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: Iae6d6390d8e2d9b270f7aef0dce1fa32d9899f28
2024-03-20 11:12:38 +00:00
Treehugger Robot
60484e3e2a Merge "Fixing async inflation not happening for first page" into main 2024-03-20 07:53:38 +00:00
Sunny Goyal
e5a95ed11d Fixing async inflation not happening for first page
Bug: 330416518
Test: atest AsyncBindingTest
Flag: aconfig enable_workspace_inflation STAGING
Change-Id: Iab9b203dfab36367cdf531d2dbf023bfbaefe224
2024-03-19 23:28:13 -07:00
Fengjiang Li
b7e9427dc9 Merge "[Predictive Back] Refactor setClipChildrenOnViewTree/restoreClipChildrenOnViewTree to support clipToPadding" into main 2024-03-20 01:21:09 +00:00
Shamali Patwa
eef12ba5b7 Merge "Retain recommendations (if possible) while picker is open" into main 2024-03-20 00:41:41 +00:00
Willie Koomson
a55f214d71 Set initial bind options for widgets added with tap-to-add
Calls PendingAddWidgetInfo.getDefaultSizeOptions to set the bind options
for widgets added with tap-to-add.

Bug: 323886237
Test: manual, place Drive/Gmail widget and confirm correct initial size
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add DEVELOPMENT
Change-Id: Ib0143e3ff49b62d6394d6ca362d89b0ea9773e5f
2024-03-20 00:24:19 +00:00
Fengjiang Li
ea7cb497f5 [Predictive Back] Refactor setClipChildrenOnViewTree/restoreClipChildrenOnViewTree to support clipToPadding
Bug: 325930715
Test: Added unit test
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Change-Id: I509546ac4ee1fa851cf0648d365a5348362267cc
2024-03-19 15:28:38 -07:00
Shamali P
b081314330 Retain recommendations (if possible) while picker is open
Picker rebinds recommendations when size constraints change or
fold/unfold, but recommendations from popup provider may have changed.
This is an attempt at trying to maintain currently shown items
as much possible.

Also, align the pagination and title to the top in two pane picker
 (confirmed with David that we prefer this version)

Additionally, we don't show the widgets count for suggestions.

Bug: 318410881
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Test: Manual

Change-Id: I60799f9ad38da913c3e084d758f5b82c79cd641c
2024-03-19 21:26:14 +00:00
Sunny Goyal
39a24e7c9b Merge "Only use async bind if the callbacks supports it" into main 2024-03-19 20:31:52 +00:00