Commit Graph

15042 Commits

Author SHA1 Message Date
Federico Baron
cb36de9e9f Fix bug where very large widgets get cropped out
Fix: 268715418
Test: Open widget picker on tablet and verify that very large widgets (eg Youtube music recently played) are not cropped on tablets
Change-Id: I0f4609c8b7af889f39cac304ad4f6a44039f5762
2023-03-22 21:24:14 +00:00
Sebastián Franco
d1cab0e379 Merge "Stop DeleteDropTarget from setting the containerId of items to NO_ID" into tm-qpr-dev 2023-03-22 20:06:03 +00:00
Tony Wickham
f93aa98e3a Merge "Set PredictedAppIcon ring disabled when icon is disabled" into tm-qpr-dev 2023-03-22 18:46:56 +00:00
Stefan Andonian
acaecb6511 Merge "Stop enabling the Boot Aware Launcher prefs code during Tests after running LauncherPref unit tests." into tm-qpr-dev 2023-03-22 17:17:57 +00:00
Tony Wickham
1e29b04f19 Set PredictedAppIcon ring disabled when icon is disabled
Test: drag a predicted app from taskbar, ensure both ring and icon are
set to grayscale
Fixes: 268759548

Change-Id: I764ebcd486c09eceaf30c5bd5153a1dd2ff5be72
2023-03-22 16:53:10 +00:00
Jeremy Sim
3c8def9f88 Merge "Fix bug where Taskbar was not auto-hiding after splitscreen launch from icon menu" into tm-qpr-dev 2023-03-21 23:34:34 +00:00
Jeremy Sim
8eed87ac89 Fix bug where Taskbar was not auto-hiding after splitscreen launch from icon menu
This patch fixes a bug where the transient Taskbar was not hiding properly after splitscreen was initiated. When the user is inside an app and launches splitscreen by longpressing on a Taskbar icon and selecting the split button, the transient Taskbar should hide right away. This is an equivalent action to dragging the Taskbar icon up to create a split, and should hide the Taskbar so that other UI elements (like system-level toasts and error messages) can be seen.

The bug occurred because updateAndAnimateTransientTaskbar() is not being called in this specific code path to stash the Taskbar.

Fixed by adding a new call to updateAndAnimateTransientTaskbar upon clicking the splitscreen menu button.

Fixes: 272292897
Test: Manual
Change-Id: I64a9acfc41ddcaba4d9f43eb216458de44b4c9a4
2023-03-21 14:35:36 -07:00
Pinyao Ting
a35d04afef Merge "Retains cached widget in launcher process" into tm-qpr-dev 2023-03-21 20:15:41 +00:00
Pinyao Ting
bd638e7b41 Retains cached widget in launcher process
Currently cached widget are retained in LauncherWidgetHolder which is
released when Launcher activity is recreated. This CL moves the cached
widget into LauncherAppState to keep the cache alive.

Bug: 268189435
Test: steps below
1. Add multiple widgets (Calendar / Weather ... e.t.c) to Home Screen
2. Open Google Map, start navigation to any place
3. Google Map enters navigation mode and changes resolution
4. Swipe up to exit Google Map and go to Home Screen
5. Verify you don't see deferred widget host view.

Change-Id: I8b56167313780cd1be2a5da88517114acc6d44af
2023-03-21 11:04:31 -07:00
Tony Wickham
0165aa82c6 Merge "Update folder leave-behind color for taskbar" into tm-qpr-dev 2023-03-21 16:38:46 +00:00
Jon Miranda
149246f077 Merge "Add a way to fade out taskbar view when closing an app in the taskbar." into tm-qpr-dev 2023-03-21 13:01:30 +00:00
Sebastian Franco
b0b6a212b8 Stop DeleteDropTarget from setting the containerId of items to NO_ID
When deleting items, the items wont get removed form the database right away to give time for the user to undo the operation if needed.

When rotating the screen the items get loaded again, even those items marked for deletion who hasn't been deleted yet, and because they have the container to NO_ID it cause Launcher to crash.

There is no need to set the containerId to NO_ID because the trigger to finally remove the items gets called when the toast to undo disappears and rotating the screen triggers the toast to disapear. It might be posible for the item to flash in the workspace if it gets render before deleting after rotation but it's so fast that I haven't seen that issue.

