Commit Graph

130 Commits

Author SHA1 Message Date
Fengjiang Li
3774824cea Predictive swipe: show extra app icons at bottom of All Apps's RecyclerViews
The maximum center scale of All Apps to Home is 90%. It means we should add 5% height to All Apps's RecyclerView to render extra app icons.

Test: manual
bug: b/264906511
Change-Id: I2e970580810220e25d7fc3a86c19abaf87ba2c6e
2023-01-13 15:55:17 -08:00
Sunny Goyal
b6c5feafde Fix IndexOutOfBoundsException in grid span lookup
Bug: 262747378
Test: Presubmit
Change-Id: I3ac4f0208874c0b7f41f6d02ee99db660dc04f23
2022-12-19 09:57:55 -08:00
Anushree Ganjam
51d05b9888 Use CopyOnWriteArrayList to avoid ConcurrentModificationException.
Bug: 204781396
Test: Manual
Change-Id: I5a28d34a5e404d2a4a4647c94dff632e02d57717
2022-12-02 03:04:11 +00:00
Anushree Ganjam
f213afc0a7 Add OnLayoutCompleted() Listener.
OnLayoutCompleted() Listener for RecyclerView.LayoutManager#onLayoutCompleted(RecyclerView.State) so we can do impression logging when RecyclerView has finished laying out the items.

Bug: 204781396
Test: Manual
Change-Id: I59b81e98415b2b0c6f3b26d2c41d348242342048
2022-11-10 17:38:59 +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
Hui Kang
2a28ae8a3f Merge "Revert "Updating the scroll calculation from recyclerView to avoid view inflation"" into tm-qpr-dev 2022-10-17 21:20:09 +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
Andy Wickham
4c96814b1c Fix layout for multi-element rows (e.g. Screenshots).
Demo with standard 3 element row and overflowing 2 element row:
https://drive.google.com/drive/folders/1o1gvD3mOxFmVW2vqjn3D1Gukz-ie_kmW?resourcekey=0-bHRsdqpUWITEUo39tAMJDg&usp=sharing

Test: Manually with 1, 2, 3, and 4 length rows of 3 screenshots
and putting web suggestions into 2 columns.
Fix: 247837336
Bug: 239927522

Change-Id: I391beb7a24f189b5e55cb7b65c5ffc8349c83cfc
2022-09-29 10:38:20 -07: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
Becky Qiu
1f285a594a Fix the IndexOutOfBoundsException in AllAppsGridAdapter.
Bug: 231552223
Test: no need to test
Change-Id: I2d32f0ca973e6e9d5e97d9c69b5c76d26d91c254
2022-05-06 21:48:54 -07:00
Abhilasha Chahal
9c7096c8ac Revert "Revert "Extract out common adapter logic to support diff..."
Revert^2 "Fixing AdapterItem import"

1a27c278d6c6594b552b620b4d2b67e68bef23f2

Change-Id: Ia3bf9f0b3aaff0d1e2d102320e917462b38935b2
2022-03-09 17:45:45 +00:00
Sam Dubey
4f1a232cca Revert "Extract out common adapter logic to support different Al..."
Revert "Fixing AdapterItem import"

Revert submission 17044827-tm-dev-216150568

Reason for revert: Broke builds
Bug: 223609269
Reverted Changes:
I53eba3c8c:Fixing AdapterItem import
I1068e75d0:Extract out common adapter logic to support differ...
I24d8e54e8:Fix AdapterItem imports

Change-Id: I931c666db7dcb2c8eef1894b56b59ed688218def
2022-03-09 17:25:15 +00:00
Abhilasha Chahal
6badc405ad Extract out common adapter logic to support different AllApps layouts
Test: Manual tests. Refactoring, all existing tests should pass.
Bug: 216150568
Change-Id: I1068e75d0b4a33d402a7d68e237d2484ab3a1e01
2022-03-01 13:08:54 +00: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
Hyunyoung Song
3f14c80d4c Merge "Add FeatureFlag to enable two line label inside all apps" into sc-v2-dev 2021-11-11 21:29:30 +00:00
Hyunyoung Song
afe8fadc15 Add FeatureFlag to enable two line label inside all apps
Bug: 201388851
Test: screenshot on the bug
Change-Id: Id01d6f9f9e25b98cad8368ac0faf671addf793f8
2021-11-10 22:26:51 -08:00
sfufa@google.com
6cf7b319ac [Search] Show search suggestions with in Recyclerview
This change removes usage of FloatingHeaderView to display suggested web results to using RecyclerView.

