Commit Graph

122 Commits

Author SHA1 Message Date
Brandon Dayauon
f54e016c82 split the scrolling logging into work,personal, and search
- moved collapse/extend logging with the other scroll logging

bug: 263817965
test: Manual - WW
Change-Id: I9cd57b895c0c2edb7fe39ef98dced574d09a0953
2023-01-11 10:09:27 -08:00
Brian Isganitis
deac0d529a Reduce top padding of Taskbar's All Apps tray.
The top padding looks too high because the code is assuming we have a
search bar at the top of the bottom sheet. Until we implement search, we
should temporarily reduce padding for the taskbar implementation.

Before:
  - No tabs: https://screenshot.googleplex.com/AAPdR5nbwepWQ82.png
  - Tabs: https://screenshot.googleplex.com/3DnQp6PKhqXyRag.png

After:
  - No tabs: https://screenshot.googleplex.com/A8enwnSs8r78ccj.png
  - Tabs: https://screenshot.googleplex.com/A3fAy2bXgmSPrG9.png

Test: Manual
Bug: 216683257
Change-Id: Ie0837acc3aed162b9428a209962be2a102c515c8
2022-12-01 00:21:28 +00:00
Sunny Goyal
f34811d3a3 Revert "Revert "Updating the scroll calculation from recyclerView to avoid view inflation""
Test: ABTD
https://android-build.googleplex.com/builds/abtd/run/L52600000956969786

This reverts commit cee6ddf3de.

Reason for revert: Fixed in ag/20239136

Change-Id: I0e8446e66d9a86a94b40fcbd6de14da07abe8e5c
2022-10-22 15:37:47 +00:00
Anushree Ganjam
0de35265c1 Add scroll up and scroll down logging.
Bug: 247601175
Test: Manual. https://paste.googleplex.com/5757099224072192

Change-Id: Iec1697e1580c75572c9e77ec349942301ee87694
2022-10-19 18:00:45 +00:00
Hui Kang
cee6ddf3de Revert "Updating the scroll calculation from recyclerView to avoid view inflation"
This reverts commit 20bbe95ddb.

Reason for revert: Causing flake in Ironwood test: b/248295569

Test: ABTD
Before: Flaky, 14/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L33900000956890639

Revert: 50/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L49200000956887317

Change-Id: I41f4428c74e581323f90c716a7852b5e553ae27d
2022-10-17 20:37:49 +00:00
Sunny Goyal
20bbe95ddb Updating the scroll calculation from recyclerView to avoid view inflation
> 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
2022-09-12 12:24:34 -07:00
Sunny Goyal
8958a7078a Simplifying hideKeyboardAsync method
Bug: 246000321
Test: Presubmit
Change-Id: I2851c49b61b662d4a5b7cd0a863f690fd74a8bd0
Merged-In: I2851c49b61b662d4a5b7cd0a863f690fd74a8bd0
2022-09-10 04:01:48 +00:00
Sunny Goyal
af95ddbadc Fixing search behavior in Launcher3
> 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
2022-07-28 22:05:30 -07:00
Sunny Goyal
bbad97e273 Unifying scroll calculation logic for both widgets and apps recycler view
Also using itemType instead of item object for widget size cache

Bug: 234008165
Test: Verified on device
Change-Id: Ia4b4a00a11627c0c454e4a699570e8ab1667a390
2022-06-16 16:03:37 -07:00
Andy Wickham
2ba7797edb Moves Search results into a separate RV (take 2).
Bug: 206905515
Test: Manually verified b/230648542 did not resurface. Tested
on phone and tablet with and without work profile.

Change-Id: If724f635286b9dff2c64255f9ece3568a5cb4ea9
2022-05-24 17:10:24 -07:00
Sunny Goyal
3f2637faee Adding support for extending back behavior in Launcher
Bug: 231224820
Test: Manual
Change-Id: I9accc30c01dce5f6920b611cfeed9fa0584d2846
2022-05-16 14:40:19 -07:00
Becky Qiu
c70f286a9f [Toast] Keep keyboard up for query builder tapping
Bug: 228998087
Test: manual
Change-Id: Idf40d79e4a8929f23a91461959576840577bf005
2022-05-10 23:26:03 -07:00
Sunny Goyal
d3a841d91a Merge "Removing fading edges from recyclerView as we already have full background behing search box, and additional laying is not requred" into tm-dev 2022-05-05 05:21:11 +00:00
Sunny Goyal
3c5a08ada1 Implementing support for item diffing instead of creating out the
complete UI on every update

