Commit Graph

17828 Commits

Author SHA1 Message Date
Willie Koomson
fda1b4b0d0 Merge "Use generated RemoteViews preview for widget picker if available" into main 2024-02-13 21:18:45 +00:00
Jakob Schneider
38e4471794 Merge "Version-2: Prioritize the session-provided icon & label for archived apps during unarchival in the iconCache." into main 2024-02-13 19:09:52 +00:00
Willie Koomson
fedc18e9a8 Use generated RemoteViews preview for widget picker if available
WidgetCell will use the generated RemoteViews preview to display
previews in the widget picker. It will fallback to current preview
methods if not available.

Introduces WidgetManagerHelper.loadGeneratedPreviews as a utility
function. WidgetManagerHelper is passed into the constructor of
WidgetItem to avoid calling
context.getSystemService(AppWidgetManager.class) for each widget.

Bug: 308041327
Test: atest Launcher3Tests:GeneratedPreviewTest
Flag: ACONFIG com.android.launcher3.enable_generated_previews DEVELOPMENT
Change-Id: I37429057cda83a5321884ace2537038e050b9a58
2024-02-13 18:49:44 +00:00
Charlie Anderson
e5b1215a2a Merge "Add additional unit tests for WorkspaceItemProcessor to cover shortcuts and folders. Also cleanup the test suite." into main 2024-02-13 16:51:45 +00:00
Charlie Anderson
887f49e231 Add additional unit tests for WorkspaceItemProcessor to cover shortcuts and folders. Also cleanup the test suite.
Bug: 294386159
Test: unit tests and presubmit
Flag: N/A

Change-Id: I33370f2a060d1e07fc7dbd37cc9a883501344551
2024-02-13 10:05:32 -05:00
Alex Chau
fba34d89e4 Merge "In bindAllApplications, only switch to NORMAL while in ALL_APPS" into main 2024-02-13 11:37:50 +00:00
Shamali Patwa
028482609c Merge "Set accessibility pane title for right pane on updating content." into main 2024-02-13 00:33:11 +00:00
fbaron
88b89d68fb Restore state of widget picker on fold/unfold
Specifically:
-keep selected tab (personal/work)
-keep search results

Fix: 323406345
Test: WidgetPickerImageTest
Flag: ACONFIG com.android.launcher3.enable_unfolded_two_pane_picker TRUNKFOOD
Change-Id: I919e59484f3af7a2b3b007f5c234055a0f7276b3
2024-02-12 21:13:46 +00:00
Shamali P
13c6727601 Set accessibility pane title for right pane on updating content.
This will let users know that content appeared on right when they
selected an option on left.

Note: This is announced _only_ when content changes.

Bug: 324073588
Test: Manual with talkback
Flag: N/A
Change-Id: Icec3242d8f250f6d19e082a39927165c7b8fc86a
2024-02-12 19:48:41 +00:00
Alex Chau
61d193821e In bindAllApplications, only switch to NORMAL while in ALL_APPS
- Otherwise, it can unexpectedly switch to NORMAL during a swipe up to Overview, causing issues with live tiles

Fix: 288557298
Test: Go to settings, change display size, immediately swipe up to Overview
Flag: None
Change-Id: I1eaf988d488c6662fd291f46a7cc0861664d8d38
2024-02-12 17:37:18 +00:00
Alex Chau
8cb873d8fb Merge "Use bigger task size in app to overview carousel" into main 2024-02-12 16:17:30 +00:00
Alex Chau
beb3053f3b Use bigger task size in app to overview carousel
- Introduced carouselTaskSize that represent size of TaskView in app to overview carousel, that is bigger than size of TaskView in Overview state
- Use nonGridScale and translation to scale TaskView to the desired carousel size
- For current task, inroduced carouselScale and translation to apply similar transformation at the carousel. They will be reset in `onPrepareGestureEndAnimation` after gesture is released and form the grid. Carousel translation can be invalidated and aniamte to 0.
- Fixed current task left/right wiggle that is caused by task shrinks and translate in different direction. Pivot is now moved to top right (or top left for RTL), to align with movement of current task.
- To compensate for the pivot change, current task is translated back to the carousel position by taskTranslation, and again translated by carouselTranslation for carousel -> fullScreen scaling. A complex interpolator is introduced to make current task moves in a vertical straight line rather than a curve.
- Fixed a bug in AnimatorControllerWithResistance when scaleStartResist==scaleMaxResist that causes division by 0. For grid overview, resistance kicks in after reaching carousel size, and current task size won't reduce further
- Added PendingAnimation#addAnimatedFloat that uses animator provided by AnimatedFloat, so the animator can be canceled and reaniamte from AnimatedFloat side; AnimatedFloat now clears the property values during cancel so the canceled animator still referenced by PendingAnimation can no longer change the values

