Commit Graph

15523 Commits

Author SHA1 Message Date
Saumya Prakash
194403681b Only run search edu when enabled, also make code more generic.
We only need to run the Search edu if it is enabled on devices. The code
itself is also made more generic in terms of method and variable names.

Fix: 330401405
Test: Enable and disable the search function and check whether the edu tooltip shows
up for each specific use case.
Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning NEXTFOOD

Change-Id: I1cea3ee56922c0b47ae7e8379aad4b36570daa17
Merged-In: I1cea3ee56922c0b47ae7e8379aad4b36570daa17
2024-04-25 18:37:02 +00:00
Jagrut Desai
7a5aeb3544 Merge "Customize BubbleTextView for Taskbar Icon Size" into 24D1-dev 2024-04-23 16:17:07 +00:00
Sebastián Franco
979cc8c8c0 Merge changes from topic "cherrypicker-L13500030003200477:N52900030052341505" into 24D1-dev
* changes:
  If the user only had the default db, then migrate to the new default
  Set default grid when doing a backup and restore
  Making 2 flags read only since they are used on backup and restore
  In the case the gird migration goes to a taller grid keep the grid configuration
  Revert^4 "Removing all restored backups except one so we don't have old backups"
  Add testing for GridMigration.
  Refactor migrateGridIfNeeded to pass the grid states and make it easier for unit testing
2024-04-22 23:55:10 +00:00
Sebastian Franco
1edaf75ad9 If the user only had the default db, then migrate to the new default
We also check if the new default is bigger than or equal to the
previous one.

Flag: ACONFIG enable_grid_migration_fix enabled
Flag: ACONFIG enable_narrow_grid_restore enabled
Bug: 325286145
Bug: 325285743
Test: BackupAndRestoreDBSelectionTest.kt
Test: GridMigrationTest.kt
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:12678a536b747279bb7ce04557696aae6725ce33)
Merged-In: I98315a4e4c112ca96a74200dd76016803dfaf820
Change-Id: I98315a4e4c112ca96a74200dd76016803dfaf820
2024-04-22 16:15:55 +00:00
Sebastian Franco
7b46e1145c Set default grid when doing a backup and restore
When restoring from a tablet because phones don't have
the same table some issues can ocure because we setup a
non valid grid, the correct thing is to setup a default.

Bug: 325285743
Fix: 332964986
Flag: ACONFIG narrow_grid_restore enabled
Test: BackupAndRestoreDBSelectionTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:df7d2b08614adfd19245577724588307ff439a7d)
Merged-In: I28bf02e83dddf5ae84818d879a5e21600eddf67e
Change-Id: I28bf02e83dddf5ae84818d879a5e21600eddf67e
2024-04-22 16:15:41 +00:00
Sebastian Franco
8c3d830b39 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5ea61960ab4b0da02aeb5dd36968c2ef923709aa)
Merged-In: Ia6a439553c3c5098115144eae532342ce73be4f2
Change-Id: Ia6a439553c3c5098115144eae532342ce73be4f2
2024-04-22 16:15:30 +00:00
Sebastian Franco
f5a2e75100 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2eaf15c37a051fd17c18c4443a8bd19d39057bf0)
Merged-In: I6063e3c303320096f7429a3b1d909e107d2ef2a0
Change-Id: I6063e3c303320096f7429a3b1d909e107d2ef2a0
2024-04-22 16:15:13 +00:00
Jagrut Desai
2f8baab403 Customize BubbleTextView for Taskbar Icon Size
Test: Presubmit, manual
Flag: NONE
Bug: 322734668
Change-Id: I50503a45cdf43abed942a846c2517f49124c75e5
(cherry picked from commit 8fbdf51d18)
2024-04-22 16:10:06 +00:00
Sebastián Franco
87fbc2e02e 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ad46eb75f4c239321b1e8f03062dd7599cdc9495)
Merged-In: I63666c29eb91dada4243af019ab0538c40bc0f78
Change-Id: I63666c29eb91dada4243af019ab0538c40bc0f78
2024-04-19 18:27:07 +00:00
Anushree Ganjam
3a3978cb7a Merge "Add FastScrollSectionInfo with "info icon" when work educard exists." into 24D1-dev 2024-04-18 03:28:40 +00:00
Sebastian Franco
6aa4389285 Add testing for GridMigration.
Bug: 325286145
Flag: ACONFIG grid_migration_fix disabled
Test: GridMigrationTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:851b1f3b1c103b28d6df6653693ee132c92086e7)
Merged-In: I49fd32be895f3a05204775373b9eec62d9026f3b
Change-Id: I49fd32be895f3a05204775373b9eec62d9026f3b
2024-04-18 01:17:24 +00:00
Sebastian Franco
0312ec60a3 Refactor migrateGridIfNeeded to pass the grid states and make it easier for unit testing
No-op change