Fix: 262199032
Test: Manuall test: remove item from hotseat, rotate device before toast with undo button disapears.
Change-Id: Ia8726941dc81078b49b32565daa32fadf3ae45ba
2023-03-20 22:08:04 +00:00
Stefan Andonian
956b88e561 Stop enabling the Boot Aware Launcher prefs code during Tests after
running LauncherPref unit tests.

There is something in the LauncherPrefs code that interacts with the
boot aware shared preference data that is not compatible with the
Widgets.Reorder tests. A todo has been added to fix that before
releasing that feature. For now, implementing a simple fix to stop
enabling this feature for while doing post submit testing.

Bug: 271434610
Test: Used go/abdt to verify that this CL fixes the post submit tests.
They no longer fail like they did before this was pushed.

Change-Id: Id6bd94f5d0e0ee9afc2ccea3a4808cf723a4e688
2023-03-20 20:59:50 +00:00
Jon Miranda
fad8c1c449 Merge "Tune springs when app animates home into the hotseat on devices with a taskbar." into tm-qpr-dev 2023-03-20 20:54:27 +00:00
Sunny Goyal
d2a34a2d54 Merge "Scale folder if it doesn't fit the screen" into tm-qpr-dev 2023-03-20 20:01:52 +00:00
Jon Miranda
c0c1c55c5d Add a way to fade out taskbar view when closing an app in the taskbar.
Prior to this change, if taskbar is showing and we are cloing an app
that is visible in the taskbar, the taskbar view would immediately
disappear.

Now we will fade out the view until the animation is 33% complete,
at which point the 'space' will be clear for the FloatingIconView
to settle at its final location.

Bug: 273961611
Test: open app in hotseat
      note that the taskbar view is gone immediately
      have taskbar visible, close app that is shown in taskbar
      note that the taskbar view fades out

Change-Id: I5589e2ce3033cfa19669d1bfaf568aef2a96015e
2023-03-20 18:21:42 +00:00
Jon Miranda
18c53ac26b Tune springs when app animates home into the hotseat on devices
with a taskbar.

Thought about using the Builder pattern here but the CL becomes
much larger due to SwipePipToHomeAnimator having its own
Builder.

Bug: 268026344
Test: swipe up to close app thats in hotseat
      swipe back to close app thats in hotseat

Change-Id: Idd0729224374579753fc91c7820f3b04a7d3e1a4
2023-03-20 10:56:43 -07:00
Jon Miranda
ad94440c5f Merge "Keep foreground drawable centered during app open/close animation." into tm-qpr-dev 2023-03-20 16:14:43 +00:00
Jon Miranda
f23e2d1e16 Keep foreground drawable centered during app open/close animation.
For apps that use AdaptiveIcon, we used to animate the foreground
drawable independently from the background. This is sometimes
perceived as jank so we remove the animation since it is very subtle
in the best case scenario.

Bug: 268026344
Test: open/close apps/folders that use AdaptiveIcons
Change-Id: I500bf56e04823757d511d909a93d3b30703249a1
2023-03-20 16:13:02 +00:00
Thales Lima
7eee74b3f8 Scale folder if it doesn't fit the screen
Scale folder attrs if a full folder doesn't fit the screen width. This will make icons and text smaller than the workspace.

As a follow-up, another bug will be created to only scale full folders instead of all folders.