Bug: 229860311
Test: Verified locally
Change-Id: I5712b5d76878a0ed72cc1392ede59b3778b7a1dc
2022-05-03 16:24:46 -07:00
Sunny Goyal
afaefbca33 Removing fading edges from recyclerView as we already have full
background behing search box, and additional laying is not requred

Bug: 221095750
Test: Manual
Change-Id: I2251ebae6f09467fb354d9240e3781a7ca076aa9
2022-05-03 11:00:32 -07:00
Anushree Ganjam
5cc7ff0990 Revert "Refactors Search results into separate RV for Toast."
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
2022-04-28 01:37:49 +00:00
Andy Wickham
6729f0b950 Refactors Search results into separate RV for Toast.
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
2022-04-24 17:36:48 -07:00
Thiru Ramasamy
2f733b6ce9 [OneSearch] Add LAUNCHER_ALLAPPS_SCROLLED event.
* 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
2022-03-09 07:14:01 -08:00
Brian Isganitis
1664c9f418 Refactor all apps to depend on activity context.
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
2022-01-24 20:24:20 -05:00
Becky Qiu
f11ecb7f59 [OneSearch] Log events with timestamp into logcat for debugging.
Bug: 199289915
Test: example log: https://paste.googleplex.com/5741834610409472
Change-Id: I24b2e68b36cb897ae3e6ccc38cf0561d38af6751
2021-10-06 15:20:47 -07:00
Hyunyoung Song
6e72c8bbba All apps memory leak fix / unregister data observer
Bug: 197702957

Test: adb shell dumpsys meminfo com.google.android.apps.nexuslauncher, ahat

Change-Id: Ia5732cced959e4a199d9c2b59f1f3941a2e23552
2021-08-26 15:18:47 -07:00
Hyunyoung Song
b6acd14d0f Fix hole in recycler view
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
2021-07-13 09:51:42 -07:00
Hyunyoung Song
0b9537e6fc Rebind recycler views if launcher activity restarted
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
2021-06-29 14:52:57 -07:00
Steven Ng
be2dc65f08 Refine all apps tabs alignment & remove ripple effect from tabs
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
2021-06-23 23:25:13 +01:00
Hyunyoung Song
7d3b25734a Hide searchbox when header protection is on.
Bug: 191726215
Test: manual
Change-Id: I086a05654faf718683ebe5dfbcf64b6bd6347ca8
2021-06-23 00:44:49 -07:00
Samuel Fufa
dfc274364e Add work toggle to work apps paused message
This also fixes scrolling issues in landscape

Bug: 186857875
Bug: 161929312
Bug: 189983516
Bug: 190567199
screenshot: https://screenshot.googleplex.com/BCjcyJFqJo6W4Tr
Test: local
Change-Id: I7bcf23cc4be2fca936eba41342731789eb8f3292
2021-06-15 14:58:05 -05:00
Hyunyoung Song
7cc29dc44d Fix RecyclerViewFastScroller bugs, hide keyboard
Bug: 189982238
Bug: 187561242
Bug: 187909098

Test: manual
Change-Id: I693810e5761004c48d028253c25a2fe96477af40
2021-06-11 09:43:10 -07:00
thiruram
5435b07ed4 [AA+] Fixing missing logs forr keyboard close interactions.
Bug: 178562918
Test: Manual
Change-Id: Id5a7fc3d8ded675c6a64de7416fade74ae2bacd1
2021-06-06 21:26:31 +00:00
Samuel Fufa
ff9fcd8e6b Fix CastError on SecondaryDisplay
Bug: 185566696
Test: Manual
Change-Id: I0dbf0edccc40172e802cc197e200a8fb9502b4ec
2021-05-13 10:27:11 -05:00
Samuel Fufa
acebd1f69a [Search][Motion] Introduce header protection in AllApps
ScrimView exposes ScrimDrawingController that allow FloatingHeaderView to observe AllApps scroll progress and draw header protection on Scrim. In addition, search box independently adopts header protection background to ensure proper clipping behavior.

Test: local
preview: https://drive.google.com/file/d/1_E577AAJ0LBg0zrKJQSEJK9GQnrtx7uv/view?usp=sharing&resourcekey=0-MTxjlB3xWyJ3qPvr4qMdig
Bug: 184946772
Change-Id: I64c0f4f50d26c475d31542148a15c7c145588d3f
2021-05-07 11:15:05 -05:00
Tony Wickham
81ca1f8802 Remove some noisy logs by setting DEBUG = false
Change-Id: I050676c0f4750e06a9052fd1c2ebe1e8badcfd92
2021-04-09 15:40:08 -07:00
Hyunyoung Song
a22574aa66 Remove cursor when edit text no longer has focus
Bug: 180142918

