Commit Graph

11918 Commits

Author SHA1 Message Date
Alex Chau
893f4c6a45 Apply PreviewPositionHelper matrix to TTV and Overlay
- Added GetThumbnailMatrixUseCase to retrieve task using taskId and calcualte Matrix using provided canvas size and isRTL
- TTVM and OverlayVM will uses GetThumbnailMatrixUseCaseTest with runBlocking to obtain the matrix from the loaded thumbnail
- TTV and Overlay listen for size change, and call VM to get the latest Matrix and apply to the view

Fix: 343101424
Test: GetThumbnailMatrixUseCaseTest
Test: TaskThumbnailViewModelTest
Test: TaskOverlayViewModelTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: If3f37824bed84d5cbaa54d7a4b12f5f1ef4e2c09
2024-07-18 13:07:14 +01:00
Treehugger Robot
fd7499bb82 Merge "Update IME switcher icon in taskbar" into main 2024-07-17 15:37:50 +00:00
Treehugger Robot
c2a36a6fcd Merge "Add Repository for RecentOrientedState and DeviceProfile" into main 2024-07-17 12:25:09 +00:00
Treehugger Robot
f834c2c881 Merge "Adjust scope for TaskOverlayHelper" into main 2024-07-17 11:10:17 +00:00
Alex Chau
5837a4628c Add Repository for RecentOrientedState and DeviceProfile
- DeviceProfile have java fields that cannot be mocked, nor can be freely instantiated, so I've to use FakeInvariantDeviceProfileTest to give me some predefined DeviceProfile for testing

Bug: 343101424
Test: RecentsOrientedStateRepositoryTest
Test: RecentsDeviceProfileRepositoryTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Iaa34ef60a418eb336859d260f5808b263de6b4f7
2024-07-17 11:29:20 +01:00
Uwais Ashraf
7fb7ac21a2 Adjust scope for TaskOverlayHelper
Fix: 335396935
Test: Manual - start stop overlay multiple times
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I615e43eddc896f52f9718ccef3a09f39b1ed7569
2024-07-17 09:09:33 +00:00
Jagrut Desai
b0e0e00660 Merge "Adding Skeleton Code for Customizable Taksbar" into main 2024-07-16 20:16:10 +00:00
Jagrut Desai
c9174e17a2 Merge "Add support for different container and space calculation logic." into main 2024-07-16 20:16:10 +00:00
Liran Binyamin
0e1ae64920 Merge "Send the bubble removal timestamp to wm shell" into main 2024-07-16 18:04:43 +00:00
Jagrut Desai
84151055b7 Add support for different container and space calculation logic.
This CL includes
	- Taskbar container enum class and interface for container to calculate their space needed.
        - Inits and getter of util classes in taksbar activity context.
        - Taskbar Icons specs not have default margins and minimum touch target specs
	- Updates to the test
        - Logic for calculating the space needed for taskbar container

Test: Presubmit
Bug: 341146605
Flag: com.android.launcher3.enable_taskbar_customization
Change-Id: I89e9d521476902a9027f6fd0cebdc2690b2e5f31
2024-07-16 10:48:51 -07:00
Cosmin Băieș
eccda9419d Update IME switcher icon in taskbar
This updates the icon of the IME switcher button used in taskbar.

Test: show taskbar and verify icon manually
Bug: 311791923
Flag: android.view.inputmethod.ime_switcher_revamp
Change-Id: I0288601717ab9d0f6842766df62599c51c5a2b4f
2024-07-16 10:26:35 +02:00
Riddle Hsu
ebc6bf5014 Merge "Avoid changing transform when touching in progress" into main 2024-07-16 04:50:11 +00:00
Jagrut Desai
dafd7f55ed Adding Skeleton Code for Customizable Taksbar
This cl includes
        - new skeleton xml view customizable taskbar view
        - new skeleton xml view for customizable taksbar container and a view class.
        - new taskbar all apps button view container class
        - pxFromDp util method introduction to launcher utilities

