Commit Graph

12092 Commits

Author SHA1 Message Date
Steven Ng
3c08f580c3 Merge "Widgets recommendation backend" into sc-dev 2021-03-09 10:05:55 +00: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
Sunny Goyal
0724113b3d Removing insets controller animation as part of all-apps opening
Adding support for easier extension of StateHandlers

Bug: 180143210
Test: Verified on device
Change-Id: If6a088d1482c9b268b21786c4694f6e0927be0c3
2021-03-08 18:38:25 -08:00
Steven Ng
3a8353256a Widgets recommendation backend
Add a widgets recommendation mechanism based on AiAI app predication
ranking with the following changes:

1. Only one widget is picked from one app.
2. Widgets that are already added to the workspace are excluded from
   the recommendation.

Test: run PredicationUpdateTaskTest

Bug: 179797520
Change-Id: Ia697bc6df0bae75969e68b7b3de32d57901f7461
2021-03-08 23:37:51 +00:00
Steven Ng
ae6b34811b WidgetCell & LiveWidgetPreview cleanup
The fixes are:
1. For widgets shown in TableRow, aligns them center vertically.
   This is useful when widgets of different height are shown in
   the same row.
2. Remove background color from WidgetCell
3. Re-enable swipe in FullWidgetsSheet
4. Use the WidgetCell image as the single & long press area because
   1. Previews are now scaled to their default size. The touch area
      should already be larger for widgets that are bigger than 2.4
      cells
   2. WidgetCells also render description. If the user long press the
      description area, the drag view will not align in the middle of
      the user touch / drag area.

Test: Drag-n-drop widgets from FullWidgetsSheet, BottomWidgetsSheet
      and pin widget flow.
      In FullWidgetsSheet, swipe left and right to switch work /
      personal tab.

Video: https://drive.google.com/file/d/1Ur7PwF1a7iwGGRTZczfc0BSVu-Ta6-Vm/view?usp=sharing

Bug: 179797520
Change-Id: I6fe4bc88d1e1b35b1819d8d7f046105f5ed27043
2021-03-08 21:22:08 +00:00
TreeHugger Robot
d60299e19f Merge "Prevent NPE inside AllAppsTransitionController" into sc-dev 2021-03-08 20:21:31 +00:00
Samuel Fufa
3b61fb2b01 Merge "[Search] Support flexible results-per-row in AllApps" into sc-dev 2021-03-08 20:04:19 +00:00
TreeHugger Robot
d10382995f Merge "Inflate layout preview for work profile" into sc-dev 2021-03-08 11:32:17 +00:00
Hyunyoung Song
1a26781153 Merge "No focus highlight in prediction row" into sc-dev 2021-03-08 10:07:58 +00:00
Hyunyoung Song
f0988f1fb1 Prevent NPE inside AllAppsTransitionController
Bug: 181911438
Test: manual

Change-Id: Ia2cfe43512c0336232fc6787eb955d476280e3b8
2021-03-08 00:43:25 -08:00
Hyunyoung Song
d3df0e4103 Do not rebind AA+ adapters when there's search result
Bug: 181352111
Test: manual
Change-Id: Ieab75f3805f5d06a6bd8f60014abca103d7004b4
2021-03-07 22:02:16 -08:00
Hyunyoung Song
0f77156397 No focus highlight in prediction row
Bug: 181337130
Test: manual

Change-Id: Ic6598a02c575037208c8808e1f9e102b7b7be5e9
2021-03-07 22:00:33 -08:00
Alina Zaidi
c6fe0dd4fa Implement pipeline for a simple search based on query string matching on app names in WidgetsListBaseEntries.
This will be the default search for AOSP widget picker and a fallback search for Pixel widget picker.

Test: Tested prototype locally. Also added robolectric test.
Bug: b/157286785
Change-Id: Iad3bf2f46b2a89383a52c756fd1b9f65ecbeb40b
2021-03-07 21:23:37 +00:00
Tony Wickham
39938cbc94 Initiate Hotseat drag from long pressing corresponding Taskbar item
When you long press on the taskbar hotseat item, the following happens:
- We start a system drag and drop with an invisible drag shadow
- We create a new DragOptions with the simulatedDndStartPoint set to the
  drag down position, and tell Launcher to use that for the next drag
