Commit Graph

18016 Commits

Author SHA1 Message Date
Sebastián Franco
892ffb8b15 Merge "Making 2 flags read only since they are used on backup and restore" into main 2024-03-14 20:12:05 +00:00
Federico Baron
f6fd1f3d46 Merge "Fix bug where folder with 1 icon can exist" into main 2024-03-14 20:02:04 +00:00
Sihua Ma
80a35cce2e Merge "Fix out-of-sync updates during grid change" into main 2024-03-14 18:09:15 +00:00
Pinyao Ting
ebd958dc94 Merge "Remote legacy shortcut when failed to migrate" into main 2024-03-14 17:17:45 +00:00
Sebastian Franco
5ea61960ab Making 2 flags read only since they are used on backup and restore
The flags are narrow_grid_restore and grid_migration_fix.

Flag: ACONFIG enable_grid_migration_fix enabled
Flag: ACONFIG enable_narrow_grid_restore enabled
Bug: 325286145
Bug: 325285743
Test: BackupAndRestoreDBSelectionTest.kt
Test: GridMigrationTest.kt
Change-Id: Ia6a439553c3c5098115144eae532342ce73be4f2
2024-03-14 17:16:51 +00:00
fbaron
5645c3ec55 Fix bug where folder with 1 icon can exist
Fix: 329357132
Flag: NONE
Test: TaplDragTest
Change-Id: If381ff56e051c89e9f6162f8a44f8df9e2ae5060
2024-03-14 10:13:00 -07:00
Luca Zuccarini
bb937b2556 Merge "Introduce a new Home animation for workspace and the outgoing task." into main 2024-03-14 16:11:46 +00:00
Rohit Goyal
cbb8328272 Merge "Bugfix: Add null safety when accessing icon database for main activities for LoaderTask loadAllApps." into 24D1-dev am: aca99b60ab
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/26554316

Change-Id: I53fc3448db4f8fdbf861df4b6b37f4177faa815e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-14 15:43:11 +00:00
Brandon Dayauon
69aa9a07ee Merge "Disable two line text legacy flag." into main 2024-03-14 15:11:13 +00:00
Luca Zuccarini
c9cbc9d5a1 Introduce a new Home animation for workspace and the outgoing task.
The values are currently the same for all display and orientation
configurations, but they might change before launch.

There are a couple known imperfections:
* Swiping out of a hotseat app with very low velocity doesn't look
  great
* Sometimes, if the window movement reaches its final location faster
  than the background is done scaling, there is a small snap in icon
  position

Bug: 298089923
Flag: ACONFIG com.android.launcher3.enable_scaling_reveal_home_animation DISABLED
Test: verified with the flag on and off

Change-Id: Id54c7f0a76f62108d8b92a3b5e78634fff64dbef
2024-03-14 10:48:02 +00:00
Pinyao Ting
f5505bf50e Remote legacy shortcut when failed to migrate
Bug: 329421105
Test: manual
Flag: NA
Change-Id: I84071a1711a36a49ad2ef71dc017ae78e4dd1267
2024-03-13 23:48:18 +00:00
Brandon Dayauon
a7bd5cf6ee Merge changes I209e3ec7,If70df129 into main
* changes:
  Change collapse to use adapterItems instead of getting the childCount()
  Upon expanding, expand just enough so the header shows.
2024-03-13 22:49:02 +00:00
Sebastián Franco
920d333e3a Merge "In the case the gird migration goes to a taller grid keep the grid configuration" into main 2024-03-13 22:26:42 +00:00
Sihua Ma
f418b2e16d Fix out-of-sync updates during grid change
This is a combination of two issues:

1. Widget updates are not passed to the holder when the launcher binding starts
2. Updates from widgetHost.startListening() are overriden by out-of-date info

Fix: 322919716
Test: Manual
Flag: N/A
Change-Id: I9665117412c87b19ed5d98263bb4f9b8da21c5c7
2024-03-13 15:21:34 -07:00
Winson Chung
b5c4820a5b Merge "Change existing callers to use no matching id constant" into main 2024-03-13 19:11:20 +00:00
Winson Chung
30a9a212cd Change existing callers to use no matching id constant
- Otherwise it can unintentionally match a predicted icon