Bug: 325286145
Flag: NA
Test: compiling
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c3ffd41ff0f150ea91ad2a324dd4613b7d0cd89f)
Merged-In: I703c08059b81e20111c17a142dc54335f18a5a87
Change-Id: I703c08059b81e20111c17a142dc54335f18a5a87
2024-04-18 01:17:18 +00:00
fbaron
6fba6cdb85 Make hotseat column span responsive
Flag: NONE
Test: DeviceProfileDumpTest, DeviceProfileAlternativeDumpTest, HomeScreenImageTest
Bug: 325084912
Change-Id: Ifa9e8066662a1ab053f66b8800b739d813d2dab8
(cherry picked from commit e4b0b71faa)
2024-04-17 17:56:58 +00:00
Shamali Patwa
3e239309f1 Merge "Fix issue that old search results list show up momentarily" into 24D1-dev 2024-04-15 20:06:32 +00:00
Anushree Ganjam
6292e32e7f Add FastScrollSectionInfo with "info icon" when work educard exists.
Before: https://b.corp.google.com/issues/325490294#comment1

After: https://b.corp.google.com/issues/325490294#comment5

Bug: 325490294
Test: Manual
Flag: NA
Change-Id: I557971cddd5829f46697004159d62a9343e75f69
(cherry picked from commit 6dadf21a7f)
2024-04-12 20:54:29 +00:00
Jagrut Desai
4fe59a2ce8 Folder Title Change Listener
Bug: 305877212
Test: Manual
Flag: NONE
Change-Id: I10c7e0827a05010720daeb9da7a0be854ee06112
(cherry picked from commit 06a05c3806)
2024-04-12 16:54:56 +00:00
Federico Baron
d7022dc0ac Merge "Page resets when scrolling slowly fix" into 24D1-dev 2024-04-12 04:53:49 +00:00
Jeremy Sim
841e6c1e8e Set camera icon as gray when app is unlaunchable
This CL is a follow-up to ag/26825455. Now that we are changing app pairs' disabled appearance back to icon-only, the case where a camera icon should be grayed out on an app pair on a small screen needs to be reinstated.

Fixes: 333137187
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: I64ae3db28293fa0adc249d700e9e03c074b6854f
(cherry picked from commit a5e838d61c)
Merged-In: I64ae3db28293fa0adc249d700e9e03c074b6854f
2024-04-12 00:13:39 +00:00
fbaron
a7825a70e8 Page resets when scrolling slowly fix
Fix: 324071635
Flag: NONE
Test: Verified manually on RTL and non-RTL
Change-Id: Id778a0a01505d30bca4f216322f3ef3b951e63a7
(cherry picked from commit cae498032f)
2024-04-11 23:47:44 +00:00
Jeremy Sim
af645fe110 Delete app pairs on model load if flag is turned off
This CL adds a case to processFolderOrAppPair() -- if the ENABLE_APP_PAIRS flag is turned off, we do not load app pairs into launcher.

