Commit Graph

64 Commits

Author SHA1 Message Date
Alex Chau
c06bc41ee0 Use snapshotView references in TaskContainer when possible
- Moved majority of TaskContainer.thumbnailViewDeprecated usage to TaskContainer.snapshotView, so they'll cover the new TaskThumbnailView as well
- There are afew location left that will be handled as a follow-up
- Removed TaskThumbnailView's splitTranslation and use translation directly as it's the only translation we use

Bug: 336612373
Test: Ensure all Task CUJs still work without refacorting
Test: Ensure major Task CUJs work with refactoring
Flag: EXEMPT refactor
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ieb52236bc503ce0d0a511249978c1821a82d406e
2024-06-26 16:07:57 +01:00
Brian Isganitis
5ee679dbb8 Merge "Introduce TestRule for setting Taskbar mode." into main 2024-06-24 20:17:24 +00:00
Brian Isganitis
cbc07b4282 Introduce TestRule for setting Taskbar mode.
This rule is separate from TaskbarUnitTestRule, because mode isn't
relevant to all Taskbar controllers.

To keep MainThreadInitializedObject behavior consistent across
Robolectric and Instrumented environments, context needs to be a SandboxContext.

Test: TaskbarModeRuleTest
Bug: 230027385
Flag: TEST_ONLY
Change-Id: Iae2e3627b9002e13ee6da135113e7b8bcc4e7d47
2024-06-24 14:34:45 -04:00
Treehugger Robot
c1391754ff Merge "Enable currently functional multivalent tests" into main 2024-06-24 01:17:40 +00:00
Uwais Ashraf
c902df4e41 Enable currently functional multivalent tests
Flag: EXEMPT test-only
Bug: 325088619
Bug: 325088638
Bug: 325088328
Test: Presubmit
Test: Gradle robolectric run
Change-Id: I20e77a401ed98c97168bf9c752eacc93c3c545dd
2024-06-22 22:14:30 +00:00
Treehugger Robot
0abbc4af14 Merge "Add scrim to TaskThumbnailView" into main 2024-06-22 01:22:31 +00:00
Treehugger Robot
f4934108bb Merge "Fix bubble bar bounce animation issue" into main 2024-06-21 20:44:10 +00:00
Uwais Ashraf
0d9b547471 Add scrim to TaskThumbnailView
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Fix: 334832108
Fix: 348195366
Test: Manual - checked scrim in un/folded
Change-Id: I758a26e9b4498dac509b75afbe059784557b3f8c
2024-06-21 16:27:01 +00:00
Liran Binyamin
cdc3e4d8b4 Fix bubble bar bounce animation issue
The bubble bar bounce animation was assuming that the initial translation
of the bubble bar is also the translation the bubble bar should have at
the end of the animation. This is normally correct except when the
bubble bar is initially hidden. What happens in that case is that the
translation is 0 so the bubble bar gets animated incorrectly.

This change gets the target animation from stash controller.

ABTD 100 runs: https://android-build.corp.google.com/abtd/run/L26900030004638356/

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 347856510
Test: atest BubbleBarTest#selectDifferentBubble
Change-Id: I661bf006c6f23ff871c221f8d9da74d79a2dff11
2024-06-20 18:03:52 -04:00
Liran Binyamin
8af78f19a3 Merge "Animate bubble removal from the bar" into main 2024-06-20 20:57:34 +00:00
Liran Binyamin
7b426af15f Animate bubble removal from the bar
This change creates a BubbleAnimator class that handles animating
both new bubbles in and removed bubbles out.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/dMHGANplWjGC5HZT6MXyA4

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 345687290
Test: atest BubbleAnimatorTest
Test: see demo

Change-Id: Ie060495f4b1421d1c8af48a861cd3e12dd0adbe8
2024-06-20 14:57:03 -04:00
Liran Binyamin
ad2f15c5b2 Merge "Implement new bubble animation when collapsed" into main 2024-06-18 00:16:08 +00:00
Liran Binyamin
9e15f07c1c Implement new bubble animation when collapsed
Bounce the bubble bar when a new bubble is received while the bubble
bar is collapsed.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/fn7NWNY3htuR6K3wxhfcK2

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 280605790
Test: atest BubbleBarViewAnimatorTest
Change-Id: I4c622454fd99f6bb5a332b3fe4aa2764c8af93af
2024-06-17 16:24:59 -04:00
Brian Isganitis
0e709b9a9d Merge "Add test for toggleSearch." into main 2024-06-17 18:25:17 +00:00
Randy Pfohl
69092b41f6 Merge changes from topic "windowPrototype" into main
* changes:
  Fixing tests related to abstraction
  Abstracting StatefulActivity from StateManager