Test: manual
Change-Id: I9a58ef605b145889e30cb42e99f0b98e16af1e46
Signed-off-by: Hyunyoung Song <hyunyoungs@google.com>
2021-03-21 15:59:34 -07:00
Hyunyoung Song
a907a995c9 Hide keyboard only when scrolling happens
Bug: 179307221
Test: see attached video

Change-Id: I9b13c8f62122a6d7bf56a28c830be9a9dbfee52a
2021-03-16 00:05:04 -07:00
Hyunyoung Song
34c0262778 Instrumenting flinging all apps for jank
Bug: 178656812
Test: manual

Change-Id: I56bf19709784ac081a4f7068dedb8814eb6f3d0b
2021-03-08 20:40:39 -08:00
Steven Ng
167f81b931 Add a header container view to the widgets full sheet
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
2021-02-26 10:03:36 +00:00
Samuel Fufa
fd58d23cdf Migrate from Plugin SearchTarget to API search Target [1/3]
Setup architecture for separation between aosp and quickstep search as setup for switch to android.app.SearchTarget

Bug: 177223401
Test: manual
Change-Id: Iefd069a34d5e5551bf731e9171958e93377774aa
2021-01-12 19:46:25 -06:00
Hilary Huo
f5ce80b8a0 [pixel-search] Latency analysis, add logging statement in launcher
Bug: b/170675311
Change-Id: I229ace399085bea1c3f9535eb713edd329dff8bd
2020-10-21 18:00:06 -07:00
Hyunyoung Song
95786e077d Good riddance UserEventDispatcher
Bug: 165675920
Bug: 161381246

TL;DR;;
- nano -> lite proto
- add all the missing logs to WW
- pin item related logging fix
- Removed logging for assistant

sgrep "com.android.launcher3.userevent.nano." | cut -f1 -d: | xargs sed -i -e 's/userevent\.nano\./userevent\./g'

Change-Id: Ie2a49fdd891cacbd7ef40a1dc9e41ff0574c7517
2020-09-27 13:41:49 -07:00
Samuel Fufa
114de69c98 Introduce support for play results in launcher
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
2020-08-18 11:34:09 -07:00
Samuel Fufa
df10ff46bd Migrate AllAppsSearch [part 1/3]
[Video attached to bug report]

Setup DeviceSearchAlgorithm to handle on device search

Bug: 161801950
Test: Manual
Change-Id: Ib55f415f9992ceab687bbbfe904d153157541648
2020-07-28 14:48:33 -07:00
Sunny Goyal
355e845851 Using inbuild smooth scroller instead of custom fastscrolling logic
Change-Id: I9208720c3bf164bd664e5bacd75b672573fe7601
2020-04-20 11:15:34 -07:00
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
Samuel Fufa
f5a4deb120 Hide work apps when work profile is paused
- 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
2020-03-12 10:25:50 -07:00
Samuel Fufa
a579ddc9c8 Refactor logging to capture Target hierarchy
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
2020-03-06 13:49:19 -08:00
Sunny Goyal
9c2b96090b Adding SecondaryDisplayLauncher in Launcher using common listener
Bug: 141596722
Change-Id: I480bfadf592f7d0309f17c33a3fe14bb77fb5586
2020-01-30 08:27:27 +00:00
Tony Wickham
d785fc289c Merge "Properly prevent All Apps relayouts by avoiding scrollToPosition" into ub-launcher3-qt-qpr1-dev 2019-09-05 21:27:41 +00:00
vadimt
758a1d983d Removing flinging via UI Automator
UI Automator loses events. Switching to the homemade scrolling.

Bug: 138729157
Change-Id: Ib09bd5714e83eadfc65b54202867bf375e6b47c5
2019-09-04 16:35:19 -07:00
Tony Wickham
bfdeda96e6 Properly prevent All Apps relayouts by avoiding scrollToPosition
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
2019-09-03 16:16:54 -07:00
Tony Wickham
7310bb4b5c Don't update all apps content visibility during home animation
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
2019-08-30 22:10:55 +00:00
vadimt
2d6cd80bc9 Launcher reports whe 0-button swipe-up gesture pause is detected.
This eliminates an unreliable timeout.

Also removing an unnecessary check for harness that is done by the
called method.

Change-Id: If954580060415cbb2952532c16ea0ae4dc7b9469
2019-05-24 19:28:40 -07:00