Fix: 318352235
Fix: 308643507
Flag: ACONFIG com.android.launcher3.enable_grid_only_overview TEAMFOOD
Test: presubmit
Change-Id: I2872d8b2204798fe5e05c10d08480a81e60bb498
2024-02-12 12:06:05 +00:00
Fengjiang Li
90ebc96e34 Merge "Override Launcher's window bottom inset to 0 on large screen (tablet + unfolded phone) if all display cutouts are at bottom left/right corners" into main 2024-02-11 08:48:58 +00:00
Fengjiang Li
1707575da3 Override Launcher's window bottom inset to 0 on large screen (tablet + unfolded phone) if all display cutouts are at bottom left/right corners
Bug: 321917681
Flag: NONE
Test: manual
Change-Id: I3c41d42e11413c73146c7ef59fc712971e96db19
2024-02-11 04:05:55 +00:00
Sebastián Franco
dbd214225d Merge "Removing the Hotseat from the dragNdrop accessibility targets if the dragObject is a widget" into main 2024-02-09 21:25:20 +00:00
Sebastian Franco
01a134349f Removing the Hotseat from the dragNdrop accessibility targets if the dragObject is a widget
Fix: 319036474
Test: manual
Flag: NA
Change-Id: I7404c02f8ef3c0eee41694729b4d174bcea7c7d4
2024-02-09 10:40:15 -08:00
Piyush Mehrotra
7b2d84c2df Merge "Fix widget restore for pre-archived apps" into main 2024-02-09 18:23:02 +00:00
Jakob Schneider
4f5b60169d Version-2: Prioritize the session-provided icon & label for archived apps during unarchival in the iconCache.
* Also ensures that apps are sorted based on their actual name, so that
  they don't jump around when "Pending.." switches to "Downloading.."
* In case of faillure during unarchival, icons shown are reverted to that of PM supplied ones.

New UI: http://recall/-/gMbThhDGagWFqnJTbQCqSz/fPuzxUuU7cGXCNdygMkXAB

Test: atest CacheDataUpdatedTaskTest.java and locally verified.
Bug: 319495216
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving TRUNKFOOD
Change-Id: I6410482706af900e273fdc6f7cf0b0692442364c
2024-02-09 13:55:41 +00:00
Uwais Ashraf
c2f73d9091 Merge "App chip refactor" into main 2024-02-09 13:43:03 +00:00
Uwais Ashraf
99fdf7a75e App chip refactor
- Adds background outline replacing 2 circles + rect approach. This
enables easier shadow drawing code.
- Simplify structure of AppChipView.
- Adds an anchor View to simplify laying out of menu around app chip

Bug: 313644427
Bug: 317007147
Fix: 322760765
Flag: ACONFIG com.android.launcher3.enable_grid_only_overview TEAMFOOD
Flag: ACONFIG com.android.launcher3.enable_overview_icon_menu TEAMFOOD
Test: OverviewImageTest
Change-Id: I56c2644779863c083ae475a740a84321b1d0c396
2024-02-09 12:09:42 +00:00
Federico Baron
1bb90a78f6 Merge "Fix two pane widget picker bugs" into main 2024-02-08 16:58:40 +00:00
Piyush Mehrotra
b2decf8046 Fix widget restore for pre-archived apps
Widgets which were expected to be restored, were missing for apps which were pre-archived.
The fix adds checks for archived apps when processing widgets and ensures that icon with cloud overlay is present on the widget.

Test: Flashed device with build containing this fix.
    Screenshot right after SuW- http://shortn/_LoLudMXEaT
Bug: 321297173
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: Ic5fd6b5b2a12f7b2b053ee4ec7c5c7330f0d07e1
2024-02-08 15:50:13 +00:00
Shamali Patwa
e2849a0de0 Merge "Remove the "expand/collapse" actions on the apps list in 2 pane picker." into main 2024-02-07 22:53:34 +00:00
fbaron
88676ba7bb Fix two pane widget picker bugs
Here we:
-Move no widgets text outside of the right pane so that we can center it
-setInset and change the clipping of children in the views so that we can fix the padding at the bottom when we have 3 button nav
-create selectedHeader where we keep track of the currently selected header in order to refresh the widgets for the selected header on rotation
-when widgets are bound we check if there are no recommended widgets, and if there aren't we select the first visible header