- We perform a long click on the equivalent Hotseat item in Launcher
- We pass the drag events of that operation to Launcher's DragController

This allows Launcher to handle the entire drag operation, including the
pre-drag (with popup), and taskbar already hides when the drag starts.

Test: Long press items in taskbar hotseat, able to drag them to workspace

Bug: 179886115
Bug: 171917176
Change-Id: I576b80cb1bd0225cdc91cf7689fdee0481265109
2021-03-06 03:39:54 +00:00
TreeHugger Robot
3ca4b0d88f Merge "Moving data sanitization before bind" into sc-dev 2021-03-06 01:19:15 +00:00
Winson Chung
b72be3e27c Merge "Removing old logs" into sc-dev 2021-03-05 22:59:43 +00:00
TreeHugger Robot
bcadf1457c Merge "Correct Launcher3 for new sizes in App Widgets." into sc-dev 2021-03-05 22:44:57 +00:00
TreeHugger Robot
2ef625b414 Merge "Removing some animation special casing for 2-button mode" into sc-dev 2021-03-05 22:28:40 +00: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
Winson Chung
90d5e6bc42 Merge "Add some logging for failure to get recents" into sc-dev 2021-03-05 20:46:30 +00:00
Steven Ng
46b0d8e291 Inflate layout preview for work profile
Also fix a bug which LivePreviewCells are not used in full widgets
sheet.

Test: Temporarily replace the previewLayout with initialLayout
      from the code. Then, open both the full and bottom widgets
      sheet. Observe initial layout is rendered correctly for both
      personal and work profile.

Screenshot: https://screenshot.googleplex.com/BgJycVjzeoU3PNf.png

Bug: 181061277
Change-Id: Id635ee778008b6f94009f50bf4373d3b0f545417
2021-03-05 20:02:31 +00:00
Steven Ng
1f4a3414f1 Merge "Add shortcuts count as a subtitle in the full widgets sheet" into sc-dev 2021-03-05 17:56:11 +00:00
TreeHugger Robot
bd16cc3cf3 Merge "Fix scrolling bugs in full widgets sheet" into sc-dev 2021-03-05 16:55:44 +00:00
Alina Zaidi
94b622da80 Merge "Interface for WidgetPickerSearchPipeline." into sc-dev 2021-03-05 16:50:38 +00:00
Steven Ng
7f7b2f7ee9 Fix scrolling bugs in full widgets sheet
Bugs:
1. Layout margins were not taken into account
2. Fast scroller offset has a different scale to the recycler view
3. Update padding & margin in onMeasure rather than in onLayout

TODO: fast scroller measurement doesn't take into account of
      expanded item. It naively use the same height for all items
      from the recycler view adapter.

Test: Open full widgets sheet for both work profile and non-work
      profile setup. Scrollbar initial position is correct. Scroll
      up and down to confirm views vertical translation is correct.

Video: https://drive.google.com/file/d/1kp3iSm23RVk_otBNeYalEPPkWjjWMOY0/view?usp=sharing

Bug: 181629430
Change-Id: I398a94510751782e78aa8f426f37b03ecca8ec99
2021-03-05 11:44:47 +00:00
Pierre Barbier de Reuille
18d159a250 Correct Launcher3 for new sizes in App Widgets.
This follow recommendations from the API council review.

Also removes two public functions introduced recently by
http://ag/13473552 and are not needed anymore.

Bug: 181611658
Test: Manual testing with local widget.
Change-Id: I8d0c90a80a0d45981bd5d16e69cd86639d5ec7d8
2021-03-05 11:44:11 +00:00
Steven Ng
bcab2a808a Add shortcuts count as a subtitle in the full widgets sheet
Screenshot: https://screenshot.googleplex.com/9Ds55rsFSNajLWN.png

