Commit Graph

12182 Commits

Author SHA1 Message Date
TreeHugger Robot fc9d97164c Merge "Fix NPE inside dispatchRestoreInstanceState" into sc-dev am: 04d4d0d4f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15184364

Change-Id: I2ab86183cc5cd32b233b596364acfd329d8211a9
2021-07-02 19:05:02 +00:00
TreeHugger Robot 04d4d0d4f9 Merge "Fix NPE inside dispatchRestoreInstanceState" into sc-dev 2021-07-02 18:46:30 +00:00
Pierre Barbier de Reuille c167b0bdf3 Merge changes Id2a8d12e,I06353ba4 into sc-dev am: 6788b73970
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15171715

Change-Id: I40b331817125cd8f4f56302d004bb77e79ca635b
2021-07-02 14:20:17 +00:00
Pierre Barbier de Reuille 6788b73970 Merge changes Id2a8d12e,I06353ba4 into sc-dev
* changes:
  Use the computation of the widget size including padding.
  Avoid calling AppWidgetHostViedw#updateAppWidgetSize
2021-07-02 14:05:08 +00:00
Pierre Barbier de Reuille a7b3a14e75 Use the computation of the widget size including padding.
Found all the uses of getWidgetSizePx and replaced them with the
computation of padded sizes (checked it all made sense).

Test: Try the various widget pickers.
Bug: 191612352
Change-Id: Id2a8d12ee7ce6baabef186dbb78d817975ea2212
2021-07-02 10:04:06 +01:00
Pierre Barbier de Reuille 199aec50ad Avoid calling AppWidgetHostViedw#updateAppWidgetSize
We cannot call it anymore, because the system padding is not always
used.

Bug: 191612352
Test: Manually, using CtsVerifier and dedicated widgets
Change-Id: I06353ba49a8e62127e593cdbcb86fadcf89ecb24
2021-07-02 10:03:44 +01:00
Hyunyoung Song 9804c0472e Fix NPE inside dispatchRestoreInstanceState
Bug: 192559704
Test: manual
Change-Id: I212518ac4a7feddd8e87f4be601332ea62e99313
2021-07-01 23:26:57 -07:00
Tracy Zhou e54f789de9 Merge "Do not switch to screenshot and finish recents animation for menu options that already do so" into sc-dev 2021-07-01 19:32:39 +00:00
Jonathan Miranda aa560506ba Merge "Cancel existing preview item animation during non-animated update." into sc-dev am: 81501a563c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15164771

Change-Id: I667763f65219cf259b8cf0db929d7dc0c848163e
2021-07-01 18:36:16 +00:00
Jonathan Miranda 81501a563c Merge "Cancel existing preview item animation during non-animated update." into sc-dev 2021-07-01 18:32:49 +00:00
Tracy Zhou 99adef95b3 Do not switch to screenshot and finish recents animation for menu options that already do so
The issue is that in landscape mode we add overview shortcuts (e.g. screenshot) to the task view menu, where we switch to screenshot and finish recents animation before executing the shortcut action. However for shortcut actions like screenshot, we do the same, resulting in two chained "switch to screenshot and finish". This is a temporary fix for S given it's late in the cycle and we don't want to introduce unwanted regressions.

Fixes: 192272546
Test: manual
Change-Id: I7ef596e8bce6c15aa4a27163197beac12359b691
2021-07-01 17:46:44 +00:00
Cyrus Boadway 270a9c734f Merge "Use nullable field and boolean rather than optional" into sc-dev am: 048a858575
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15171711

Change-Id: I6b6b6bf2ecb367f81fdb82321c7e7bb3cd8a228a
2021-07-01 17:15:38 +00:00
Cyrus Boadway 551b4297ed Use nullable field and boolean rather than optional
Optional won't hold null parameters, so use a boolean flag and
colorschange fields to represent the value and whether changes are
present.

Bug: 190818220
Test: manual
Change-Id: I794507340345864e73f04039f12a035c8053fd96
2021-07-01 15:05:43 +00:00
Alina Zaidi f03b1aeeb6 Merge "Reduce margin for DropTargetBar to avoid buttons to be truncated." into sc-dev am: eefccccb19
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15155531

