Commit Graph

1095 Commits

Author SHA1 Message Date
sfufa@google.com
ca76de0e6e Support drag/drop on search results
Bug: 199341710
Test: manual
Change-Id: I9879c2a3769d4f930ab0289d2f26e4757971549d
2021-10-04 13:14:12 -07:00
Thales Lima
7a6752da51 launcher: create paddings for foldables
This creates a new padding file that bring some foldables up to spec
with VisD. For 2 panel layouts it now uses workspace margin instead of
cell layout padding.

Bug: 191879424
Fixes: 200035429
Test: checking paddings in HSV
Change-Id: I11b8e1afd76f535368d4c26e31630ce496171e13
2021-09-29 11:53:29 +01:00
Tony Wickham
6b8a139581 Merge "Remove nonOverlappingTaskarInsets" into sc-v2-dev 2021-09-22 22:44:45 +00:00
Tony Wickham
21970ccd29 Remove nonOverlappingTaskarInsets
- Override our insets in LauncherRootView to explicitly only care about nav bar size, ignoring any insets due to taskbar.
- Previously we used nonOverlappingTaskbarInsets to belatedly subtract from measurements in e.g. DeviceProfile, but now we can revert most of those calculations since we effectively subtract taskbar insets at the root.

Test: visual in different orientations and navigation modes, and testPressHomeOnAllAppsContextMenu to ensure REQUEST_WINDOW_INSETS still works for automated tests
Fixes: 200607741
Change-Id: I8de5a268c686a1354b4beaa30e101bab6bed5af9
2021-09-21 13:52:43 -07:00
Steven Ng
3bbebe2439 Merge "Add an animation for invalid widget resizing in 2 panel UI" into sc-v2-dev 2021-09-21 09:27:44 +00:00
Steven Ng
4b346108d1 Add an animation for invalid widget resizing in 2 panel UI
Test: manual
Fix: 197509872
Change-Id: Ibcfae107e7f4b3bfbc562d4a6436f4b9237db122
2021-09-20 15:33:23 +01:00
Thales Lima
d1df5fcaac launcher: use scalable grid in 4x4
Many changes are required to make scalable displays work correctly on
foldables. This first one is making sure that the correct number of
columns is used when calculating the used width for scalable grid. The
spaces around the workspace are not final yet.

Bug: 191879424
Test: manual
Change-Id: Idc41ed004580f1f86d8f9595d005abc72301b1e3
2021-09-17 10:43:42 +01:00
TreeHugger Robot
b94401646d Merge "Fix wrong screenId when committing emptyScreens" into sc-v2-dev 2021-09-10 15:36:22 +00:00
TreeHugger Robot
81a3e6e7e7 Merge "Fix two dragging related bugs in Launcher home" into sc-v2-dev 2021-09-10 13:39:26 +00:00
Alex Chau
1d5929dd82 Fix wrong screenId when committing emptyScreens
- Need to increment newScreenId whenever the screen is already bound
- Also cleaned up placeholder on w1 as we now have page pairing logic

Bug: 199160559
Bug: 175939730
Fix: 199131780
Test: drag and drop after clear data
Change-Id: Ic42f3bddfa6cf11b8b726d6181ed2477defde19d
2021-09-10 14:36:36 +01:00
Andras Kloczl
9732df1add Fix two dragging related bugs in Launcher home
- accessibility bug: 199394124
- dragging on side bug: http://shortn/_LFBdIllupk

Test: manual
Bug: 199394124
Change-Id: I478e31332119f337bf0f8b6c92926845eb4889c4
2021-09-10 12:16:03 +01:00
Thales Lima
c2a6f6f4ae launcher: correct page spacing for multiple panels in RTL
Fixes 199043583
Test: manual testing in unfolded state in portrait and landscape