Fixes: 329353320
Test: None
Change-Id: I9e46126d5fe45a50d4a36140f7ce0317cd2b1b23
2024-03-13 19:11:03 +00:00
Sebastian Franco
2eaf15c37a In the case the gird migration goes to a taller grid keep the grid configuration
For example going from 4x5 to 4x6 it will keep the 4x5 configuration
which fits in the 4x6 grid.

Also, it fixes GridMigrationTest which was flaky because of
how it sorted arrays.

Bug: 325286145
Flag: ACONFIG grid_migration_fix disabled
Test: NA
Change-Id: I6063e3c303320096f7429a3b1d909e107d2ef2a0
2024-03-13 11:13:38 -07:00
Shamali Patwa
1a72429687 Merge changes from topic "preview-sizes" into main
* changes:
  Limit the recommendations space in two pane picker
  Update the widget previews to use the container sizes
  Avoid cropping image previews.
  Add preview container size helper to display previews in picker.
2024-03-13 13:32:05 +00:00
Rohit Goyal
b313ac7a30 Bugfix: Add null safety when accessing icon database for main activities for LoaderTask loadAllApps.
Test: verified bugfixes locally.
Bug: 329145005
Flag: NA
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3a6318ab5e2dee0b85c3270467477854301497a1)
Merged-In: I9f3145390d0596e55229d7dda08a4a3034d75f31
Change-Id: I9f3145390d0596e55229d7dda08a4a3034d75f31
2024-03-13 10:52:29 +00:00
Holly Jiuyu Sun
5beb2498ac Merge "[PS] Do not use AppInfo and use PrivateSpaceInstallAppButtonInfo instead." into main 2024-03-13 03:48:37 +00:00
Shamali P
1076f176c2 Limit the recommendations space in two pane picker
- This makes the suggestion section non-overwhelming
- Currently it shows too many suggestions for user to find any value
- Limiting the height also allows pagination to feel smooth when showing
in categories

Bug: 318410881
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Test: Manual
Change-Id: Iab1f9a15bdd46ee1560734e30551bfb7c8a74a82
2024-03-12 23:47:07 +00:00
Shamali P
927dd27ece Update the widget previews to use the container sizes
Additionally, adjusts the margins on sides, to make space for displaying
multiple previews side by side.

As a result of this change, previews aren't cropped anymore (indirectly
also fixing b/317366201).

There is one more follow up pending - to limit the height of
recommendations in two pane sheet to only visible area to keep the
suggestions quick to look and concise. It will also help with better
scroll experience when size is same across pages.

* http://screencast/cast/NTQ0Njc4ODgyNjc5MTkzNnxjYzZiYTU2Ny02Yw
* http://screencast/cast/NTk4ODMyMDkxOTE1ODc4NHw3NzdlNTgxZS1kMw
* http://screencast/cast/NTYxOTc5NjIxNjM4MTQ0MHxiMjQ2Njc3OC0zOQ
* http://screencast/cast/NDk4MjIxNjI0MDEzNjE5MnxjY2IwYmIxNi00Mw

Bug: 319152349
Flag: N/A
Test: Image test and table utils test
Change-Id: I07465bd4d84597b560a2b998ff1ccbf9867c0192
2024-03-12 23:47:07 +00:00
Shamali P
c93f687f12 Avoid cropping image previews.
In most cases, cropping image-based previews to just fit width leads to
degraded UX. Instead we try to fit them to the widget size if possible.

* Before: See attached bug for examples of cropped previews.
* After: http://screen/Bg7Eoydr4qBQdVZ

Additionally center align previews vertically for non-categorized
suggestions too.

Bug: 319152349, 317366201
Flag: N/A
Test: Includes a unit test & manual with the child cls
Change-Id: I4447f99028129d5d5379ead9ca404f7a011d1551
2024-03-12 23:47:07 +00:00
Shamali P
a1dbbeab7e Add preview container size helper to display previews in picker.
While we want previews to be displayed at true size, today, there is
less consistency among different widgets. This change is a first step
towards consistent sizes. In this change, we provide helper classes
that provide the size of the container in terms of grid spans.