Change-Id: I92c997fbd0d0f47e78e5169e8cad9938bd2af0a0
2021-07-01 11:52:05 +00:00
Pierre Barbier de Reuille 2fa6e35341 Merge "resolve merge conflicts of 25e37a85ae to sc-v2-dev" into sc-v2-dev 2021-07-01 11:50:42 +00:00
Alina Zaidi eefccccb19 Merge "Reduce margin for DropTargetBar to avoid buttons to be truncated." into sc-dev 2021-07-01 11:10:26 +00:00
Steven Ng d9128413cc Merge "Fix widget animation truncated at drop if a widget is resized" into sc-dev 2021-07-01 10:29:49 +00: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
Steven Ng 39a87fda17 Fix widget animation truncated at drop if a widget is resized
Set the widget outline to DragView rather than the content view
hosting a Picture record of AppWidgetHostView at drop.

Bug: 191646816
Test: Manual
Change-Id: I901743f8ba392de37f3ef69ca386c4b36bfebd7f
Merged-In: I901743f8ba392de37f3ef69ca386c4b36bfebd7f
2021-07-01 09:22:25 +00:00
Alina Zaidi 1b5efa3216 Reduce margin for DropTargetBar to avoid buttons to be truncated.
Bug: 187036287
Test: Tested manually by QA testing team on 4X5 grid size
Change-Id: Iaa4cd3e464ccf50427a5aa96d97093601e1d2948
2021-07-01 09:50:46 +01:00
TreeHugger Robot 25e37a85ae Merge "Correct color extraction on App Widget drop." into sc-dev 2021-07-01 08:31:16 +00:00
Jon Miranda 2cc33ed29a Cancel existing preview item animation during non-animated update.
Otherwise we end up in a bad folder icon state.

Bug: 191227370
Test: Drag icon out of folder bounds,
      Suddenly drop it so its forced to go back to the folder
      Close folder before the animation finishes

Change-Id: Ib751a8209d66c5e9772731fdc1d7f365ae47531a
2021-06-30 17:59:17 -07:00
Steven Ng 12b0dfb826 Fix widget animation truncated at drop if a widget is resized
Set the widget outline to DragView rather than the content view
hosting a Picture record of AppWidgetHostView at drop.

Fix: 191646816
Test: Manual
Change-Id: I901743f8ba392de37f3ef69ca386c4b36bfebd7f
Merged-In: I901743f8ba392de37f3ef69ca386c4b36bfebd7f
2021-06-30 20:47:57 +00:00
Brian Isganitis e99ed7b9d1 Merge "Intercept touch events for launcher preview root view" into sc-dev 2021-06-30 20:36:55 +00:00
Yogisha Dixit ba28286260 Merge "Log widgets source." into sc-dev am: f9acf1d5d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14690879

Change-Id: I2fa39b66ca31549f7754657b7d3bde6bdf8a5f59
2021-06-30 18:33:44 +00:00
Yogisha Dixit f9acf1d5d4 Merge "Log widgets source." into sc-dev 2021-06-30 18:18:12 +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
Yogisha Dixit 658c5dafd4 Log widgets source.
Test: manual
(1) Upgrading to new DB version is successful (no errors thrown in logcat)
(2) Widgets that were added with the old DB version have CONTAINER_UNKNOWN as their source container
(3) Widgets that are added with the new DB version still log source container after reboot
Bug: 185778648
Change-Id: Iaa38f0be6bc4cb0d29842f9a2ea0d08de000c930
2021-06-30 17:48:14 +00:00
Cyrus Boadway f5f23ba119 Merge "Defer onColorsChanged updates during widget-to-home animation" into sc-dev am: 1edaed8790
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15147896

Change-Id: I93c3c42dc173182c7625dea719bbc540a544234a
2021-06-30 17:24:57 +00:00
Cyrus Boadway 0d96baec13 Defer onColorsChanged updates during widget-to-home animation
Color change updates recreate the view, which can interfere with the
widget-to-home return animation, specifically the GhostView's use of the
AppWidgetHostView's render node.

Deferring the application of color changes until the end of the
animation allows the widget to settle and remove the GhostView before a
color change might recreate the widget's view.

Bug: 190818220
Test: manual
Change-Id: I6552e583ebb0e4810077d4e70fe9ecb07fd5d01a
2021-06-30 13:10:02 +00:00
Alex Chau f35a887446 Merge "Snap to relative position to snappd task when dismissing" into sc-v2-dev 2021-06-30 10:24:11 +00:00
Hyunyoung Song 6eee4e4f3d Merge "Rebind recycler views if launcher activity restarted" into sc-dev am: 77c532d799
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15136464