Bug: 271554689
Test: manually create a full folder, change the display size to large+
Change-Id: I47dc4bd4fe0c9eae989095fc1d179b81d350ef77
2023-03-17 14:13:04 -03:00
Mike Schneider
8daf6d804e Merge "Add optional debug logging to on flag changes" into tm-qpr-dev 2023-03-17 07:54:33 +00:00
Charlie Anderson
d4eed6ec90 Merge "Fixes tests and issues when toggling new app shortcut popup flag." into tm-qpr-dev 2023-03-17 00:15:54 +00:00
Brandon Dayauon
26958a0961 Merge "Set textSize and compound drawable padding for mDisplay == DISPLAY_SEARCH_RESULT" into tm-qpr-dev 2023-03-16 22:52:47 +00:00
Tony Wickham
ec6fd6ffb5 Update folder leave-behind color for taskbar
Test: open folder in light theme and dark theme
Fixes: 265828742
Change-Id: Ib544ab85dad16c203917ae02f924650e8a5bbc6f
2023-03-16 18:13:20 +00:00
Charlie Anderson
3a2a69ab3d Fixes tests and issues when toggling new app shortcut popup flag.
Bug: 247880037
Test: manually tested app popup. Also ran Launcher tests locally with U flag on/off.
Change-Id: I93c04f9715d583376c36d823c23353619afd26b6
2023-03-16 12:37:14 -04:00
Helen Cheuk
f70036a136 Merge "Resize text in drop target button if the text displayed is truncated vertically" into tm-qpr-dev 2023-03-16 00:08:32 +00:00
Charlie Anderson
da4e07812a Merge "polish for the app shortcut popup, fixing padding on several elements." into tm-qpr-dev 2023-03-15 21:18:53 +00:00
Helen Cheuk
1a55cde8c3 Resize text in drop target button if the text displayed is truncated vertically
“Don’t suggest app” text is cut off at the bottom in tablet when it is set to have largest font and display size before this fix. This change is to check if the text is displayed completely with available height. If not, decrease the text size until it does

Fix: 264732627
Test: manual
Change-Id: I8331a40f2cd767a7b2807c15d9772566baf9f355
2023-03-15 14:03:45 +00:00
Mike Schneider
a79d460736 Add optional debug logging to on flag changes
FlagDebugUtils.formatFlagChange() utility to always write the set of
updated flags, with a list of actual changes applied. Examples:

[allow_gesture|device_dozing] +[device_dozing]
[] -[state_started]

Additionally, moved the appendFlag utility to the new FlagDebugUtils

Test: manually verifed the output in logcat
Bug: 261418621
Change-Id: Ie4f2cfcd4b34f0a816db7845e1df4331babed07a
2023-03-15 13:36:18 +01:00
Vinit Nayak
51a864893b Merge "Add debug logs for WorkTabExists test" into tm-qpr-dev 2023-03-14 22:46:07 +00:00
Brandon Dayauon
b1957cd6fb Set textSize and compound drawable padding for mDisplay == DISPLAY_SEARCH_RESULT
This is so it matches closely to all apps icons but the difference is that the icon size is 48dp.

bug: 261047689
test: manual - https://screenshot.googleplex.com/83YwnfwSfR6CJRB and https://screenshot.googleplex.com/68Yqz9hk5NHETKK
Change-Id: I381d9415d2a80a9d36291828a1a31d0c83fc395e
2023-03-14 13:27:30 -07:00
Brandon Dayauon
50eef33f20 Merge "Shortcut/people icon horizontal layout polish" into tm-qpr-dev 2023-03-14 20:18:54 +00:00
Brandon Dayauon
2b3343018e Shortcut/people icon horizontal layout polish
- allow two line for SearchResultShortcutIcons (also be used in search_result_icon_container)