Test: Presubmit
Bug: 349885828
Bug: 349886203
Flag: com.android.launcher3.enable_taskbar_customization
Change-Id: Id83906ed0717da495c33275e52261153a1598074
2024-07-15 13:06:12 -07:00
Cosmin Băieș
1a0406e1be Merge "Add IME switch button long click support" into main 2024-07-15 18:06:02 +00:00
Treehugger Robot
72c4ebed6c Merge "Create scope for TTV attached to run collections that modify UI within." into main 2024-07-15 12:01:04 +00:00
Sam Cackett
a94365b5af Merge "Maintain if any task has been dismissed in RecentsView state" into main 2024-07-15 10:46:10 +00:00
Uwais Ashraf
f7093d445e Create scope for TTV attached to run collections that modify UI within.
Bug: 335396935
Test: Manual checking shows clear improvement of preformance problems
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I92aa4ce3edfe297cc5a177a2d93837d33cdfb548
2024-07-15 10:09:26 +00:00
Riddle Hsu
cbc84d96ef Avoid changing transform when touching in progress
After swiping from a landscape app to portrait home, the touch
orientation may be changed if there the touch event comes in a
short time (e.g. click app icon immediately):
 DOWN
 MOVE...
 SimpleOrientationTouchTransformer#onDisplayInfoChanged
 MOVE... (start to transform with inconsistent orientation)
 UP

That could disturb the gesture detection:
OverviewInputConsumer#onMotionEvent
 > BaseDragLayer#proxyTouchEvent
  onInterceptTouchEvent, findControllerToHandleTouch
  > PortraitStatesTouchController#onControllerInterceptTouchEvent
   > BaseSwipeDetector#onTouchEvent
which may show the app drawer unexpectedly.

http://recall/-/b2qm27pJZxFIWQccA9qE9Q/ggLXlE5kf7AWMOjUc0FCUU

Bug: 351755391
Flag: EXEMPT bugfix
Test: atest NexusLauncherTests: \
            com.android.quickstep.OrientationTouchTransformerTest# \
            testSimpleOrientationTouchTransformer
Change-Id: Ic0e9d8292606837feb4775663abb60229c90e9c5
2024-07-15 16:41:42 +08:00
Brian Isganitis
fd1cc12054 Merge changes I2b87ab88,I939d8202,Ibedd8cae into main
* changes:
  Introduce rule for changing taskbar pinning preferences.
  Reinject controllers when Taskbar recreates itself.
  Inline showTaskbarFromBroadcast.
2024-07-13 19:01:33 +00:00
Hongwei Wang
a531da0b85 Merge "Revert "Disable gesture nav while PiP anim is running"" into main 2024-07-13 08:16:44 +00:00
Treehugger Robot
41d50792f4 Merge "Clamp scrim progress for slow taskbar animation duration to max 1f" into main 2024-07-12 23:29:56 +00:00
Ikram Gabiyev
fa096a77f6 Merge "Allow extra pixel for app bounds containment PiP" into main 2024-07-12 21:29:16 +00:00
Brian Isganitis
1a03740ebd Inline showTaskbarFromBroadcast.
Feels like it should be the activities' responsibility to coordinate the EDU with stashing. All of these methods are also public to TaskbarActivityContext.

Test: Compiles
Bug: 346394503
Flag: EXEMPT refactor
Change-Id: Ibedd8caec59da3b3a14c15d0c948bf1069ca3c6c
2024-07-12 16:00:50 -04:00
Ikram Gabiyev
402a96f588 Allow extra pixel for app bounds containment PiP
Allow an extra one pixel delta on each side of the
app bounds for source-rect-hint containment checks
when swiping to enter PiP.

Bug: 349821386
Flag: EXEMPT bugfix
Test: swipe PiP to home with 21:9 video from landscape to portrait
Change-Id: Ibc53e426b49cfcd58e977433358b9980732ac289
2024-07-12 10:46:16 -07:00
Liran Binyamin
b67d4cc134 Merge "Fix regression in bubble animation" into main 2024-07-12 17:01:30 +00:00
Schneider Victor-tulias
25ff85efdc Merge "Add temporary debug logs to OtherActivityInputConsumer" into main 2024-07-12 16:57:31 +00:00
samcackett
0337520c7f Maintain if any task has been dismissed in RecentsView state
Fixes an issue in large screen layouts where the task order was
incorrectly being recalculated and the user would see their previous
tasks swap places.

