Commit Graph

11894 Commits

Author SHA1 Message Date
Jordan Silva
715e25adf4 Refactoring PagedOrientationHandler to extract functions from to quickstep
This CL extracts RecentsView methods from PagedOrientationHandler to RecentsPagedOrientationHandler. It will allow to have quickstep specific components in the newer interface, like IconAppChipView.

Bug: 320633351
Flag: N/A
Test: atest NexusLauncherTests
Test: atest TaplTestsSplitscreen
Test: atest TaplTestsQuickstep
Change-Id: Ie7de23bddccbdb8eac93eff66a5d929f5bf0ee3a
2024-01-31 18:58:15 +00:00
Schneider Victor-tulias
7e768fbf3b Handle slow gesture handling
Fixed broken gesture handling when RecentsAnimationCallbacks signals take too long.

Flag: NONE
Fixes: 285636175
Test: added a programmatic delay in RecentsAnimationCallbacks.onAnimationStart, attempted home/overview/quick switch gestures then quickly attempted another gesture during the delay
Change-Id: I59261d21ca4e2bd4b5496822e78c6db74eac10c7
2024-01-31 10:23:24 -05:00
Luca Zuccarini
ae741dec9f Merge "Update dependency on Shell utils." into main 2024-01-31 10:06:19 +00:00
Jeremy Sim
cfcf2255dc Add error logging and better crash safety for app pairs
This causes app pairs to log an error message if creation or icon inflation is attempted with contents != 2. App pairs with wrong numbers of members should not be created anymore.

Fixes: 317283244
Fixes: 322892793
Test: Manual
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TEAMFOOD
Change-Id: I5e454042719bb67187f900c546380bb44cfc34ac
2024-01-31 15:42:20 +08:00
Tracy Zhou
89fa4e35d8 Merge "Make sure touch only goes to the nearest button when it makes sense" into main 2024-01-31 06:26:32 +00:00
Tracy Zhou
c7d7418cae Merge "Center a11y button" into main 2024-01-31 06:25:55 +00:00
Anushree Ganjam
8ee9076f0e Merge "[PS] Show "Uninstall" in Long Press menu for Private Space apps." into main 2024-01-31 02:22:11 +00:00
Tracy Zhou
1a92257520 Center a11y button
Bug: 25768138
Test: a11y button is centered when visible
Change-Id: If9099575c12b51a90bc9e15e712cb629811d36e3
2024-01-30 16:54:10 -08:00
Anushree Ganjam
45ef544ae5 [PS] Show "Uninstall" in Long Press menu for Private Space apps.
Video : https://b.corp.google.com/issues/319250810#comment18

- Add SecondaryDropTarget.performUninstall()
- Make SecondaryDropTarget.getUninstallTarget() public static.

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