Note: This does not change the size for rendering widget previews; but,
we take that original rendered preview and scale it maintaining the
aspect ratio to display it in one of closest container sizes.

Bug: 319152349
Flag: N/A
Test: Includes a unit test & manual with the child cls
Change-Id: I335373aa1be9a41fe039c98cded0113a007ad8c4
2024-03-12 23:47:07 +00:00
Sebastián Franco
e9ebd2d70a Merge "Revert^4 "Removing all restored backups except one so we don't have old backups"" into main 2024-03-12 22:00:36 +00:00
Himanshu Gupta
201626b553 Merge "Using LauncherApps API for PS Settings and Setup Flow." into main 2024-03-12 21:17:22 +00:00
Willie Koomson
be65a75e82 Merge "Check for null preview in WidgetItem.hasGeneratedPreview" into main 2024-03-12 19:15:59 +00:00
Sebastián Franco
ad46eb75f4 Revert^4 "Removing all restored backups except one so we don't have old backups"
To prevent the error I introduce the method restorePreviousState().

This reverts commit 1234090589.

Reason for revert: Fixing presubmit breaks

Bug: 325285743
Flag:  ACONFIG narrow_grid_restore disabled
Test: BackupAndRestoreDBSelectionTest
Change-Id: I63666c29eb91dada4243af019ab0538c40bc0f78
2024-03-12 11:01:26 -07:00
Shamali Patwa
7574bed02e Merge "Update labels for the categories to match the UX writer provided strings" into main 2024-03-12 11:37:25 +00:00
Himanshu Gupta
616a1b828d Using LauncherApps API for PS Settings and Setup Flow.
Bug: 310027945
Test: Launcher3 tests
Flag: ACONFIG com.android.launcher3.enable_private_space TRUNKFOOD
Change-Id: I6e04a4b0c33d4526d83b51e512e1e4372ce1cca4
2024-03-11 16:13:08 -07:00
Winson Chung
acec0efb13 Merge "Revert "Revert "Implements the "Save App Pair" button in Overvie..."" into 24D1-dev 2024-03-11 20:40:17 +00:00
Sebastián Franco
8a5dd1b3cf Merge "Revert^3 "Removing all restored backups except one so we don't have old backups"" into main 2024-03-11 20:17:43 +00:00
Sebastián Franco
1234090589 Revert^3 "Removing all restored backups except one so we don't have old backups"
This reverts commit 4b960d1f11.

Reason for revert: Breaking presubmit, no bug number yet 

Change-Id: I0bafad8bf63fae1d9408b65c6c18c79ab5d40d05
2024-03-11 20:15:24 +00:00
Sebastián Franco
37e9aa2504 Merge "Revert^2 "Removing all restored backups except one so we don't have old backups"" into main 2024-03-11 17:09:21 +00:00
Jakob Schneider
57edffece5 Merge "Improve "isActiveArchive" check by moving it a bit earlier into the method." into main 2024-03-11 16:43:50 +00:00
Catherine Liang
975a0695fb Merge "Remove createWindowContext in Launcher preview renderer" into main 2024-03-11 14:13:01 +00:00
Jeremy Sim
eac4f16646 Fix bug with app pairs appearing in wrong orientation in pinned Taskbar
This CL makes it so that app pairs do an orientation check in dispatchDraw() instead of only on init().

Previously we only checked orientation on AppPairIcon.inflateIcon(), and the issue was that orientation was not re-checked when pinned Taskbar was rotated to different sides of the screen. Added a DeviceProfileListener to update orientation when DP changes.

Fixes: 323288812
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, app pair icon always has correct otientation on pinned taskbar
Change-Id: If2de1a4c7334fef1ba4c2edcca09bef9338bc73f
Merged-In: If2de1a4c7334fef1ba4c2edcca09bef9338bc73f
(cherry picked from commit 999ab5215a)
2024-03-11 07:08:27 +00:00
Vinit Nayak
14d28ad455 Revert "Revert "Implements the "Save App Pair" button in Overvie..."
Revert submission 26420318-revert-26391074-save-app-pair-button-ZKCRCDSCSN