Bug: 204116666
Test: Manual [apk attached to BR]
Change-Id: I7f8f1a5630f3cc2b29e7276636eaf45cda148566
2021-11-03 10:27:04 -07:00
Samuel Fufa
154ad76f40 Introduce inline education for work profile
Bug: 186857875
Test: local
Change-Id: I796b04fbb3ffc714a01104107774819d35034f93
2021-06-14 01:01:42 -05:00
Sunny Goyal
19ff728b92 Adding support for determining split layout for launcher.
> Simulating the windo wmanager API to get available device
  profiles until final API
> When a device has multiple internal displays, and with both
  tablet and phone possibilities, it uses a split workspace layout

Bug: 186160341
Bug: 175782275
Test: Manual
Change-Id: Ieff2329acac7cdd6b9abe6f96cd459cd45bd0efe
2021-05-03 14:48:28 -07:00
Hyunyoung Song
c07e3b3c28 Remove AA+ decorator logic from aosp code
Bug: 179495850
Test: manual

Change-Id: I7e029e4970f45a0f7c410533f85335a95e4e448c
2021-03-29 00:29:09 -07:00
Samuel Fufa
dc016f37a2 Fix QSB tap crash
Launcher should use LCM of supported getSupportedItemsPerRowArray instead of product.

Bug: 182236647
Test: Manual
Change-Id: Ia0ad1158a841068c29ed09bf7f598f14c410092f
2021-03-09 10:00:05 -06:00
Samuel Fufa
e2358949d4 [Search] Support flexible results-per-row in AllApps
Bug: 181987314
Test: Manual
Change-Id: Idc3d24dafc42944a7cc925e0991118c86a89b318
2021-03-05 15:00:38 -06:00
Hyunyoung Song
db9a53d9aa Add group highlighting to AA+ result
Bug: 180071886
Test: manual
Change-Id: Id1cc3d7400e1a7fe41af272d689aa9315030b420
2021-02-18 02:19:27 -08: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
Samuel Fufa
ffd2b6d25e Search support for widgets with config activity
Shows widget preview in search if widget requires config.

preview: https://drive.google.com/file/d/1q1ROu7-OUGfskDMRxXPNQMdr3T-WMMkv/view?usp=sharing
Bug: 168321831
Test: Manual
Change-Id: I6c1c168ebac4ce33a4234e8a417eba789f664f43
2020-11-10 10:16:02 -06:00
Samuel Fufa
3116dc918f Resolve search scroll hightlight issue
After getting the index of the first item that should be highlighted, Section decorator should not assume getChildAt(index) will return item at position. Instead use findViewHolderForAdapterPosition.

Bug: 170665892
Change-Id: Id81d021bde8868184013e8d51e49af7842b64125
2020-11-09 16:35:43 -06:00
Samuel Fufa
37432444fc Initial setup for widgets in Search
LiveSearchManager creates AppWidgetHost when user starts a new search session and destroys it when user returns to home. In addition, it also manages the creation and caching of PlaceholderSearchWidget which can be used to create AppWidgetHostViews.
Bug: 168321831
Test: Manual

Change-Id: I06a893028e55aa6e0702a4f1cd7a2edbb1f61671
2020-11-07 10:07:33 -06:00
Samuel Fufa
984e0d0a63 Show settings icon at start of settings results
Bug: 170792963
Test: Manual
Screenshot: https://screenshot.googleplex.com/MVBtDZGtQ3aChwU
Change-Id: I16a28a7bd9e3129b40102e020cd7c0111e6fe29b
2020-11-06 10:14:41 -06:00
Samuel Fufa
6e5efb0929 Consolidate Hero search result with SearchResultIconRow
With this, we can now show app title and support drag/drop for shortcut results.

Bug: 172245107
preview: https://drive.google.com/file/d/1A4eKKTDPht-MDbfA2VFI3OuAO36fc3AS/view?usp=sharing
Change-Id: Icf94a2d23b44bfe5527aea71e27178906e5deb3e
2020-11-05 11:57:35 -06:00
Samuel Fufa
1f79eeda76 Remove hardcoded itemTypes from SearchTarget
- Introduces componentName and userHandle members to SearchTarget
- SearchTargetEvent now has searchTarget member
- Builder pattern for SearchTarget and SearchTargetEvent
- Search backend should add headers manually instead of launcher inferring sections

Bug: 171026321
Test: Manual
Change-Id: I28e0455e82b925277a17703b9aa061c8f9f15262
2020-10-17 15:41:45 -07:00
Samuel Fufa
314761a808 Setup SearchResultIcon for single cell results
SearchResultIcon will be able to render apps, shortcuts and remote actions. It can also handle its own focused state drawing.

Screenshot: https://screenshot.googleplex.com/C3KgjJtLQTBPgaf