Change-Id: If6488033a976914fdc0a50658fc0561dc1a6586a
2024-01-30 16:54:04 -08:00
Pun Butrach
6e8cad97bb Add toggleable material u popup (#4034)
* Toggleable new bouncy consolidated popup (MATERIAL_U_POPUP)
* Fix typo in calling PreferenceManager2
* Import FeatureFlags
* Get ctx in SDL
* Get ctx instead of this
* Correct type for context
* Import Context
* insert commit message here!
* I forgot I can just apply this neatly trick after looking at the code for 5 secounds
* Move to appropriate category

Co-authored-by: MrSluffy <werdna.jac@gmail.com>
2024-01-31 08:51:54 +08:00
Will Leshner
f0be49e693 Filter widgets in widget picker activity by size.
Bug: 322191186
Test: atest Launcher3Tests
Flag: NA

Change-Id: I003e05cc16ae576cda07d249d036d2f9dbacdcc2
2024-01-30 15:42:00 -08:00
Tracy Zhou
419140aede Make sure touch only goes to the nearest button when it makes sense
- In NearestTouchFrame, we can't use view bounds alone since the buttons do not have the same root (3 buttons are in the main container, while the contextual buttons are in the contextual button container). This currently caused the issue that contextual button region, when the contextual buttons are invisible, triggers overview
- Need to add an empty space in the left / top area of the button nav to prevent view clicks from going into back (that's how it works in navigationbar/)

Bug: 25768138
Test: left and right of 3 buttons don't trigger back or overview
Change-Id: Idc26c0c8ac0ecc000300a6db2e3e6251f678dada
2024-01-30 14:27:48 -08:00
Saumya Prakash
dc23966243 Merge "Don't show the Tasbar Pinning edu for 3 button nav users" into main 2024-01-30 21:20:45 +00:00
Ats Jenk
fbf3393faf Merge "Send bubble bar bounds in display coordinates to wmshell" into main 2024-01-30 19:10:23 +00:00
Ivan Tkachenko
2e11769840 Merge "Fix RemoteTargetGluer crash" into main 2024-01-30 17:56:28 +00:00
Tracy Zhou
e502cf3a1b Only hide back button in SUW when ime is rendering it
Bug: 316482919
Test: Back button is visible in SUW when ime is not rendering it
Change-Id: Id3f5d637c9e459a1b7a766187f0c134dd39a05f9
2024-01-29 22:25:36 -08:00
Anushree Ganjam
43a826c579 Merge "Fix the Int value to reflect shared preferences value in TouchInteractionService." into main 2024-01-29 23:15:56 +00:00
Saumya Prakash
318aba81e8 Don't show the Tasbar Pinning edu for 3 button nav users
The taskbar is already pinned for 3 button nav users so seeing the
taskbar pinning edu tooltip is not useful for them.

Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning TRUNKFOOD
Fix: 322449139
Test: Reset taskbar edu in 3 button mode and ensure that pinning edu
doesn't show up

Change-Id: I9a5da0fc74596056f6e6b1827c67584c2c9cf44e
2024-01-29 22:20:21 +00:00
Anushree Ganjam
eb5cb75753 Fix the Int value to reflect shared preferences value in TouchInteractionService.
This cl fixes following things

- When featureFlag is present, always read the value from FeatureFlag.get() instead of preferences.

- Add new function getIntFlagBackedUpByLauncherPrefs to read from sharedPreferences

- Make FlagTogglerPrefUi.java updateMenu() public

- When intFlag is modified in Developer Options, Apply button will show up. So launcher can restart and values get applied.

- Omnient Int flags will read from Featureflag.get() instead of shared preferences directly.

Bug: 320696242
Test: Manual
Flag: NA. Developer Options related

Change-Id: Id916b25d0397505d240ea8444d896c8ace826e57
2024-01-29 14:02:32 -08:00
Ats Jenk
d22d73a08c Send bubble bar bounds in display coordinates to wmshell
Bubble bar can be positioned to the left or right side of the screen.
Instead of sending offsets to wmshell, send the bounds of the bar, in
screen coordinates. WMShell can choose how to use that information.

Flag: LEGACY persist.wm.debug.bubble_bar DEVELOPMENT
Bug: 273310265
Test: repeat with LTR and RTL system languages:
  - have some bubbles, open an app, expand the bubbles by swiping up
    from bubble bar handle
  - have some bubbles, open an app, expand bubble bar by swiping up on
    navbar handle, tap on bubble bar to expand bubbles
  - have some bubbles, be on home screen, tap on bubble bar to expand a
    bubble

Change-Id: Id2d24831e567171b442ae7f34f055b7195a3e060
2024-01-29 11:32:20 -08:00
Jagrut Desai
ad37e4620c Merge "Fixing NullPointerException in TaskbarUIController" into main 2024-01-29 19:05:12 +00:00
Fengjiang Li
fb147e122a Merge "Fix NPE of touch handling in StatusBarTouchController#onControllerInterceptTouchEvent" into main 2024-01-29 17:21:43 +00:00
Jagrut Desai
2fee4eb040 Fixing NullPointerException in TaskbarUIController
Test: Presubmit
Bug: 322617093
Flag: NONE
Change-Id: I648ff17bbc666f30bd43fdab3320d058ac9e1f9f
2024-01-29 08:52:16 -08:00
Alex Chau
40804529f8 Merge "Remove extra grid interpolator in TaskView" into main 2024-01-29 14:25:55 +00:00
Ivan Tkachenko
b6fb50b676 Fix RemoteTargetGluer crash
- Updated DesktopVisibilityController to track the numer of visible
  freeform windows, and use it to initialize RemoteTargetGluer.
- Updated IDesktopTaskListener to observe visible freeform windows count
- Added resize remoteTargetHandles logic in RemoteTargetGLuer to update
  handles size with targets.apps.size on assign.
- This is a workaround and should be removed when RemoteTargetGLuer
  intialisation logic is refactored.

Bug: 288121021
Flag: None
Test: Manual
Change-Id: I0297616b4a140fac810c9736bddf6f817d0a98ed
2024-01-29 11:16:39 +00:00
MrSluffy
efdebfc6b4 Fixed broken WallpaperDepth option
- Closes : #3932
2024-01-29 11:54:48 +08:00
MrSluffy
05832f1323 Clean up 2024-01-28 15:38:35 +08:00
Anle Pan
97c45a0a26 Launcher3: Fix monkey crash in RecentsLaunchAnimator
It will appear a null object crash in quickstep launch
when monkey test. Althoough the 'View v' is declared as NonNull,
but there is a probability that it will return a null object
after the 'isTaskViewVisible' judgement in 'findTaskViewToLaunch',
Make a judgement before use to avoid crash.

Change-Id: I4606853325641feaf26a79791cce2514cee80d4c
Signed-off-by: Anle Pan <anle.pan@nxp.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-01-28 09:47:45 +08:00
ot_vishavjot.kaur
0681d1149d Launcher3: Fix launcher ui interface overlap and frozen problem
Press recent key and quickly click recent screen background, then
Recent List task doesn't disappear and overlaps on Homescreen.

When there is no time for Background State to change to Overview State, and gotoState(Normal) API is called, then let Background State transition to Normal state, and force Normal state to not transition to Overview state.

Bug: 287897684
Test: manually
1. Launch any app
2. Press Recent key
3. Click on same app task on recent list
4. Press Recent key
5. As soon as recent list appears, quickly click on background of Recent screen

Change-Id: I21f71a49cafe83bb8c916eb240d8db9246a13487
Signed-off-by: Dmitrii <bankersenator@gmail.com>
2024-01-28 09:47:45 +08:00
nift4
d2bee69a0a Launcher3: disable live tile - fix blur flicker
As per minaripenguin's now reverted commits

Change-Id: I4fc0918e5b39d225e09841fb2dc53ff52df87932
2024-01-28 09:08:26 +08:00
Tracy Zhou
b8bf90cd1f Merge "Init with mIsLumaSamplingEnabled = true" into main 2024-01-27 03:45:54 +00:00
Andy Wickham
e608533c60 Merge "Account for tasks over splitscreen in RemoteTargetGluer" into main 2024-01-27 02:43:00 +00:00
Fengjiang Li
87536679ce Fix NPE of touch handling in StatusBarTouchController#onControllerInterceptTouchEvent
Postsubmit passes: https://android-build.corp.google.com/builds/abtd/run/L20300030001590062

Test: presubmit
Flag: NONE
Fix: 282945183
Change-Id: Idcf87f8cd45350c4876ea8b1ae2dffa5127bf27f
2024-01-26 16:50:01 -08:00
Vinit Nayak
e16edc943f Account for tasks over splitscreen in RemoteTargetGluer
* Previously we defaulted to 2 handles, but we didn't take into
account the posibility of having assistant showing a translucent
task on top of 2 apps. Or other tasks such as Home controls.
* We can scale down the number of handles we have from
initialization (as done in assignTargetsForSplitscreen), but it's
a bit harder to scale up. This is a separate, larger problem in
that the handles are created and needed before onAnimationStart(),
so Launcher doesn't know exactly how many handles are needed to be
created for the recents animation, that's determined by the actual
onAnimationStart() call itself.
* There's a small known bug only in the split case where one of
the tasks shows up over the assistant task, but can live with that
to minimize changes. (peanutbutter@ to clarify?)

Demo: https://drive.google.com/file/d/1hqipfdym_rRXFsAW932es7UdxTx66Zu4/view?usp=drive_link&resourcekey=0-Ri_Kl0xCNN3E81StTh4vxw

As you can see, Assistant translucent overlay seems to work well,
but there are still some glitches with Home controls. Specifically,
there is a flicker, sometimes followed by a black screen, when
returning to the split tasks with Home controls open on top. The
flicker also happens with Assistant, but I haven't seen the black
screen for that case yet. In any case, the crash is avoided, so...
progress? (Also these flickers/black screen happen for Home controls
even without splitscreen).

Original change by peanutbutter@: ag/24830632

Test: Tested assistant result tasks with fullscreen and splitscreen,
and by itself. Seems to animate fine. Also tested with Home controls,
which animates fine and avoids the crash, but still has some issues
when re-opening the tasks as described above.
Flag: NA
Bug: 321328009

Change-Id: I0aa04a6a14cf723b34431855483662039c96e553
2024-01-26 15:20:03 -08:00
Vinit Nayak
64af5ca348 Merge "Revert "Ignore taskbar launch request if app(s) are already running"" into main 2024-01-26 21:33:47 +00:00
Sunny Goyal
032437913b Merge "Adding an abort listener in app launches to clear state" into main 2024-01-26 20:07:15 +00:00
Vinit Nayak
8a13e275ec Revert "Ignore taskbar launch request if app(s) are already running"
This reverts commit 9a7b6f972b.

Reason for revert: b/319750648

Change-Id: I778453cf65bb48e31062365a069cfe5b1cb77b96
2024-01-26 19:01:48 +00:00
Vinit Nayak
37844c7b88 Merge "Remove clear all button in overview for contextual split" into main 2024-01-26 18:58:00 +00:00
Sunny Goyal
4b67d7f47f Adding an abort listener in app launches to clear state
Bug: 318394698
Test: Verified on device
Flag: None
Change-Id: Ib6108782429abb5dfd9c4e42246e4a93ddf10f55
2024-01-26 17:16:31 +00:00
Johannes Gallmann
c9be821856 Merge "Fix TaplTestsQuickstep.testPressback failure (2)" into main 2024-01-26 08:48:41 +00:00
Tracy Zhou
1c15229be6 Init with mIsLumaSamplingEnabled = true
Bug: 230395757
Test: Factory reset in unfolded. Check bar sampling. Fold and swipe up from an app different from system color to overview. Observe the bar color change.
Change-Id: I7d94a3a8f17a40fbabd4d65629846eb12bdbd3d6
2024-01-25 22:54:57 -08:00
nift4
3a8b541580 Launcher3: Disable live tile
Method as per Google commit 25399db1e7
("[DO NOT MERGE] Disable live tile in split mode for S").

Live tile has a LOT of bugs even in AOSP and Pixel stock ROMs:
* Alpha animation randomly not applying causing app to get stuck
* X/Y translation not applying causing app to get stuck
* Causes extreme jank (enable HWUI bars and swipe in recents...)
* Sidescroll tile minimization cuts off content instead of shrinking it.
* Screenshotting a sidescolled live tile causes it to become invisible.

Combined with our blur/transparency changes:
* The tile doesn't actually shrink because Google just draws background
  over the tile instead of shrinking it...
* The tile gets blurred which has to be fixed in very hacky ways,
  because it is on a very low layer, which is below the blur
...the end result is a total mess.
Kill this feature, and revisit fixing our issues once Google gets their
own shit together.

Change-Id: I33e6dab845b2147fd72fe0fb4c151e78035560ec
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-01-26 12:00:31 +08:00
nift4
9c3b7fe743 Launcher3: Ensure to update cached thumbnail if we take new one
This fixes a bug, which became obvious thanks to disabled live tile, but
has already existed before, where recents jumps to using last snapshot
instead of the correct/current one once you fling, because thumbnails
were cached but the cache had not been updated in this codepath.

Change-Id: Ie7afe56b6e0aecaae2510248c5887873800a0b51
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-01-26 12:00:14 +08:00
Pranav Vashi
30f77e5f43 Reland 'Launcher3: Fix blurry recents issue with live tile'
* Issue description: https://github.com/LawnchairLauncher/lawnchair/issues/2762

mnri: this reduces the occurences of the taskview getting stucked after swipe up gesture

Change-Id: I363f4ace8b2bde2bc4ed6e6f7f608b850e0359f8
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
Signed-off-by: Dmitrii <bankersenator@gmail.com>
2024-01-26 11:58:16 +08:00
Vinit Nayak
53eb01bcb5 Merge "Update split instructions text for contextual" into main 2024-01-25 23:25:58 +00:00
nift4
0312589cf5 Launcher3: Fix overview scrolling scale animation
Adapt it for Live Tile support + fix landscape handling

Change-Id: I1cf5d79aa6373e836d33bc7ddb15c0c5258a63d7
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2024-01-26 06:26:47 +08:00
LibXZR
6fc64ce9b7 Launcher3: Introduce overview scrolling scale animation
This vivid animation enables users to perceive more clearly
about the switching of the task cards.

Note that live tile feature is disabled because it is not
compatible with this animation. Also live tile is causing
notable performance regression, which is not worth relative
to its function.

Change-Id: Ie1350d6bda2d311f70f9be7cff47b0abe7e00cad
Signed-off-by: LibXZR <i@xzr.moe>

Fix discontinuous animation when dismissing taskcards on
 the right side

Cards should never be scale down in this animation.

Change-Id: I759492390eb8f1a2b9023c2d264f0e7191b17108
Signed-off-by: LibXZR <i@xzr.moe>

Recalculate scroll scale on layout

Edge case exist that when there's only one task,
onScrollChanged() won't be called so the last scale
from the recycled view is showed, leading to wrong
display size.

Change-Id: If8a189ba6b854ed486283d43b8a0ac3e4bb4e9f2
Signed-off-by: LibXZR <i@xzr.moe>

Change-Id: I5056c51f823788a45683c23fa710975d9ae7fe7e
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
2024-01-26 06:25:56 +08:00
Andy Wickham
af7ff56792 Merge changes from topics "awickham-api-cleanup", "keyboard-on-back" into main
* changes:
  Cleanup API checks for P, Q, and R.
  Add a WindowInsetsAnimationCallback to listen to IME changes.
  Update minSdk to 30.
2024-01-25 22:06:40 +00:00
John Andrew Camu
c31b41ae73 QuickSwitch Compat Q to U (#3948)
Initial support quickstep, Android versions from Q to U, ensuring a smooth and efficient user experience. Enjoy effortless navigation and swift app switching on your Android device with QuickSwitch's compatibility across the Q, R, S, T, and U.


Co-authored-by: Goooler <wangzongler@gmail.com>
Co-authored-by: 无言 <57122860+liu-wanshun@users.noreply.github.com>
2024-01-26 05:59:47 +08:00
Vinit Nayak
d441d7d22e Update split instructions text for contextual
Test: Visually saw different string for contextual
Bug: 322117067
Flag: aconfig com.android.wm.shell.enable_split_contextual
Change-Id: I92b09bc47d29ba5dd83d09f78aaf8d67e855dd36
2024-01-25 13:28:06 -08:00