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
- 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
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
- 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
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
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
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
- 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
- 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
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
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
* 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
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
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