Reason for revert: Test failure in question wasn't related to this topic b/328016248

Reverted changes: /q/submissionid:26420318-revert-26391074-save-app-pair-button-ZKCRCDSCSN

Change-Id: I2a4dbb83720768a9d29a4371c77e3b9410ab2fea
Merged-In: I2a4dbb83720768a9d29a4371c77e3b9410ab2fea
2024-03-11 05:00:47 +00:00
Sebastián Franco
bbdcade30d Merge "Add testing for GridMigration." into main 2024-03-09 13:41:00 +00:00
Brandon Dayauon
68c18236ad Disable two line text legacy flag.
Will now repurpose the twolinetoggle flag to be the flag that will
make twoline text enabled/disabled.

bug: 316027081
Test: presubmit
manually: https://screenshot.googleplex.com/BsZGCm7DrTZLwG4
Flag: com.android.launcher3.enable_twoline_toggle Staging
Change-Id: Idef427bad6551ae56b13e35393e076b8e000af5a
2024-03-08 21:32:22 -08:00
Anushree Ganjam
4a214f5750 Merge "Enable Omnient master flags in client code." into main 2024-03-08 22:46:17 +00:00
Willie Koomson
52f2e98647 Check for null preview in WidgetItem.hasGeneratedPreview
AppWidgetManager.getWidgetPreview has been updated to return null
if the provider does not exist or the caller does not have permission to
access its previews. This change updates WidgetItem to check for that.

Bug: 308041327
Test: GeneratedPreviewTest#widgetItem_hasGeneratedPreview_nullPreview
Flag: ACONFIG com.android.launcher3.enable_generated_previews TRUNKFOOD
Change-Id: Ic2489c8698a81ba1bac005b2eb77348bcbfab999
2024-03-08 22:22:53 +00:00
Fengjiang Li
951f74bb60 Merge "[Predictive Back] Don't hide/reveal scroll bar in predictive back swipe in 2 pane widget picker" into main 2024-03-08 22:04:06 +00:00
Anushree Ganjam
25fc87b340 Merge "Remove expecting DOWN events in TAPL tests." into main 2024-03-08 21:43:04 +00:00
Sebastian Franco
851b1f3b1c Add testing for GridMigration.
Bug: 325286145
Flag: ACONFIG grid_migration_fix disabled
Test: GridMigrationTest
Change-Id: I49fd32be895f3a05204775373b9eec62d9026f3b
2024-03-08 14:46:41 -06:00
Shamali P
20a5f4e8d1 Update labels for the categories to match the UX writer provided strings
Also fix issue that user was not passed when getting application info.
(error noticed by Zak)
http://screen/8fiiTSHvo2SfYdE

Bug: 318410881
Flag: N/A
Test: Unit test
Change-Id: Id85feec0d95d3d4d183a673f7eed40906b0043e2
2024-03-08 19:58:23 +00:00
Sebastián Franco
4b960d1f11 Revert^2 "Removing all restored backups except one so we don't have old backups"
This reverts commit 3306fa5325.

Reason for revert: Fixing issue that caused b/328782012

Change-Id: Ib6a1bbfeedf608f5f77ac6be500271e811320f32
2024-03-08 18:53:57 +00:00
Sebastián Franco
0f0c1dd30b Merge "Revert "Removing all restored backups except one so we don't have old backups"" into main 2024-03-08 18:45:17 +00:00
Sebastián Franco
3306fa5325 Revert "Removing all restored backups except one so we don't have old backups"
This reverts commit bd43b9344f.

Reason for revert: b/328782012

Change-Id: I1666fbd63d82da06ed8c3d9ce58b5ed6b298618b
2024-03-08 18:42:30 +00:00
Federico Baron
e81e048183 Merge "Fix folder name touch target size" into main 2024-03-08 17:30:21 +00:00