Fix: 324002996
Fix: 324001940
Fix: 323417968
Fix: 323460545
Fix: 323409306
Test: WidgetPickerImageTest
Flag: NONE
Change-Id: Ibd85cb086bb6c2aede6cf79da0c688a1fdaec4e5
2024-02-07 22:36:59 +00:00
Himanshu Gupta
ebc985850d Merge "Refreshin App Market Intent on Plus Icon Click" into main 2024-02-07 20:44:26 +00:00
Anushree Ganjam
faa35a81bb Merge "Add Unit tests for System Shortcut." into main 2024-02-07 19:38:32 +00:00
Helen Cheuk
422b9739e4 Merge "Draw focus outline in search app result" into main 2024-02-07 17:19:05 +00:00
Federico Baron
789ab23ce1 Merge "Align workspace and hotseat icons in landscape" into main 2024-02-07 16:16:16 +00:00
helencheuk
bbd54b3e32 Draw focus outline in search app result
Before:
https://screenshot.googleplex.com/9qoPoBNZkDY94gy
https://screenshot.googleplex.com/7XVFxwj8d6UqLUs
https://screenshot.googleplex.com/4KtQcma26eSdBnb

After:
https://screenshot.googleplex.com/BxfNAJGqXhyGBbJ
https://screenshot.googleplex.com/8EMKUQW4ubXHdDd
https://screenshot.googleplex.com/32KBfdj4preL8H6

Bug: 319454774
Test: Manual, open all apps, type some word and press enter to search. Navigate to the search result below and outline should appear
Test: will add screenshot test in b/318360469
Flag: ACONFIG com.android.launcher3.enable_focus_outline Development
Change-Id: I8caef8dd9e590d43e05baa78cebee73d21b84acf
2024-02-07 15:07:43 +00:00
Vinit Nayak
44911450c6 Merge "Update test infra to allow split placeholder view in all apps" into main 2024-02-07 14:57:19 +00:00
Himanshu Gupta
19f7a8a5ed Refreshin App Market Intent on Plus Icon Click
Currently the App Market intent is loaded statically into
Launcher, once during start. Sometimes, this causes the app
market activity start to be blocked, resulting in no action
from button tap.

To fix this, we hot-reload the intent when the plus button is
clicked.

Bug: 323189130
Test: Launcher3 test.
Flag: ACONFIG com.android.launcher3.Flags.enable_private_space TRUNKFOOD
Change-Id: I563d29838a43644ba8e0830b39d4f4ef8c60aeb6
2024-02-07 09:26:37 +00:00
Vinit Nayak
fad0709510 Update test infra to allow split placeholder view in all apps
* Previously we assume the split placeholder view shouldn't be
present in any states except launcher split selection, however
with contextual that changes.
* Now we only ensure that view isn't there in all apps when
we are not in split selection.

Test: Test runs and passes locally
Fixes: 323418145
Change-Id: Ida92030f9b139532ebb09c1d2646795bbb940bfc
2024-02-07 03:32:02 +00:00
Fengjiang Li
7f827e1527 Merge "[Predictive Back] Replace legacy flag with aconfig flag in launcher" into main 2024-02-06 21:57:34 +00:00
Shamali Patwa
efebbb21fe Merge "Update prediction task to provide categorized suggestions." into main 2024-02-06 21:36:14 +00:00
Sunny Goyal
d1176bccf9 Merge "Using system API for rotating DisplayCutout instead of rotating it ourselves" into main 2024-02-06 20:20:47 +00:00
Shamali P
55fded376b Remove the "expand/collapse" actions on the apps list in 2 pane picker.
In a single pane picker, apps list is expandable / collapsable, but,
its not applicable for 2-pane variant. in 2-pane one, it should just
say "double tap to activate".

Also opened b/324073588 to make it clear from a11y perspective that it
is two pane and on click, right pane change should be announced.
(just like it does in settings with talkback).

see screencast/cast/NTQ1Mjk0MjIzOTg1ODY4OHw4OTc5ZjAzNS0wOQ