Bug: 170752716
Test: Manual
Change-Id: I460a9c128ea3f5814784e342c5d5fa5b7e310882
2020-10-15 14:32:19 -07:00
Samuel Fufa
26c1105fa0 [search api part 1] Setup centralized SearchEventTracker
- Rename AdapterItemWIthPayload to SearchAdapterItem, PayloadResultHandler to SearchTargetHandler
- Setup SliceViewWrapper for self contained slices

Bug: 170702596
Change-Id: I0baf984ec8123c95011abcc17372f8d055e98ad7
2020-10-13 12:40:22 -07:00
Hyunyoung Song
f271139682 Thumbnail/Suggest view type support remote action
Bug: 169330678


Change-Id: I629d3e6b1622bf71e0174eb2489e976ef98875ad
2020-09-29 02:03:48 -07:00
TreeHugger Robot
34fbea6f26 Merge "Make SPAN_MULTIPLIER public Bug: 169294860" into ub-launcher3-master 2020-09-25 03:59:56 +00:00
Hyunyoung Song
ec7b1ee73b Make SPAN_MULTIPLIER public
Bug: 169294860

Change-Id: I6c32689c390de38f230cff4062889dd560afe6c3
2020-09-24 20:23:06 -07:00
Samuel Fufa
02be2a43f5 Support Remote actions
Bug: 168846477
Test: Manual
Change-Id: I7b9dc96bc7a8ccb25ccb4b7135880768256f1ef3
2020-09-24 14:28:49 -07:00
Samuel Fufa
f01064953b Track search results with position and search Identifier
Bug: 169087008
Test: Manual
Change-Id: I54c74093b90e5aea03a7810f55fcc32f0ddf8dda
2020-09-23 01:04:26 -07:00
Samuel Fufa
99d6c2ff0d Update hero app shortcuts with icon
- set appropriate click handler for recycled app icons

Bug: 168810843
Bug: 168733655
Test: Manual
Change-Id: Ic644deb4ac6c7a1cb9a2c3b75f7e2ac86380a9d0
2020-09-22 22:48:49 -07:00
Hyunyoung Song
b3a0f1ffc0 Add thumbnail viewtype to SearchTarget
Bug: 168825522

Change-Id: I012665ef5e5ac66f37f9bdb37d55cc47726b29a9
2020-09-22 10:54:33 -07:00
Samuel Fufa
2fa2e0ae23 Fix launcher leaks
Follow up of: ag/12558751
Bug: 168121204

Change-Id: I381284a5e1cd9568ed14ec7a357ff150e35c18c6
2020-09-14 09:35:37 -07:00
Samuel Fufa
f4eb70c96e Setup logging pipeline for search results
Bug: 168121204
Test: Manual
Change-Id: I4abb6c75aa0f22416616a713733bef2802b703d1
2020-09-10 17:28:42 -07:00
Samuel Fufa
35f9150a67 Support People search result in launcher
NOTE: this uses PackageManager and should be removed after people<>shortcut mapping in search provider.

Bug: 166337069
Test: Manual
Change-Id: I016ff0d5e6ada1599cce3d75bdcd55347c85193e
2020-09-09 10:37:27 -07:00
Samuel Fufa
7aa577d883 Show independent shortcuts from Hero view
Test: Manual
Screenshot: https://screenshot.googleplex.com/6iQGEZADXf9PtWz
Bug: 165320033
Change-Id: Ib8db1fc34da4adc39f3bec5557223a1e283380dd
2020-09-08 13:24:46 -07:00
Samuel Fufa
a2d6a91be9 Support settings search in AllApps
[preview attached to  BR]

Bug: 166044087
Test: Manual
Change-Id: I997fc1c7e2e2c500f64858df9ccea4911e05d649
2020-08-25 21:40:38 +00: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
4a53c70c57 Introduce support for Hero app Section
[Video attached to bug report]

Bug: 162871508
Test: Manual
Change-Id: Ia6f5621d6220f55e6fd5e56530853c267838442c
2020-08-07 17:29:19 +00: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
852537fd98 Using StatsLog for notifyingAppPredictor
> Adding a listener in StartsLogManager for listening to events.
  This allows events to be directored to the predictor only if
  it is already running, instead of creating it.
> Unifying the event format to be same as hotseat predictor

Bug: 160748731
Change-Id: Ib00e6249ff642c030f00bcad5b748255e704d16a
2020-07-16 14:12:15 -07:00
Samuel Fufa
61bc63a6a4 Disabled app icon Visuals
Bug: 154855908
Test: Manual
Change-Id: I58c75ed51426ceb4a09b608ee77636c803955025
2020-06-05 17:35:00 -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