2024-06-13 22:11:49 +00:00
Brian Isganitis
fa1f4c9f79 Add test for toggleSearch.
Focus is not requested until the open animation finishes, so we need to
emulate the animation completing.

Test: TaskbarAllAppsControllerTest
Flag: TEST_ONLY
Fix: 346394798
Change-Id: I5ba57e9bb1813c159599b31404a28ef10c85e3ee
2024-06-13 20:06:30 +00:00
Brian Isganitis
1535867fa7 Merge "Test TaskbarAllAppsController non-search behavior." into main 2024-06-13 18:04:12 +00:00
randypfohl
4b40965346 Fixing tests related to abstraction
Flag: NONE - fixing tests

Test: built and ran locally, verified test pass in presubmit

Bug: 224595066

Change-Id: Ifefab1e1696853c5bd816a361314082073ba8a20
2024-06-13 10:26:12 -07:00
Brian Isganitis
e2b79a499d Merge "Add more documentation explaining main thread requirements." into main 2024-06-13 00:02:22 +00:00
Brian Isganitis
e54c1462a3 Test TaskbarAllAppsController non-search behavior.
Flag: TEST_ONLY
Bug: 230027385, 346394798
Test: TaskbarAllAppsControllerTest
Change-Id: Id97e1b82cb8fba48687b5e23222e3bba6695ac4c
2024-06-12 23:59:51 +00:00
Brian Isganitis
e16fc827d3 Add more documentation explaining main thread requirements.
Flag: TEST_ONLY
Test: n/a
Bug: 230027385
Change-Id: Iad38f946c2e75a3372253e57abb4df2f52e62ca5
2024-06-12 16:23:14 -04:00
Brian Isganitis
a76fcaf5b4 Add more tests for {request,hide}Window.
Flag: TEST_ONLY
Fix: 346394585
Test: TaskbarOverlayControllerTests
Change-Id: I59ed58d7f3a4d46bccfb34ef6923f1bf4f5bf2c1
2024-06-12 15:53:33 -04:00
Brian Isganitis
9eaae4b6a4 Initial TaskbarUnitTestRule with example overlay controller tests.
Flag: TEST_ONLY
Bug: 230027385
Test: TaskbarOverlayControllerTest
Change-Id: I858906ece7e67677962ec8b4432bfcca5ec30283
2024-06-11 23:48:13 -04:00
Ats Jenk
cd4c9d153d Add content description to bubble bar and bubbles
Set content description on the bubble bar when it is collapsed. Only
allow focus on the bar itself. In collapsed mode, bubbles in the bar
can't be focused.
Content description for the bar matches what we have in floating mode.
We include the text for the first bubble and then how many bubbles are
there more.

Set content description on bubbles in bubble bar. When bubble bar is
expanded, only the bubbles are focusable.
Bubble content description matches the floating bubbles content
description. Includes the notification title and app name.

Bug: 344670947
Flag: com.android.wm.shell.enable_bubble_bar
Test: enable talkback, focus on bubble bar when it is collapsed, check
  that only bubble bar receives focus
Test: enable talkback and expand bubble bar, check that only the bubbles
  receive focus
Change-Id: Id931f0360b9ebadd01dd16b05b75546fcc4df803
2024-06-05 10:13:22 -07:00
Uwais Ashraf
bad2e24f72 Add snapshot state to TaskThumbnailView and ViewModel
Bug: 334825222
Test: TaskThumbnailViewModelTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I829c346861a6f437b2c53dadb3a7f98084d3c962
2024-05-29 10:47:05 +00:00
Uwais Ashraf
f6f34ca441 Add TasksRepository
Bug: 334825222
Test: TasksRepositoryTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I3e08dea7b205df54f8bef456ead6466aa2ce45c6
2024-05-24 12:06:59 +00:00
Uwais Ashraf
e21d6b15d5 Merge "Fix some compile errors occurring as a result of robo enablement" into main 2024-05-21 21:18:11 +00:00
Uwais Ashraf
784b4f28b0 Fix some compile errors occurring as a result of robo enablement
Fix: 297950111
Test: :NexusLauncher.Robo:testGoogleWithQuickstepDebugUnitTest
Test: atest NexusLauncherRoboTests
Flag: NA
Change-Id: Ic9b09fff630d274558d09b7031d12ec28f10fbc7
2024-05-21 18:56:52 +00:00
Liran Binyamin
56322431ca Fix flake in BubbleBarViewAnimatorTest
The flake was probably happening because the animation end listener
has not finished running on the UI thread. This change waits for
the UI thread to become idle before proceeding.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 341161005
Test: ran BubbleBarViewAnimatorTest#animateToInitialState_inApp 100x
Change-Id: Ide3b0a34095ed01cc179534fa608aecd5d3f3a20
2024-05-21 13:19:34 -04:00
Liran Binyamin
0d8b2206af Merge "Deflake BubbleBarViewAnimatorTest" into main 2024-05-14 16:53:28 +00:00
Liran Binyamin
097261619b Deflake BubbleBarViewAnimatorTest
Fix an issue where we were verifying the status of the animator on the
test thread, which may have been modified on the main thread.