This prevents a case where a user uses backup+restore to migrate an app pair onto an environment where app pairs is disabled.

Fixes: 330412376
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: I4a97e4aadc620f8b727439fcdd70ab0e7a3005a8
(cherry picked from commit 08fc2d434f)
Merged-In: I4a97e4aadc620f8b727439fcdd70ab0e7a3005a8
2024-04-11 23:39:10 +00:00
Jeremy Sim
ee1fdb4abc Fix bug where app pair title was not updating with language
This CL adds the ability for an app pair icon to update its title string when package changes are detected. It also reorganizes some code in the app pairs classes for readability.

Fixes: 316051810
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: I833e4f9766b7da8c0a3a5fb4b9fc050d8897437e
(cherry picked from commit 24284467b5)
Merged-In: I833e4f9766b7da8c0a3a5fb4b9fc050d8897437e
2024-04-11 23:38:41 +00:00
Jeremy Sim
d2f256f179 Fix launch flow when one app in an app pair is paused
This CL changes the error handling logic in ItemClickHandler to continue with app pair launch when only one app in an app pair is paused. It also changes AppPairIconGraphic so that the disabled state of the app pair is drawn modularly (if only one app is paused, only one app will appear visually paused).

Bug: 330795643
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: Ieaf0120cced07b6ac0f3eb07c75b66666a8dcc85
(cherry picked from commit 17db14b107)
Merged-In: Ieaf0120cced07b6ac0f3eb07c75b66666a8dcc85
2024-04-11 21:09:56 +00:00
Jeremy Sim
f49807538b Update app pair icon colors when switching containers
This CL updates the color for the app pair background, and adds a way for an app pair icon to redraw as a different color when switching containers.

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: I615cb95d51f7c4c120ad306246d9491bf4452229
(cherry picked from commit 05617cb11f)
Merged-In: I615cb95d51f7c4c120ad306246d9491bf4452229
2024-04-11 20:59:05 +00:00
Jeremy Sim
9109e43f02 Allow app pairs in folders
This CL substantially refactors folders to be able to take contents of type AppPairInfo. App pairs can now be moved in and out of folders, and launch from folders.