Test: Open full widgets sheet and observe widgets and shortcuts
      counts are correctly displayed.

Bug: 180725078
Change-Id: Ibf43c14cc06c0e9bf245c53f190095d0eaeace12
2021-03-05 09:54:56 +00:00
Sunny Goyal
befaad269e Merge "Fixing empty page not removed when drag ends" into sc-dev 2021-03-05 06:29:33 +00:00
Sunny Goyal
a0bc6d964e Removing some animation special casing for 2-button mode
This would simplify reusing the same code for 3-button mode

Test: Verified on device
Bug: 175137718
Change-Id: Ia757eec069efc251475baa6af38c690431325f66
2021-03-04 22:25:30 -08:00
Tony Wickham
634f600848 Merge "Align real hotseat with taskbar hotseat during drag and drop" into sc-dev 2021-03-04 23:53:55 +00:00
Winson Chung
0613af3587 Add some logging for failure to get recents
Bug: 177472267
Test: Presubmit
Change-Id: I64a01ef076a58bc3118840ff3171177f61edc3f5
2021-03-04 14:18:41 -08:00
Winson Chung
13c20193eb Removing old logs
Bug: 156095088
Test: Presubmit
Change-Id: I61b44fd4ee96de405482f9cf9b6a06d87a295898
2021-03-04 06:16:41 +00:00
Tony Wickham
a29a046d83 Align real hotseat with taskbar hotseat during drag and drop
Remove hotseat space from workspace in DeviceProfile if
taskbar is present, and instantly swap between taskbar and
hotseat when entering SpringLoadedMode. To allow for an exact
handoff, we also scale up the TaskbarView such that its icons
match the hotseat icon size when on the home screen.

Note that this CL only supports dragging to the taskbar, not
out of it (which still triggers system drag and drop instead).

Test: In RTL and LTR, drag a workspace item and ensure hotseat
seamlessly swaps with the taskbar hotseat and allows drops.

Bug: 179886115
Bug: 171917176

Change-Id: Id6462075b9b0b66b06d51a78c9c0b3e11e83e84d
2021-03-03 11:16:42 -08:00
Schneider Victor-tulias
eedab487e3 Fix incremental download progress of workspaceiteminfos.
WorkspaceItemInfo intent package names could be null, while the item info itself had a non-null package name. Added a helper method checking component package names first, then intent package names as a fallback for deep shortcuts.

Demo: https://drive.google.com/file/d/1No44OD7SAD9qdmu-O6g3WaGdFjFLu2in/view?usp=sharing

Fixes: 181261930
Test: Manually on device
Change-Id: Ie2e10a79865b4898038fbdd4bbd9a7e9e1d42366
2021-03-03 18:56:10 +00:00
Tony Wickham
4092352a99 Merge "Add debug log for initInputMonitor()" into sc-dev 2021-03-03 16:42:33 +00:00
Alex Chau
aa47630ecd Merge "Show TaskView as grid in large screens" into sc-dev 2021-03-03 10:08:01 +00:00
Jonathan Miranda
41a5c37009 Merge "Use grid border spacing as widget padding if possible." into sc-dev 2021-03-03 00:24:27 +00:00
Sunny Goyal
97c2e513b3 Fixing empty page not removed when drag ends
Bug: 179550470
Test: Verified on device
Change-Id: Ie9b20dfde1a64b385041f6e4d32fe47e3c6e5a7d
2021-03-02 13:00:22 -08:00
Alina Zaidi
b8ad633b7e Interface for WidgetPickerSearchPipeline.
Test: not required
Bug: b/157286785
Change-Id: Ib0a4d2915bd678304e7971cdfd7296811ea8587b
2021-03-02 20:30:03 +00:00
TreeHugger Robot
ce7961a493 Merge "Fix some issues with TwoButtonNavbarTouchController" into sc-dev 2021-03-02 20:14:32 +00:00
Jon Miranda
611dba4c94 Use grid border spacing as widget padding if possible.
Widget padding is added by the system to create reliable consistency
between widgets.