Change-Id: Idf5bdabb50742498701681e4654e72260054ab47
2021-09-09 19:13:19 +01:00
Andras Kloczl
d888e77145 Fix crash when hotseat icon is dragged onto Workspace
Test: manual
Bug: 198820019
Change-Id: I53bb858feb7aad45472803b133ef3d026dd9f319
2021-09-06 16:43:01 +01:00
Alex Chau
62f129b878 Fix getPagesToBindSynchronously returning wrong page pairs
- Use WorkSpace.getPagePair instead for accurate value

Bug: 191657065
Test: manual
Change-Id: I584f1705fb5ed2f0d2bd776eb6cf4f60c69238ac
2021-09-06 10:58:48 +01:00
András Klöczl
4926bf706a Merge "Add two extra empty pages on two panel launcher home" into sc-v2-dev 2021-09-05 21:05:53 +00:00
Andras Kloczl
408a54f2e7 Add two extra empty pages on two panel launcher home
Add a new screen ID for the second extra empty page
and add that new screen as well when the existing
extra empty page is added so that users can put items
on both sides of Workspace.

Test: manual
Bug: 196376162
Change-Id: I0b4f2e818407a10d8a7c032788a7bd7a61267779
2021-09-05 22:03:07 +01:00
Sunny Goyal
bb0305614c Preventing workspace scroll over QSB area
Bug: 189792966
Test: Manual
Change-Id: Ie2fe8e7fb6c80b9cc19d517fe828cf26f54f6f09
2021-08-27 10:38:30 -07:00
András Klöczl
701c76013c Merge "Two panel home empty page removing logic change" into sc-v2-dev 2021-08-26 11:09:05 +00:00
Andras Kloczl
8c574de97f Two panel home empty page removing logic change
- Don't remove a single page if it's empty, only if both pages are empty.
- Add back empty pages after they were removed while the phone
  was on single panel home.
- On two panel home don't add new workspace items onto the second screen

Test: manual
Bug: 196376162
Change-Id: I4c54ffa3b359a236deb3ab67adb54111e77ec896
2021-08-26 12:06:50 +01:00
Thales Lima
653ae0a524 Merge "workspace: get the correct page when setting paddings" into sc-v2-dev 2021-08-25 11:54:13 +00:00
Thales Lima
41f33c3cfd workspace: get the correct page when setting paddings
When adding a new page to the workspace, mWorkspaceScreens doesn't
necessarily keeps the order. We should use the mScreenOrder field to get
 the correct index of pages.

Fixes: 197198491
Test: drag an app from first page and paddings should be correct
Change-Id: I4f79c164391348b53b71a87d5d49cfc4d3d35e5a
2021-08-25 11:16:13 +01:00
TreeHugger Robot
46db057249 Merge "Fix NPE when converting final screen to empty screen." into sc-qpr1-dev am: 70dd01be85
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15583988

Change-Id: Ie6d11b74141ff777b10f05919b9a61f7af809900
2021-08-19 15:43:06 +00:00
Jon Miranda
26de7be984 Fix NPE when converting final screen to empty screen.
Bug: 194553613
Test: manual
Change-Id: Id29b8574964688f6f6aa96dd5b1b8a4d8b9110c0
2021-08-16 16:47:11 +00:00
Alex Chau
1e4484669d Remove widget panel
- Remove all usage of LEFT_PANEL_ID and fixed left panel code
- For preview renderer, load screen 0 + screen 1 instead
- Added a split display specific default workspace layout, with a placeholder app to pass test before we implement page pairing(b/196376162)
- Known issue: If screenId 1 is deleted, right panel will disappear from Wallpaepr & Style because there is no screenId 1. Will be resovled after page pairing(b/196376162)