Fix: 352308373
Test: Manual. In tablet view, open several apps, go to Overview, dismiss
 a task so the top row order changes, then swipe down the current
 focused task to resume. Observe order stays the same.
Flag: EXEMPT bugfix
Change-Id: Ic59e3125f69d36ba32d13436dba872f4d3a3d0df
2024-07-12 17:45:37 +01:00
Liran Binyamin
ef08582d36 Fix regression in bubble animation
This was a bug introduced in ag/28230638. Accidentally passed the
wrong boolean value. The bug is that the initial state animation
does not play, and the bubble bar remains invisible.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 352119655
Fixes: 352412093
Test: manual
       - Clear all bubbles
       - Send initial bubble
       - Observe that the initial state animation plays correctly
Change-Id: Ie1435539e348c0a92a11db0b58a0b3bce6525cc0
2024-07-12 15:55:36 +00:00
Schneider Victor-tulias
f67d384f86 Merge "Revert^2 "Add CUJ instrumentation for KQS"" into main 2024-07-12 14:59:45 +00:00
Alex Chau
e74d34673b Merge "Perform state switch to Overview from -1 screen" into main 2024-07-12 10:08:41 +00:00
Vinit Nayak
f92a34ff43 Clamp scrim progress for slow taskbar animation duration to max 1f
* Overview to workspace taskbar animation changed duration, and
with the new longer duration we no longer need to speed up the
scrim animation.
* The new longer duration was actually slowing down the scrim
interpolator

Fixes: 351911299
Test: Tested on small and large screen.
Tested w/ the flag off and there is a flicker, but that was
present without these changes as well
Flag: EXEMPT bugfix

Change-Id: I5dc219de541f3c2fb29a5a91a4770b0dece0259e
2024-07-11 15:48:25 -07:00
Fengjiang Li
dd7471f3bf Merge "[Launcher Jank] Improve SimpleBroadcastReceiver.java" into main 2024-07-11 20:22:22 +00:00
Hongwei Wang
8eafa16ecc Revert "Disable gesture nav while PiP anim is running"
Revert submission 28059459-disable-gesture-on-pip-animation

Reason for revert: b/352475079
Reverted changes: /q/submissionid:28059459-disable-gesture-on-pip-animation

Change-Id: I83f28fb74277b7d2ddefed0efaf784c2848c811d
2024-07-11 19:07:09 +00:00
Schneider Victor-tulias
2ba69c2d3e Add temporary debug logs to OtherActivityInputConsumer
Flag: EXEMPT debug logs
Bug: 339905514
Test: Swiped home from running apps and checked logs
Change-Id: Ib13c19df45edba2112afd9603caf5cb0e60fd1d0
2024-07-11 14:30:00 -04:00
Fengjiang Li
b87ad6f945 [Launcher Jank] Improve SimpleBroadcastReceiver.java
Bug: 348649441
Flag: NONE - jank fix
Test: manual - presubmit
Change-Id: I17bd7e4d7f0640522476e94edae691f983835f62
2024-07-11 11:12:29 -07:00
Treehugger Robot
9ef16e5cd3 Merge "Fix NPE of BaseContainerInterface#calculateTaskSizeInternal" into main 2024-07-11 16:30:31 +00:00
Treehugger Robot
2d73c5ef1b Merge "Change drawing in TTV to use Views rather than Canvas" into main 2024-07-11 15:03:18 +00:00
Alex Chau
1cd3fe27f2 Perform state switch to Overview from -1 screen
- This fixed a regression caused by ag/27904180, where -1 is no longer considered `visibleLauncher`. -1 still have Launcher being top activity, and recents animation will always fail
- Added isInMinusOne in LauncherActivityInterface, and return Launcher in getVisibleLauncher for -1 case
- -1 should be the only case where Launcher is top activity, but is not started