Now that we have added border spacing between cells on the launcher
grid, we have significantly decreased the available space for widgets
on home screens: widget padding is 8dp on all sides, border spacing is
currently spec'd to be 16dp.

We can inset the widget padding added by the system, and instead rely
on the border spacing between cells to create reliable consistency
between widgets.

Bug: 175329686
Test: manual
      turn CellLayout#VISUALIZE_GRID debug flag on
      test drag and drop, resizing using drag handles
      view measurements in go/web-hv
Change-Id: Iabb9f45e82e4ae039f55d7fd27fbd0d23be60191
2021-03-02 15:06:46 -05:00
TreeHugger Robot
fe67c6be0b Merge "Fix NPE in FlingToDeleteHelper" into sc-dev 2021-03-02 20:00:53 +00:00
Jonathan Miranda
a9bb9394a5 Merge "More grid changes, closer to final specs." into sc-dev 2021-03-02 19:19:08 +00:00
Sunny Goyal
d197ebcfd5 Moving data sanitization before bind
Data sanitization changes the launcher model data, which makes it
out of sync with what Launcher is displaying.
This would lead to widgetsIds getting deleted when they are created
by Launcher on UI thread, but have not yet been updated in the model
Also clearing all ghost widgets on every load. This would remove
the flaky behavior where widget update depends on folder and
other icons getting removed

Test: Presubmit
Bug: 181680555
Change-Id: I3cce69383d9d92a283c5197c3f99fbb539d93dbb
2021-03-02 10:58:16 -08:00
Tony Wickham
b96cf5cdf2 Fix some issues with TwoButtonNavbarTouchController
- Use same swipe height as the tests use to get to Overview
- Use mStartState instead of fromState when determining
  target state, to disallow swiping through states, i.e.
  from NORMAL to OVERVIEW back to NORMAL in one long swipe
  up gesture. Instead, now swipe up from NORMAL goes to
  OVERVIEW and swipe up from OVERVIEW goes to NORMAL.

Fixes: 177316094
Change-Id: Ic8e9c8650d4cf11eec344802e3569413bfd5d7bc
(cherry picked from commit a24b9ff69d)
2021-03-02 18:14:03 +00:00
Alex Chau
b794ea64c7 Show TaskView as grid in large screens
- Introduced gridProgress to RecentsView/TaskView ofr animating into grid
- Introduced gridProgress dependant translation and scale properties in TaskView
- Animate running task into grid with TaskViewSimulator
- Remove overview actions (for now) but keep clear all button in large screens
- Adjust ClearAllButton translation to acoomodate for grid
- Use screen width +-50% to calculate task visibility
- Use the position where TaskView is on screenEnd as pageScroll
- TODO: Handle separate recents activity

Doc: go/foldables-launcher-overview
Video: http://dr/file/d/107Aydii1LoFCwP63nWG3Twr2PBDE5ZgD/view?resourcekey=0-aUjdnx8ezimS9tmAgao9ag
Test: Test Launchering overview and launching overview from apps with folloiwng combination:
- large / small screen sizes
- portrait / landscape
- thumbnails from different screen sizes / orientations
Bug: 174464863
Fixes: 181509346

Change-Id: I4b691cde774f2e37532b68ba83c6eed399f2332e
2021-03-02 17:10:45 +00:00
Jon Miranda
2839c20c1a Fix NPE in FlingToDeleteHelper
Bug: 171543835
Test: not able to repo bug, but this prevents the NPE
Change-Id: I153dd0665705b2f5fd7f46786e815ba57dec4720
2021-03-02 12:01:03 -05:00
Steven Ng
13d5079e90 Merge "Add widget description to WidgetCell" into sc-dev 2021-03-02 09:57:22 +00:00
Yogisha Dixit
a6554759aa Merge "Move widget files into widget folder + add tests." into sc-dev 2021-03-02 09:30:02 +00:00
TreeHugger Robot
4a202c5abd Merge "Only fetching relevant widget info during first pass" into sc-dev 2021-03-02 02:07:12 +00:00