Bug: 175939730
Test: manual and TaplTestsLauncher3#testWorkSpace
Change-Id: Icac1c94165c14a49c17897c45355b6cdc4d87e91
2021-08-13 21:48:35 +01:00
Yogisha Dixit
104d09f143 Add logging when item not added due to insufficient space.
Bug: 194061824
Test: manual
Change-Id: Ib6f6b9ab4a8e1b59b1dbd1c7c137962efa3e880e
2021-08-10 13:57:47 +01:00
Steven Ng
cea65b75d8 Fix wallpaper parallax calculation for large screen devices
Test: manual
Bug: 193403434
Change-Id: Ifaed71f8c3645b012def02a9ea36fc3fb29bac00
2021-08-05 16:05:50 +01:00
TreeHugger Robot
1e46696161 Merge "Fix Workspace item move issues when using Talkback" into sc-v2-dev 2021-08-04 10:48:22 +00:00
Andras Kloczl
e32e8641d6 Fix Workspace item move issues when using Talkback
- fix the crash when an item was moved onto the right panel
- fix the issue that prevented the user from moving an item from the left panel

Test: manual
Bug: 194903736
Change-Id: Ib41f5d6d08e8815a52631ef952d32dcf899455e2
2021-08-04 11:04:19 +02:00
Steven Ng
61cfa57ad8 Correct cell layout spacing in n-panels UI
Test: manual
Fix: 184966000
Change-Id: I6940413c24f41df0b1ffcfd4bec4b0c5c3497b6d
2021-08-03 16:40:41 +01:00
Steven Ng
2a5c594855 Fix cell size calculation in large screen devices
Test: Digital clock widget is no longer cropped.
Bug: 184966000, 194784402
Change-Id: I26c406da1e10232019f34620a4d2bc0dbafcbb31
2021-07-30 11:14:11 +01:00
Sunny Goyal
69a8eecdc9 Simplifying color extraction registration logic
> Calulating correct location irrespective of transient
  state (scale/translation)
> Removing extraction pause/resume logic
> Simplifying location calculation and registration (only use one location instead of a list)

Bug: 194732483
Test: Manual
Change-Id: I255d83761bff5e09c9fb0a5e398d0be0c1d0956f
2021-07-28 15:43:13 -07:00
Sunny Goyal
12e3f1f2f7 Removing UI dependency from LauncherModel in case of 2-panel layout
Bug: 175939730
Bug: 192431856
Bug: 185515153
Test: Manual
Change-Id: I8baa1cf9e5a8a04d5b8bc38c1f4b0755265cd8a9
2021-07-22 10:34:25 -07:00
Thales Lima
e445774ab5 launcher: correct page spacing for multiple panels
This fixes 2 things:
- adding the correct space between pages as insets (eg camera) were
being discarded
- adding the space between pages instead of between panels as was before

This solution should work with more panels and don't create problems for
phones, where panels = 1.

Fixes 193194192
Test: manual testing in unfolded state in portrait and landscape, both
rotations

Change-Id: Ia3b148ceb773c6d5b6f8848ced07d7f9c1459e92
2021-07-22 09:41:43 +00:00
Sunny Goyal
711c596c86 Binding Taskbar directly from Launcher model
This allows taskbar to be loaded even in case of 3P Launchers
and removes dependency on LauncherActivity lifecycle

Bug: 187353581
Bug: 188788621
Test: Manual
Change-Id: I5a0988e0697b41677d4c58f0213aef14ec0c0972
2021-07-15 12:43:11 -07:00
Pierre Barbier de Reuille
41f78f1e13 resolve merge conflicts of 25e37a85ae to sc-v2-dev
Change-Id: I78062d68d051a5f3c369214929f569b17c5a3471
Fix: 192532604
Bug: 192354264
Test: Manual
Merged-In: If573641e4bb5a98ed6b5008e00f70f4bbe492c24
2021-07-01 09:47:10 +00:00
Pierre Barbier de Reuille
43e17301c4 Correct color extraction on App Widget drop.
Disable color extraction on drop until the workspace is back to its
normal size, then re-enable it and force re-coloring. This needs to
happen if the drop is on the workspace, but also if the drop is on the
secondary target.

Fix: 192354264
Test: Manual, see bug for details.
Change-Id: I79203f68843d59384503aa76f4813d886e98afa3
Merged-In: If573641e4bb5a98ed6b5008e00f70f4bbe492c24
2021-06-30 18:50:41 +01:00
Steven Ng
f5555fcb8e Merge "Add null check before detach content view from dragView at onDropComplete" into sc-dev am: 5b786ca88d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15042822