bug: 261047689
test: manual - https://screenshot.googleplex.com/9wwjxp3nqf4iyJr
Change-Id: Ie8d1415ea94f843f32abb9e4416064c1b674be6d
2023-03-14 11:03:18 -07:00
Brian Isganitis
201a8f5ea3 Merge "Log when FLAG_STASHED_IN_APP_AUTO changes." into tm-qpr-dev 2023-03-14 17:16:43 +00:00
Charlie Anderson
63be5b53db polish for the app shortcut popup, fixing padding on several elements.
Bug: 269343928
Test: manually verify against spec
Change-Id: Ib8dd7ab2778644e2220622d43f9774c1de6357e9
2023-03-14 11:33:38 -04:00
Vinit Nayak
7a68378fe4 Add debug logs for WorkTabExists test
Bug: 243688989
Change-Id: Iafec4cae86f1527acac9a25fceb501609ca308f6
2023-03-13 14:27:55 -07:00
Stefan Andonian
df57fd822c Merge "Allow Binding the First Workspace Page before the Rest." into tm-qpr-dev 2023-03-13 20:54:03 +00:00
Thales Lima
887c0ae68b Merge "Fix TaskView cropping for transient taskbar" into tm-qpr-dev 2023-03-13 13:27:37 +00:00
Charlie Anderson
b8827be992 Merge "Prevents an extra Widget shortcut from showing when popup receives update." into tm-qpr-dev 2023-03-10 23:23:04 +00:00
Fengjiang Li
47c03be9fc Merge "[Predictive Back] Fix bug where closing task bar's all apps will show scale animation even if predicitve back is disabled" into tm-qpr-dev 2023-03-10 21:27:40 +00:00
Sebastián Franco
4122868216 Merge "Making sure there is a propper Chrome icon for the test to long press" into tm-qpr-dev 2023-03-10 19:19:42 +00:00
Fengjiang Li
20a343e740 Merge "[Predictive Back] Fix small bottom gap in widget to home animation" into tm-qpr-dev 2023-03-10 17:34:24 +00:00
Brandon Dayauon
5ddc6ab4da Merge "Support two line text in AllApps/OnDeviceSearch w/ feature flag" into tm-qpr-dev 2023-03-10 17:21:37 +00:00
Fengjiang Li
37305d49fa [Predictive Back] Fix bug where closing task bar's all apps will show scale animation even if predicitve back is disabled
TaskbarAllAppsSlideInView.onBackInvoked() can be triggered by ViewGroup.dispatchKeyEvent(event) with KEYCODE_BACK, in that case we should skip scale animation

Test: manual
Fix: b/272317866
Change-Id: I19468cfe4765de5276c479b0f7fa88ec0690bbfd
2023-03-10 08:54:55 -08:00
Charlie Anderson
5cb9961c28 Prevents an extra Widget shortcut from showing when popup receives update.
Bug: 247880037
Test: Tested manually on phone
Change-Id: I8e9827ac0bfac6161f8b81629a697d053970195b
2023-03-10 11:26:01 -05:00
Federico Baron
0c77edb8cc Merge "Fix bug where homescreen shows installation completed when it's technically still downloading and fix animation that repeats in apps with quick install" into tm-qpr-dev 2023-03-10 06:21:17 +00:00
Brandon Dayauon
cf88ea1e62 Support two line text in AllApps/OnDeviceSearch w/ feature flag
Made separate feature flag for on device search
Add unit test to test twoLine string
- Unit tests for testing newStringThatShouldSupportTwoLineText() in BubbleTextView.java. This class tests a couple of strings
and uses the getLineCount() to determine if the test passes. Verifying with getLineCount() is sufficient since BubbleTextView can only be in one line or two lines,
and this is enough to ensure whether the string should be specifically wrapped onto the second line and to ensure truncation.

bug: 201388851
test: presubmit, ran locally on big and small device, before: https://screenshot.googleplex.com/3Q6pwveFDZqxDXL (ORIGINAL TWO LINE TEXT)
after:  https://screenshot.googleplex.com/7pkwUto6HGzMYoT

Change-Id: I93e6ed179e1081d5cdffc6db9c7ae34de8021c24
2023-03-09 15:13:04 -08:00
Sihua Ma
713931ec38 Merge "Use app widget host instead of holder to get rid of deleteHost" into tm-qpr-dev 2023-03-09 23:06:55 +00:00
Sebastian Franco
239ae0a995 Making sure there is a propper Chrome icon for the test to long press
In some cases, the test was long pressing on a recommendation for
google chrome and not a regular chrome icon and the events didn't
match. I don't think is good to relly on chrome getting recommended
so I'm making sure there is always a chrome app icon on the hotseat

Fix: 269163620
Test: atest TaplTestsLauncher3:testWorkspace (run on pixel 7 pro)
Change-Id: Ic8ee744a9af18d60de9bbedd42043f5abbbd7356
2023-03-09 14:59:21 -08:00
Federico Baron
db599b2d8e Fix bug where homescreen shows installation completed when it's technically still downloading and fix animation that repeats in apps with quick install
Fix: 269702659
Test: Download an app that has a lighning next to the install text and verify that the animation plays smoothly and that it doesn't animate until we finish downloading completely.
Change-Id: I11147444a85db01c75d63b5cdd09d1d911a28c75
2023-03-09 14:44:41 -08:00