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
* 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
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
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
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
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
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
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
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
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
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
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
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)
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
* 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
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)
- 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
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
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
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)
* 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
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)
* 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
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)
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
* 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
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