100x runs: https://android-build.corp.google.com/abtd/run/L42700030003806035/

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Fixes: 339437686
Test: abtd link above
Change-Id: I7e0d67e6ca4b2f905ff80f317355d8d5ed0a912b
2024-05-14 00:22:00 +00:00
Liran Binyamin
3fcdc0a39f Merge "Handle touch on bubble bar while animating" into main 2024-05-13 17:30:40 +00:00
Liran Binyamin
6097a29158 Handle touch on bubble bar while animating
This change handles touches on the bubble bar while the bubble bar is animating.
We now update the taskbar touch region during the animation to make the bubble bar touchable.
When the bubble bar is touched during the animation, we now cancel the animation and allow dragging or clicking to expand.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/gtGS6FCrygN5RKueFtPs5E

BubbleBarTest 100x run: https://android-build.corp.google.com/abtd/run/L42600030003675041
Note that in the abtd run above there's a flake but that's for a different test which I'll look into separately.

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605790
Bug: 280605846
Bug: 339066271
Fixes: 339244038
Test: See demo
Test: atest BubbleBarViewAnimatorTest
Change-Id: Icb8f4fa46ae4bb8c94ca931193d4a3cc49c5b718
2024-05-13 09:41:23 -04:00
Uwais Ashraf
9533b0fb27 Add corner rounding to TaskThumbnailView
Fix: 334826840
Test: TaskThumbnailViewModelTest
Flag: ACONFIG com.android.launcher3.enable_refactor_task_thumbnail DEVELOPMENT
Change-Id: Iba4d49d43abc09363f61186c3fcc07f2281b7006
2024-05-08 14:45:44 +00:00
Liran Binyamin
aa73f595cf Animate the bubble bar for the first bubble
This change animates the bubble bar for the first bubble.
When we're in home -- the bubble bar bounces in and stays visible
When we're in app -- the bubble bar bounces in, then animates to
the stashed handle.
When the bubble bar auto expands, we currently animate the bubble
bar already expanded. In the future we'll time the expansion
until after the bubble bar settles in.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/hIGwtb3YKyCT9Ke9adZNgY

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 339066271
Test: atest BubbleBarViewAnimatorTest
Change-Id: I80ce55676b72a50bab23623e0b5c1e602690682f
2024-05-06 20:17:28 -04:00
Liran Binyamin
b4b5e79ffe Merge "Interrupt bubble animation on stash change" into main 2024-05-06 16:06:55 +00:00
Liran Binyamin
209c764175 Interrupt bubble animation on stash change
This change handles cancelling the currently running bubble animation when the stash state is changing.

Demo - http://recall/-/bJtug1HhvXkkeA4MQvIaiP/4jnBgnFaIPez6m7fVLSlf

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Test: atest BubbleBarViewAnimatorTest
Change-Id: I34628f8ad741228dd21285ad66e45ef2909fbdab
2024-05-06 09:55:34 -04:00
Liran Binyamin
841411d122 Give bubble team owners on the correct launcher bubble dirs
Whoops.

Flag: N/A
Test: treehugger
Bug: none
Change-Id: I25df1a161d94bd1acac976bc61217a59b3657074
2024-05-02 15:33:16 -04:00
Liran Binyamin
85c50adb91 Merge "Animate the bubble bar to show new bubble" into main 2024-04-30 14:01:09 +00:00
Treehugger Robot
43f65905ab Merge "Replace Contextual Rotation Button with Floating Action Button" into main 2024-04-30 05:34:35 +00:00
Sukesh Ram
1187fd817e Replace Contextual Rotation Button with Floating Action Button
When foldable is in 3 button, the rotation button is covered by the device’s camera cutout upon rotation.