Fix: 352254279
Test: Recents button from the following scenarios: Home, -1, apps, transparent apps, video from -1
Flag: EXEMPT bugfix
Change-Id: I0898d202b9dd4742c0c7d2c0d6b340c748e8acf7
2024-07-11 15:53:26 +01:00
Uwais Ashraf
7e7afac7c0 Change drawing in TTV to use Views rather than Canvas
Fix: 352332386
Test: Presubmit, Manual
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ia1b7b6dc3d093d431ce022e793f40e61cec38ac6
2024-07-11 13:19:21 +00:00
Shamali Patwa
d16ea2650e Align predictive back in standalone picker activity
Bug: 346332606
Test: Manual
Flag: EXEMPT BUGFIX
Change-Id: I34882389029a5f095ab8d910791f7be34f7b8355
2024-07-11 13:03:55 +00:00
Treehugger Robot
1d73fdd4ac Merge "Add icon loading to TasksRepository" into main 2024-07-11 11:26:23 +00:00
Cosmin Băieș
33f8bfbadf Add IME switch button long click support
This adds support for handling long clicking on the IME switch button.
Initially it will behave exactly like short clicking, i.e. show the IME
switcher menu.

Flag: android.view.inputmethod.ime_switcher_revamp
Test: atest
  TaskbarNavButtonControllerTest#testPressImeSwitcher
  TaskbarNavButtonControllerTest#testLongPressImeSwitcher
Bug: 311791923
Change-Id: Ibd0d6bce2bab11511bc082f46731ec86038c8cf8
2024-07-11 11:42:16 +02:00
Uwais Ashraf
b59d86112c Add icon loading to TasksRepository
Bug: 334826842
Test: TasksRepositoryTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I75f2e0e9aae4663993ca54742f653f4c7c04fdfe
2024-07-11 09:40:57 +00:00
Fengjiang Li
eef1599c06 Fix NPE of BaseContainerInterface#calculateTaskSizeInternal
Fix: 351861547
Flag: NONE - Bug fix
Test: Presubmit
Change-Id: I984748a6c5487a946a96aa3e2183b5d13a370b6d
2024-07-10 14:43:15 -07:00
Mykola Podolian
103191c589 Merge "Shadow for bubble icons fixed." into main 2024-07-10 19:38:23 +00:00
Alex Chau
33da74f8c2 Merge "focusTransitionScaleAndDimOut should always go from 1f to 0f" into main 2024-07-10 16:41:03 +00:00
mpodolian
a3921ddb67 Shadow for bubble icons fixed.
The bubble's outline was hardcoded with a fixed size. This caused a
shadow to be drawn using the hardcoded outline size, regardless of the
actual bubble view size. The BubbleView logic has been updated to use
the actual bubble size for the outline. The guarding flag has been
removed.

Bug: 340445019
Flag: com.android.wm.shell.enable_bubble_bar
Test: http://recall/-/gx8ASgewUeUS3QYohfrd1J/hqFtAZJnX0tCRONoFpSK3i
Change-Id: Iaa2c2d0bfeee2af9840acbcf11daaf8be2e0b7af
2024-07-10 16:36:22 +00:00
Liran Binyamin
e29e31922f Merge "Fix squished hotseat due to bubbles" into main 2024-07-10 16:10:41 +00:00
Liran Binyamin
bdd96de69a Send the bubble removal timestamp to wm shell
The removal and update of bubbles happen in different processes, so
it's possible for race conditions to allow users to remove bubbles
without knowing that an update exists.

Passing the removal timestamp allows wm shell to determine whether
the removal happened before or after the latest update was received
for the bubble. This largely mitigates the race but does not solve
it completely. Will file a separate bug to track that.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 351026092
Test: Manual
       - Note the issue here is a race condition so requires code
         changes to force repro it
       - Locally I added an artificial delay between the time the
       - bubble is removed and until the removal is sent to wmshell
       - Create bubbles and expand the bubble bar
       - Dismiss bubble by dragging it to dismiss
       - Send an update to the same bubble before removal is processed
         in wmshell
       - Verify bubble is added back
       - Verify bubble is not removed when the removal is processed
         in wmshell
Change-Id: I05ddc692fe30709125e380351b223d20a0778264
2024-07-10 11:40:54 -04:00
Schneider Victor-tulias
a929c7ab75 Revert^2 "Add CUJ instrumentation for KQS"
0947d9f618

Change-Id: Ifc6f2ae8f447939f274fb6167cc74c0cd2e89652
2024-07-10 14:30:58 +00:00