This CL contains only logic and model changes; animation and style changes (for dropping items into folders, color changes to app pair surfaces, etc.) will be in a following CL. Another CL (hopefully) will contain tests. I'm planning to submit them together, but this patch should also be able to stand alone with no issues (except janky transitions).

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, more to follow in another CL.
Change-Id: I73732fcaefbdc61bf6e02a5be365962b8bbc3e41
(cherry picked from commit a596f589c4)
Merged-In: I73732fcaefbdc61bf6e02a5be365962b8bbc3e41
2024-04-11 03:51:53 +00:00
Shamali P
335fdf317c Fix issue that old search results list show up momentarily
After exiting the search, we clear the search results and hide the
results lists (because that recycler view shouldn't be accessible after it). However, it often doesn't get chance to layout the empty data.
So, the next time we show the search results list again with new data,
it first animates to clear the old results and then animates in the new
ones. In this fix,
[demo](http://screencast/cast/NDg5OTg2NzIyMTU1NzI0OHxhMTk0NzEzZS1hYw), we swap the adapter to remove any old views, because old search results aren't valid anymore. Spoke with yigit who worked on RV in past and they suggested swapAdapter
was fine for this.

Other options explored:
1. set item animator = null; so, it doesn't animate flushing out old
results -> but we want animations
2. delay the visibility update to let layout happen -> but, if we are
 hiding the section,  why wait making the other UI updates until
layout?

Bug: 274051332
Flag: N/A
Test: Manual
Change-Id: I9f9c5a67b47b5415b2d9e4caa23fd4b6daf7cdea
(cherry picked from commit 809e1a8efb)
2024-04-10 22:24:21 +00:00
Jeremy Sim
00bf2488d1 Reparent folders and app pairs
Previously, app pairs and folders shared a common data model, FolderInfo. Now we need to separate them, so a new type, CollectionInfo, will serve as the parent of both types.

Bug: 315731527
Fixes: 326664798
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, unit tests to follow
Change-Id: Ia8c429cf6e6a376f2554ae1866549ef0bcab2a22
Merged-In: Ia8c429cf6e6a376f2554ae1866549ef0bcab2a22
2024-04-10 18:44:12 +00:00
Song Chun Fan
ca79c70816 [Launcher/Archive] remove all checks for the archiving system property
No longer needed

Change-Id: I62c8843aa04a245d1dcc30f7787c71d17993f5d1
Merged-In: I62c8843aa04a245d1dcc30f7787c71d17993f5d1
BUG: 331165939
Test: builds
2024-04-09 22:05:26 +00:00
Vinit Nayak
fc7f52967d Merge "On disabled app pairs, set color tint instead of changing alpha" into 24D1-dev 2024-04-09 05:40:02 +00:00
Vinit Nayak
674aa03862 Add CUJ Jank interactions for App Pair saving and launching
* Added finishCallback consumer to LauncherAccessibilityDelegate
to inform when adding an item to workspace was completed.
* The logic seemed to be dependent on the parameter
"focusForAccessibility", but all callers of that are currently
passing in true

Bug: 328646540
Test: https://paste.googleplex.com/6232597136408576
Newly added CUJs showing up when playing w/ device

Change-Id: Ia4944f8d23634bb92296938ea2d07a6babf6f77c
Merged-In: Ia4944f8d23634bb92296938ea2d07a6babf6f77c
2024-04-09 00:17:21 +00:00
Jeremy Sim
00dc98c9e4 On disabled app pairs, set color tint instead of changing alpha
This CL changes the way disabled app pair icons are drawn: instead of setting alpha, it sets a color filter to indicate disabled status. This brings it in line with other apps icons and V's design specs.

Fixes: 326665140
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: Ifc8ac694f321a6b28996ba9a42860dfc419d5901
Merged-In: Ifc8ac694f321a6b28996ba9a42860dfc419d5901
(cherry picked from commit 09fe96b95a)
2024-04-08 23:37:50 +00:00
Winson Chung
95179cffab Fix regression in checking disabled state
- It should only check the disabled state after the icon graphic
  has been set

Fixes: 333017803
Test: Load with an app pair icon on the workspace
Change-Id: Ic313f98e1e31d673d774f050bb418d359b4bd653
Merged-In: I7242e0c525ef578a54a06fb9137fcfc42c6f0e86
2024-04-05 21:54:22 +00:00
Jeremy Sim
fcbef122e6 Refactor how app pair icons draw
This changes (and cleans up) the way app pair icons are composed. Previously, the background and 2 icons were drawn individually and separately onto the canvas. Now, they are composed into a combined drawable first. This also allows the full icon drawable to be requested by external functions (which will be needed for display app pairs in folder previews).

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Visually confirmed that app pairs loooks the same in all scenarios: rotation, disabled, themed, taskbar, pinned taskbar. Screenshot test to follow.
Change-Id: I7242e0c525ef578a54a06fb9137fcfc42c6f0e86
(cherry picked from commit b37faec287)
Merged-In: I7242e0c525ef578a54a06fb9137fcfc42c6f0e86
2024-04-02 23:38:47 +00:00
Brandon Dayauon
50f9dbd0a5 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
Merged-In: Idef427bad6551ae56b13e35393e076b8e000af5a
Change-Id: Idef427bad6551ae56b13e35393e076b8e000af5a
2024-03-27 17:07:04 +00:00
Sihua Ma
f0518bb89f 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
(cherry picked from commit f418b2e16d)
2024-03-20 16:58:00 +00:00
Rohit Goyal
f8302c388f Bugfix: In case of unarchival, do not add an installer task to add workspace item.
* In case install queue is cleared (which happens when launcher comes back to foregorund from background) when app has successfully unarchived, since app is not archived anymore, `AddWorkspaceItemTask` successfully manages to add item to the workspace.
* We should avoid adding pending task for adding workspace item in the queue at all for unarchival to prevent this.

Test: verified bugfixes locally.
Bug: 326495267
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: Iae6d6390d8e2d9b270f7aef0dce1fa32d9899f28
2024-03-20 11:12:38 +00:00
fbaron
fe3f542e61 Remove logspam for resolved bug
b/318394698 was fixed so we can now remove these logs.

Fix: 321837497
Test: N/A
Flag: NONE
Change-Id: Ifc8b18238778f6aa2c0ad1be5df627c07cbaf1d8
(cherry picked from commit 7e5d855886)
2024-03-18 16:48:18 +00:00
Rohit Goyal
f51bd26b3d Merge "Bugfixes: Handle session failure unarchival cases so that icon and title are accurate." into 24D1-dev 2024-03-18 13:45:51 +00:00
fbaron
b41c826c6a Fix bug where folder with 1 icon can exist
Fix: 329357132
Flag: NONE
Test: TaplDragTest
Change-Id: If381ff56e051c89e9f6162f8a44f8df9e2ae5060
(cherry picked from commit 5645c3ec55)
2024-03-15 16:11:26 +00:00
Rohit Goyal
86a1b1abf5 Bugfixes: Handle session failure unarchival cases so that icon and title are accurate.
* Remove old package icon entry from IconCache in case of a session failure.
* Allow package entry to fallback to fallback state where missing icon & titles are filled using PackageManager.
* Re-bind archived application in all apps if an unarchival fails.

Test: verified bugfixes locally.
Bug: 326494527
Bug: 328314141
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Merged-In: Ib132bece397001e9a14933c2f6d733a04a089ef9
Change-Id: Ib132bece397001e9a14933c2f6d733a04a089ef9
2024-03-15 12:14:43 +00:00
Anushree Ganjam
f774a101b6 Merge "Enable Omnient master flags in client code." into 24D1-dev 2024-03-15 06:09:00 +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
Anushree Ganjam
023157f330 Enable Omnient master flags in client code.
Bug: 327638681
Test: Manual
Flag: legacy ENABLE_LONG_PRESS_NAV_HANDLE ENABLED
Change-Id: Id8990ed145b4f035e5cd14e901676ebbd03733dd
2024-03-13 06:47:22 +00: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
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
Rohit Goyal
877da31569 Bugfix: Remove widgets and deep shortcuts of app which gets archived.
* Once app is archived, remove widgets and deep shortcuts corresponding to the app from the home screen.
* However during backup & restore, widgets should not be removed if they are being restored.

Test: verified bugfix locally.
Bug: 326567866
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bef2930f5a29655f6c403f2d5eefd4e99a733b04)
Merged-In: Ib3a112aadc7bd901fd6a0ba86f472ec6acf8d626
Change-Id: Ib3a112aadc7bd901fd6a0ba86f472ec6acf8d626
2024-03-06 14:48:09 +00:00
Priyanka Advani
2ade8f2050 Merge "Revert "Remove cyclical dependency from LauncherPrefs."" into main 2024-03-04 18:52:18 +00:00
Priyanka Advani
3e64dabb46 Revert "Remove cyclical dependency from LauncherPrefs."
This reverts commit 526f8a0099.

Reason for revert: culprit for b/328063858. Will be running through ABTD for verification and before submitting the revert.

Change-Id: Ie439b2d661617f10bbc31afada187a313dd52af7
2024-03-04 18:07:59 +00:00
Stefan Andonian
544e4d510b Merge "Remove cyclical dependency from LauncherPrefs." into main 2024-03-04 15:45:06 +00:00
PODISHETTY KUMAR
b588e4618b Merge "Revert "Implements the "Save App Pair" button in Overview Actions"" into main 2024-03-01 09:27:08 +00:00