This CL replaces Contextual Rotation Button with Floating Action Button for taskbar and navbar.

Flag: NONE
Test: Manually tested on Felix & panther.
Bug: 324070001
Change-Id: I8bd9acdeec8ade4c8183c42056bf67b1c825906c
2024-04-29 22:44:00 +00:00
Liran Binyamin
29a3e5d676 Animate the bubble bar to show new bubble
This change updates that animation that plays when a new bubble notification is received. We now animate the entire bubble bar rather than the individual bubble.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/dwbsZJZlqLwJ2IG7RfJZ7c

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Test: atest BubbleBarViewAnimatorTest
Change-Id: I2dc58ad61b880d76c9eefa462c3aee4e8bbb3584
2024-04-26 20:50:43 -04:00
Liran Binyamin
b8cf10a409 Merge "Handle taps on the animating bubble" into main 2024-04-25 22:56:32 +00:00
Brian Isganitis
79d0569d49 Remove nav button controller dependency on TIS.
This refactor will make it easier to initialize TaskbarManager in a test
environment. Se go/taskbar-controller-tests for context.

Test: TaskbarNavButtonControllerTest
Bug: 230027385
Flag: N/A
Change-Id: I157649ff93b5e1751e6774e2cba2f76750792292
2024-04-24 18:17:00 -04:00
Uwais Ashraf
e21525da40 Add a refactored TaskThumbnailView
- Live Tile, swipe (left+right) and dismiss working
- Tests of ViewModel state transitions
- Deprecate the old TaskThumbnailView
- Renaming TaskThumbnailView to TaskThumbnailViewDeprecated

Fix: 335440878
Fix: 331754672
Bug: 331753115
Test: TaskThumbnailViewModelTest
Test: Attached video on bug
Flag: ACONFIG com.android.launcher3.enable_refactor_task_thumbnail DEVELOPMENT
Change-Id: I063b957fe6e56960970dcaadc641848fbd73251c
2024-04-23 23:05:14 +01:00
Sunny Goyal
10fa016352 Fixing MainThreadInitializedObject
> Making SafeCloseable implementation mandatory, to prevent leaks during test and preview
> Removing getNoCreate method and defining executeIfCreated to avoid null pointer exceptions
> Fixing sandbox value leaking into main, by Checking sandbox against App context
> Converting sanbox to an interface instead a class

Bug: 335280439
Test: Presubmit
Flag: None
Change-Id: I951dcde871898e745ff6490a1c4f8fd1512888f5
2024-04-22 17:04:33 -07:00
Liran Binyamin
a87abece5a Handle taps on the animating bubble
Make the animating bubble touchable and expand the bubble bar when tapping on it.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/c4wBVtrT5YIgxL5kVuuoDU

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Test: atest BubbleBarViewAnimatorTest
Change-Id: I09281c2ebc9921750ada42dfc27e95d1ad0bd83b
2024-04-18 13:52:22 -04:00
Liran Binyamin
a7d2658d96 Merge "Update new bubble animation" into main 2024-04-18 15:51:39 +00:00
Randy Pfohl
819b835519 Revert "Revert "abtracting Activity from recentsView through rec..."
Revert submission 26911513-revert-26414135-RecentsViewContainer-MEROZZOKJQ

Reason for revert: Fix for issue has been found and will be included in this revert.

Reverted changes: /q/submissionid:26911513-revert-26414135-RecentsViewContainer-MEROZZOKJQ

Change-Id: I517e7d2fc0d82d250a6ed40862dd31c194d0a302
2024-04-11 08:58:08 -07:00
Liran Binyamin
e79120af38 Update new bubble animation
This change is a rewrite of the new bubble animation. Previously we chained the handle animation and the bubble animation so that they run sequentially.
That caused the transition from the handle to the bubble to be jarring.

We now use a single spring animation along the y axis that starts from the position of the handle to the position of where the bubble will end up.
The animation is split into 3 logical parts, where initially the bubble animates out, then the bubble starts animating in, and the last part is the overshoot of the spring animation, which is used to mark the bubble fully visible and ensure that from that point on, the bubble is only moving but doesn't change in scale or transparency as the bounce effect is playing.
Using a single animation path allows for a smooth transition from the handle to the bubble view.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/hHNUBdNJPiWi9gMbqy45UJ

Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Bug: 280605846
Test: atest BubbleBarViewAnimatorTest
Change-Id: Ic1d3244574b8500d4aad2e9c718e61c1c34bd82a
2024-04-11 11:51:10 -04:00