> Updating the LayoutManager's scroll calculation instead of a separate
implementation to better support recyclerView's calculations
> Caching the view sizes during layout to avoid view-inflation for
unknown types
> Fixing scrollbar jump during scroll when widget list is expanded
> Fixing scrollbar never reaching end when onboarding card is displayed
in work tab
Bug: 240343082
Test: Verified on device that new views are not inflated
Change-Id: Ied11ccf65b053691c5c126c4bf8de306ec24786d
> Showing no-result found only when there are no results
> Removing unnecessary view inflation in RecyclerViewPool for
various search vide types
> Removing unused market-search link and no-empty-result illustration
Bug: 240343082
Bug: 207573083
Test: Verified Launcher3
Change-Id: Ia44799cd2385ea5dc837ef25732ca237975abde7
Also using itemType instead of item object for widget size cache
Bug: 234008165
Test: Verified on device
Change-Id: Ia4b4a00a11627c0c454e4a699570e8ab1667a390
Bug: 206905515
Test: Manually verified b/230648542 did not resurface. Tested
on phone and tablet with and without work profile.
Change-Id: If724f635286b9dff2c64255f9ece3568a5cb4ea9
This reverts commit 6729f0b950.
Reason for revert: This change caused b/230648542.
Please see https://b.corp.google.com/issues/230648542#comment5 for the video after reverting this change.
Bug: 206905515
Bug: 230648542
Change-Id: I85f063c56cad137c05b810204244bba7e8f94ee7
This will help enable transitions between A-Z apps lists and
search results because both can be seen simultaneously and
manipulated independently.
Some high level items of the refactor:
- SearchRecyclerView is added; logic that populated the main
(personal) tab with search results was simply redirected to
this RV instead.
- BaseAllAppsContainerView added isSearching() method. Returns
false, and ActivityAllAppsContainerView overrides (as search
is handled there).
- Renamed BaseRecyclerView to FastScrollRecyclerView to better
describe what it does. SearchRecyclerView extends this, but
returns false for supportsFastScrolling().
- AlphabeticalAppsList#mAllAppsStore is now optional, so the
Search RV doesn't need to store/listen to apps. Note this
doesn't affect the predicted app row which is still updated
if one of the predicted apps is uninstalled (I tested this).
Future work:
- Determine why dispatchRestoreInstanceState is not called for
BaseAllAppsContainerView. Save is called, e.g. on rotation.
Effect of restore not called: rotating while searching goes
back to A-Z list.
- Keep suggested apps in Header while searching. Currently they
are rendered in the SearchRV above search results, as before.
- Potentially extract Personal/Work tabs to move independently of
header.
- AlphabeticalAppsList is a misleading name because it can also
contains search results. However, things are pretty intertwined
between that and BaseAllAppsAdapter (effectively a circular
dependency), so I figured cleaning all that up was out of the
immediate scope of this refactor, which is mainly meant to
unblock transition work.
Bug: 206905515
Test: Manually checked for regressions, ran tests.
Change-Id: I4d3757c8a8f9b774956ca6be541dd4fcdad1de13
* Simplified logcat message
* Log latency events with different tag to help filter event logs from latency logs.
Bug: 210792253
Test: wwdebug && wwlogcat - http://gpaste/6546219850530816
Change-Id: I975a7140d14d3cb45f50d7db64aac3fa83ccd389
The current AllAppsContainerView has been split into a base class and a
subclass for activities. The base class allows using all apps with an
activity context. A-Z and work profile tabs are supported, but search
and the hotseat still require an Activity.
Test: Manual. All apps should work the same.
Bug: 204696617
Change-Id: I3b146714bc11b3b3555d97623aab5d78ac836482
Bug: 153780395
Test: manual
Without this change, typing single character and then
backspace, and then scrolling down and up will result in
hole in recycler view.
Change-Id: Iff6fa3f147d8bfdb8a7e84847b96e5390941dd4e
Bug: 185038312
Test: manual
TL;DR;;
What was attempted but was too much refactoring of the code.
Failed attempt #1: try re triggering the search.
This was not trivial as SearchSession object is yet created.
Failed attempt #2: Restoring AdapterItems in AlphabeticalAppsList
This meant AdapterItems class and also it's children
had to extend Parceleable object.
Ultimate fix:
Original issue of dupe view id among slice and work recyclerview
should be fixed. And restoring should just work.
Change-Id: I1bddd6aa5bc736ade3b02f69aa947d64cfa467d6
Test: Open all apps and observe the position of tabs alignment.
Click a tab and observe the fade in color effect.
Fix: 191387242
Change-Id: Ie23a092268ce62eba29059eb5bd266a46ca652a5
A header container view will contain
1. A horizontal bar: for indicating the popup view can be dragged
to dismiss:
2. A title view: a title of the widgets full sheet popup view.
3. A search bar: for widgets / shortcut search. Since we will be
making the fallback search algorithm available in AOSP, the
search bar will now live in the Launcher3 codebase.
4. Recommended widgets (coming soon...)
This CL also added a scroll effect which gradually collapses the
title view when the user scrolls down the recycler view. The title
view will gradually restore its height when the user scroll to the
top of the recycler view.
Test: Manually test widgets pickers in work profile and non work
profile setup. Verified the fast scroll bar works well in
both setup.
With searchbar: https://drive.google.com/file/d/19grUHL_LspLhMD_5p6-i0CiMW1FpflmD/view?usp=sharing
Without searchbar: https://drive.google.com/file/d/1KRPgEAESHUhJDo1UJsQN80JO1c9Y8Nhl/view?usp=sharing
Bug: 179797520
Change-Id: If0016e3b3c693414897140e7912531ed9bd5deef
Setup architecture for separation between aosp and quickstep search as setup for switch to android.app.SearchTarget
Bug: 177223401
Test: manual
Change-Id: Iefd069a34d5e5551bf731e9171958e93377774aa
Introduces PluginSearchPipeline class, a plugin listener for AllAppsSearchPlugin. Coverts from List<Bundle> results from callback to AdapterItems to be rendered in SearchController.
- Moves AdapterItem to AllAppsGridAdapter
Bug: 164699827
Test: Manual
Change-Id: I20ec147e6b3f4707cf69d62b4b4ac70a90196345
- hide overlay icon in landscape mode
- don't show edu if user has already seen legacy work profile edu
- make sure personal tab is highlighted when work profile is reinstalled
- always go home after a work profile is added or removed
- add tests for work edu flow
Bug: 150122946
Test: Manual
Change-Id: I8f80ac763acf03ca31a534464f4ddfd84528d329
Instead of creating a fixed number of targets, we now pass an ArrayList
of targets to. Any class implementing
LogContainerProviders#fillInLogContainerData can setup it's own target
and add it to the ArrayList, It can also pass the ArrayList to other
LogContainerProvider to capture full Target hierarchy.
Bug: 147305863
Change-Id: I0063c692120fb9e1cff2d8902c5da972d0623418
Calling scrollToPosition on RecyclerView internally calls
requestLayout() (to cacluate where to scroll and then go there).
Therefore, we should avoid calling that whenever possible, especially
during transitions. In particular, we can optimize scrollToTop() to not
scrollToPosition() if we are already at the top.
This makes some other workarounds unnecessary, namely setting All Apps
to GONE during system gestures.
Test: Open an app, swipe up, ensure AllAppsRecyclerView doesn't get
onLayout(). If we had scrolled to an app first, we get one layout
in prepareRecentsUi(), but not during the transition.
Bug: 140308849
Change-Id: I62ee341bf5893c121cfc013cc6542559f79d2a42
We already set the all apps content visibility = GONE at the start of
the gesture to prevent relayouts, but when animating home we were
inadvertently changing it to INVISIBLE, causing a relayout and jank.
Bug: 140308849
Change-Id: I285746f8ac8f3f857282e22ebec8eebd0b98647f
This eliminates an unreliable timeout.
Also removing an unnecessary check for harness that is done by the
called method.
Change-Id: If954580060415cbb2952532c16ea0ae4dc7b9469