Bug: 319195592
Flag: None
Test: WidgetsListHeaderAccessibilityTest & manual.
Change-Id: I9ae3fbacc29364bd7459f6e6d85e0a1e919de3f8
2024-02-06 20:07:41 +00:00
Priyanka Advani
26b2e4810e Merge "Revert "Fix widget restore for pre-archived apps"" into main 2024-02-06 19:11:06 +00:00
Priyanka Advani
eace95ab94 Revert "Fix widget restore for pre-archived apps"
Revert submission 26049200-widget-restore-fix

Reason for revert: Build breakage in b/324091151

Reverted changes: /q/submissionid:26049200-widget-restore-fix

Change-Id: I8a43650ba3f4590f49f038691d34238231f0747c
2024-02-06 19:00:55 +00:00
Piyush Mehrotra
2e094493c2 Merge "Fix widget restore for pre-archived apps" into main 2024-02-06 18:36:26 +00:00
Sunny Goyal
a90500d233 Using system API for rotating DisplayCutout instead of rotating it ourselves
Bug: 321913010
Flag: NONE
Test: Manual
Change-Id: Iebbc8c17dc3b92a73866b7e22dfbde18eb3a52ff
2024-02-06 10:26:18 -08:00
Shamali P
57c1eedbc6 Update prediction task to provide categorized suggestions.
Also adds a helper in popup data provider to provide categorized
suggestions. Used in follow up CL to update the UI.

Bug: 318410881
Test: WidgetsPredictionUpdateTaskTest and manual with follow up changes
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Change-Id: Ie80e8ba7bbe874f7c4b0e579446edf571036555e
2024-02-06 18:14:49 +00:00
Federico Baron
a5d7ae6c84 Merge "Fix pagination animation when removing a page" into main 2024-02-06 17:52:14 +00:00
Jakob Schneider
328c32235e Add the archiving sysprop check to launcher3.
This system property will be used to test the feature
in DVT. This is required because the new device is built on U QPR3, not V. See
https://docs.google.com/document/d/1h8sLlnnhwGP4uZssglBqTShMoQcEq5dvR7jsJmmp0Cw/edit?resourcekey=0-KTFHkPKTdtMN-5kQYBWJig&tab=t.0#heading=h.x9snb54sjlu9  for more details.

Test: tested manually
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving TEAMFOOD

Change-Id: Ie64a40ba799c81057258dd7de3872a0494cff2d8
2024-02-06 14:29:07 +00:00
Jakob Schneider
02d93b8463 Merge "Refactor API syntax based on API council feedback. This is a noop." into main 2024-02-06 12:44:55 +00:00
Himanshu Gupta
b3e03b5461 Merge "Making PS container tappable when locked." into main 2024-02-06 08:01:42 +00:00
Jeremy Sim
0c94fbc66f Merge "Snap to saved app pair" into main 2024-02-06 02:54:15 +00:00
Fengjiang Li
cd60d191a8 [Predictive Back] Replace legacy flag with aconfig flag in launcher
Fix: 323971106
Flag: ACONFIG launcher.enable_predictive_back_gesture DISABLED
Test: manual
Change-Id: Ie8051af2540699a7d75f1ed05132584d0b40d17d
2024-02-05 16:41:29 -08:00
Anushree Ganjam
9858a3e0f4 Add Unit tests for System Shortcut.
Update SystemShortcut<T extends ActivityContext> and remove dependency on Launcher so we can write unit tests.

Introduce TestSandboxModelContextWrapper , wrapper around SandboxModelContext and ActivityContext.

Use SandboxModelContext for testing since we need UserCache, AllAppsContainerView, AllAppsStore to be spied and verified for function calls.

StatsLogManager is not verified in this cl, We can do as follow up.

Bug: 319250810
Test: Manual.
Flag: aconfig com.android.launcher3.enable_private_space TEAMFOOD

Change-Id: If767128a502e40d2016a331db4a342f20f24c588
2024-02-05 10:59:52 -08:00
Piyush Mehrotra
b41d0634af Fix widget restore for pre-archived apps
Widgets which were expected to be restored, were missing for apps which were pre-archived.
The fix adds checks for archived apps when processing widgets and ensures that icon with cloud overlay is present on the widget.

Test: Flashed device with build containing this fix.
    Screenshot right after SuW- http://shortn/_LoLudMXEaT
Bug: 321297173
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: I32bc51ead2870670efc8eba24f17896aedcc3b9f
2024-02-05 15:53:19 +00:00
Cliff Wang
dd2222749b Merge "Revert "Make sure TAPL waits for Launcher activity to stop each time it stops"" into main 2024-02-05 08:21:54 +00:00