Change-Id: Idc12dd2613200ce6e9901856b14c4ce0c5946fb6
2021-06-23 21:17:48 +00:00
Steven Ng
92335ed7bd Add null check before detach content view from dragView at onDropComplete
Test: Drop a conversation widget on a configuration button. No crash
      is observed.
Fix: 191762933
Change-Id: I483c6f4dbc9fc6c096383682284a4c854707f583
2021-06-22 23:26:05 +01:00
Sunny Goyal
0c299cb324 Merge "Simplifying the drop animation code" into sc-v2-dev 2021-06-16 23:18:16 +00:00
TreeHugger Robot
c51564bb7a Merge "Reattach LauncherAppWidgetHostView to its parent after canceling drag" into sc-dev am: 4176cb33bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14970490

Change-Id: I5a92dc73ce2dcde24ea5fd7d826211e9d35a717e
2021-06-16 22:39:09 +00:00
Steven Ng
a5e1453779 Reattach LauncherAppWidgetHostView to its parent after canceling drag
onDrop isn't called if the drag is canceled at Launcher.onPause. Let's
also reattach LauncherAppWidgetHostView to its parent in this case.

Test: long press and hold a widget and, at the same time, press the
      power button. Don't let go of the long press and press the power
      button. No crash observed.
Fix: 190950646
Change-Id: Id52a51291863b7ef63c861eb6dc23b015484be65
2021-06-15 00:01:04 +01:00
Andras Kloczl
dbf577af46 Add left widget panel to Launcher home when unfolded
Test: manual
Bug: 175939730
Change-Id: I9831e7fa95084db12953ec7cb2eb725e7549e01d
2021-06-14 12:22:05 +02:00
TreeHugger Robot
c13b47f7bf Merge "Fix CellLayout cast exception when drag is canceled" into sc-dev am: 76f5572648
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14948453

Change-Id: I4d23a6d0cc1806761bf9655ba8d823813ec8b630
2021-06-12 12:39:52 +00:00
Steven Ng
77a1393c44 Fix CellLayout cast exception when drag is canceled
Test: Long press a widget and then release when the resize frame is
      shown. Then, click the content of the widget to launch the
      widget's activity. Go back to home screen and then immediately
      long press the same widget again. No crash was observed.
Bug: 189814379
Change-Id: I4232ecf9d9d9efaba817b7777314f0814bb7ef21
2021-06-11 20:18:21 +01:00
Sunny Goyal
1721ccf385 Simplifying the drop animation code
> Removing some unused parameters

Bug: 190524398
Test: Manual
Change-Id: Iea0c2e7a9d30a10fd7443ea57992c59ea60badf8
2021-06-08 14:43:57 -07:00
Steven Ng
0ed1b41464 Merge "Exact widget sizes functionalities into an utility class" into sc-dev am: 84fe7e3a1e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14881307

Change-Id: I5202727f975ce463179674cd54ba8d4b75063f9d
2021-06-08 19:12:12 +00:00
Steven Ng
22b6039270 Exact widget sizes functionalities into an utility class
Test: resize widget, move widget, add widget.
Bug: 189975670
Change-Id: Ia0bc2297891e1cfa33697e985064db5d1dcdfc8b
2021-06-08 11:42:48 +01:00
Steven Ng
8e74a1f2a7 Merge "Show app widget resize frame after launcher state change" into sc-dev am: c58b204926
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14733440

Change-Id: I347e1fae2221f478cc7cab478e3924ea8a131eb8
2021-06-01 21:31:34 +00:00
Steven Ng
6ed0112871 Merge "Fix add extra empty screen logic" into sc-dev am: a45ea6cf33
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14717704

Change-Id: I69033f2b4ca9f3508ed31125bb9b74a09dd32829
2021-06-01 21:31:30 +00:00
Steven Ng
c58b204926 Merge "Show app widget resize frame after launcher state change" into sc-dev 2021-06-01 21:11:01 +00:00