Change-Id: Iaa257f243aac6c2378a89102ab9bbae2d412d500
2021-06-30 04:20:04 +00:00
Hyunyoung Song 77c532d799 Merge "Rebind recycler views if launcher activity restarted" into sc-dev 2021-06-30 04:00:23 +00:00
Jonathan Miranda 2178eedc6a Merge "Set elevation of popup and arrow to match. This ensures no shadow overlap." into sc-dev am: 26a485bb2a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15147164

Change-Id: I71252441a356c0119eeb94bdef36ab14d370b2a2
2021-06-30 03:08:23 +00:00
Jonathan Miranda 26a485bb2a Merge "Set elevation of popup and arrow to match. This ensures no shadow overlap." into sc-dev 2021-06-30 02:56:18 +00:00
Brian Isganitis 610e43f90e Intercept touch events for launcher preview root view
This change prevents any accidental touches on any widgets in the
preview.

Test: Tapping on launcher preview in wallpaper app should never activate
a widget.
Fix: 191623924

Change-Id: Iac7eab057ec33ff491365a993af75a0b06a27f7e
Merged-In: I98d462eca699cf368dcd5894f15584f280932ccc
2021-06-29 23:59:03 +00:00
Brian Isganitis 0aa22aaea1 Merge "Intercept touch events for launcher preview root view" into sc-v2-dev 2021-06-29 23:58:17 +00:00
Steven Ng 755c2c54c7 Merge "Use category icon for pending conversation widgets" into sc-dev am: d35dcdec05
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15142493

Change-Id: Id2b6a1429d1b8f84e901fffc0e669c357888d9be
2021-06-29 23:16:56 +00:00
Jonathan Miranda 576e567f0f Merge "Fix bug where status bar was not set properly." into sc-dev am: 1b6a8b2255
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15146553

Change-Id: I1e4b057e8a5f75c823eb15a5539c3130ddb06183
2021-06-29 23:16:50 +00:00
Steven Ng d35dcdec05 Merge "Use category icon for pending conversation widgets" into sc-dev 2021-06-29 23:15:04 +00:00
Jonathan Miranda 1b6a8b2255 Merge "Fix bug where status bar was not set properly." into sc-dev 2021-06-29 23:03:15 +00:00
Jon Miranda fa73c02172 Set elevation of popup and arrow to match. This ensures no shadow overlap.
Bug: 191823198
Test: long press app where arrow is on top and bottom in:
      workspace, all apps, and search UI

Change-Id: Icc4ac259607175d5e12447a844ba166ba28b74af
2021-06-29 15:49:46 -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
Jon Miranda 401b921c19 Fix bug where status bar was not set properly.
- Need to check both alpha of the view, and alpha of the background color.

Bug: 187467559
Test: check status bar colors when using:
      - on white wallpaper,
      - on black wallpaper,
      - on wallpaper with white text
      - on wallpaper with dark text

Change-Id: Ie6f34d34dfa9dea716f95bd6a95125fbd650fc29
2021-06-29 14:23:55 -07:00
Yogisha Dixit ffd5acea77 Merge "Show resize frame when widget is added." into sc-dev am: 419ee4599e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/13956205

Change-Id: I318890ec7296fdd9f2176cf19e77898ed5acbf0e
2021-06-29 21:21:45 +00:00
Yogisha Dixit 419ee4599e Merge "Show resize frame when widget is added." into sc-dev 2021-06-29 21:07:34 +00:00
Brian Isganitis 3b39f3164b Intercept touch events for launcher preview root view
This change prevents any accidental touches on any widgets in the
preview.

Test: Tapping on launcher preview in wallpaper app should never activate
a widget.
Bug: 191623924

Change-Id: I98d462eca699cf368dcd5894f15584f280932ccc
2021-06-29 16:07:16 -04:00
Samuel Fufa 42064e0d30 Merge "Update snackbar color" into sc-dev am: 48ec126d8b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15129885

Change-Id: Ib158406b7300fe1dcb77279cba80d764bc294e29
2021-06-29 19:05:06 +00:00
Alex Chau ba61b98fca Snap to relative position to snappd task when dismissing
- Calculate the diff to snapped page scroll and apply in onLayout, so tasks won't jump after dismiss when not in snapped position
- In grid, always keep the relateive snapped page unchanged to avoid jump

Bug: 188793333
Test: manual
Change-Id: Id11c2d700dc55440de39cc7409d06a712cedc9bc
2021-06-29 19:54:21 +01:00
Samuel Fufa 48ec126d8b Merge "Update snackbar color" into sc-dev 2021-06-29 18:48:38 +00:00