Commit Graph

1053 Commits

Author SHA1 Message Date
Nataniel Borges
fd9e7d529f Disable failing PIP expand assertion
The PIP layer shrinks for 1 frame while expanding (flaky)

Bug: 197726610
Test: atest WMShellFlickerTests
Change-Id: Ibc27fe345722223f6dd29277f5d70abff8ab5a89
2022-04-21 11:41:57 +02:00
Mady Mellor
ef1cc8850f Merge "Collapse bubbles when drag and drop is initiated" into tm-dev 2022-04-19 17:08:36 +00:00
Mady Mellor
528db439de Collapse bubbles when drag and drop is initiated
Dragging a notification into split screen would fail if bubbles
were expanded while performing this action. I think it makes sense
to collapse the stack if its open when drag and drop for an app
starts.

Bug: 223909931
Test: atest DragAndDropControllerTest
Test: manual - have bubbles expanded
             - swipe down the shade, long press on a notification
               and drag it
             => bubbles are collapsed and the notif is able to be
                put into split screen.
Change-Id: Ib5160b3d772452f1cdd704926887bd38a5fd1ef1
2022-04-18 22:52:59 +00:00
Shawn Lin
8b8de88b3e Merge "Update to use NAV_BAR_KIDS_MODE settings key for kids mode organizer" into tm-dev 2022-04-18 03:41:27 +00:00
Hongwei Wang
e4f4f107f3 Reset PiP shadow radius in onTaskVanished
This is a follow-up of ag/17527240 in which we do not cover the case
that a Task in pinned mode is directly removed via Task#moveTaskToBack

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/cMG5Uh1kLC7EyAs2EbDVkM
Bug: 228793904
Test: follow the reproduce step in bug, see video
Test: atest WMShellUnitTests:PipTaskOrganizerTest
Change-Id: Ib7472908a81d56d34216ca272afbd9f1a2668b89
2022-04-15 13:51:30 -07:00
Tony Huang
96770f2561 Merge "Add error handling for start task and intent" into tm-dev 2022-04-14 09:11:21 +00:00
Tony Huang
4ae839860f Add error handling for start task and intent
If user start task and intent with same app but not support
multi-instance, in this case it will only start one side split and
the other one show as black screen.
We should avoid such status and do some error handling, this patch
prevent it by exiting split immediately and expand the that app as
full screen.

Fix: 224888879
Test: manual
Test: pass existing tests
Change-Id: I827debb01f3a2fc8f04f4b1931084f2fa475f8a6
2022-04-14 14:40:13 +08:00
shawnlin
7439e38646 Update to use NAV_BAR_KIDS_MODE settings key for kids mode organizer
Bug: 228912892
Test: make
Change-Id: I14593e959487dae5c3dd3bf0dba95c4109eb0c67
2022-04-14 12:18:14 +08:00
Pablo Gamito
521dfd5acf Remove references to old FaaS test rule
Test: atest FlickerTests
Change-Id: Iabab1c67166933be74244abcb8e9d883ce2e8dad
2022-04-13 09:38:26 +00:00
Galia Peycheva
427189714d Merge "Fix strange pip size in horizontal expanded mode" into tm-dev 2022-04-12 08:29:43 +00:00
Jason Chang
118e6bacdb Merge "Fix One-handed mode tutorial broken on large screen device" into tm-dev 2022-04-07 18:10:11 +00:00
Tony Huang
19a4ebfacc Merge "Implement center aligned parallax resizng effect" into tm-dev 2022-04-07 05:24:20 +00:00
Mateusz Cicheński
9e7f234b10 Merge "Move PiP when it occludes a keep clear area with naive algorithm." into tm-dev 2022-04-06 20:41:53 +00:00
Galia Peycheva
413044b7de Fix strange pip size in horizontal expanded mode
Fix: 228188320
Test: atest TvPipKeepClearAlgorithmTest#test_PipInsets
Change-Id: I217663863acbf15e8bdd6f7a7942f6de56942b95
2022-04-06 17:00:49 +02:00
Mady Mellor
ab6aaa765b Merge "Bubble flicker test: Ensure the notification shade is opened" into tm-dev 2022-04-05 16:19:38 +00:00
Pablo Gamito
e2a041cf92 Merge "Update component ids from Winscope to Flicker" am: d41316339d am: 1016b2d3c2 am: b9a97d8d9b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2055046

Change-Id: If7f4442f602e60ca1a5322e02484cace47ce89a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 15:19:51 +00:00
Pablo Gamito
85c38bd427 Update component ids from Winscope to Flicker
Test: N/A
Change-Id: I5bc614c406535b0f282cb9d948e426e879d3a069
2022-04-04 22:31:02 +00:00
Pablo Gamito
ac56c3acc2 Promote and demote flicker tests
Test: atest FlickerTests WMShellFlickerTests -- --module-arg FlickerTests:include-annotation:android.platform.test.annotations.Presubmit --module-arg FlickerTests:exclude-annotation:android.platform.test.annotations.Postsubmit --module-arg FlickerTests:exclude-annotation:androidx.test.filters.FlakyTest
Change-Id: I10699aed8cd4cfb7e053b32b5a526aa5ce78c584
2022-04-04 21:12:43 +00:00
Mateusz Cicheński
f96f01f76e Move PiP when it occludes a keep clear area with naive algorithm.
This does not adjust the position of PiP after user manipulation,
i.e. PiP can occlude keep clear areas if user drags it on top of them.

Video of the behavior: http://recall/-/g8x7ZkgdfbqscttAA9wzl9/gDH7SgnC3nVLM0FBfWq8iU
Bug: 183746978
Test: manually on device, atest PipKeepClearAlgorithmTest
Change-Id: I3cbc46170df84954f40ff1484aa53ca374f9ce18
2022-04-01 20:59:26 +00:00
Gaurav Bhola
be5abebe9f Merge "Add the insets visibilities requested by the focussed window in topFocussedWindowChanged() api." into tm-dev 2022-04-01 19:57:58 +00:00
Mady Mellor
d1f18027e7 Bubble flicker test: Ensure the notification shade is opened
This test depends on finding the text in the notification. In some
cases the notification might not be visible due to whatever else is
going on on the device.

This change adds a swipe that (based on local testing...) will trigger
the shade to expand while on lockscreen and allow all notification
text to be read / found by UiAutomator.

Update the text in the notification to use "BubbleChat" everywhere
so that it can be reliably found (when the notification is collapsed
or expanded it shows text a little differently & it auto expands
when the shade is expanded and it's the top notification).

Test: atest LaunchBubbleFromLockScreen --iterations 20
    - Ideally get the "app updates are ready" notif by checking for
      updates in settings, when you have this on screen the test
      would fail 100% consistently.
Bug: 205288792
Change-Id: Ib01923f35c531fb15230d640237e2c395ee1904d
2022-04-01 17:54:52 +00:00
Tony Huang
084bdd9ecf Implement center aligned parallax resizng effect
Follow new UI design mock, make resizng smaller side for new
center aligned parallax effect.

Bug: 220985951
Test: manual
Test: pass existing tests
Change-Id: Ia42ad64e9b956ce6f9daa7ea2ccb0d42ac26a322
2022-04-01 19:39:20 +08:00
Vadim Caen
ff898c6407 Ensure no animation is run except for HOME
... and directly reset the animation state for other cases.

Fixes: 222769294
Test: BackAnimationControllerTest#verifyAnimationFinishes
Change-Id: If04885065076ef7e3c15f5cce2c1d040bd92b494
2022-03-31 15:27:23 +02:00
Gaurav Bhola
3b42bacd29 Add the insets visibilities requested by the focussed window in
topFocussedWindowChanged() api.

- This is helpful when DisplaySystemBarsController needs to show/hide
  the bars depending on what the window has requested.

Bug: 224883596
Test: atest DisplayInsetsControllerTest
Change-Id: If00231b96153c9c7830fd948003e00a93c8294cd
2022-03-30 17:14:47 +00:00
Jason Chang
6bf4115606 Fix One-handed mode tutorial broken on large screen device
Change the check statement for Portrait and Landscape, then
only allow Portrait can trigger One-handed mode.

Bug: 223486060

Test: manual
Test: atest WMShellUnitTests
Change-Id: If740164d287dbddadd7cae7b6e7fe17b7bede717
2022-03-31 00:35:12 +08:00
Nataniel Borges
a8acc4954d Merge "Wait for correct surface to disappear on transition" into tm-dev 2022-03-30 15:57:43 +00:00
Shan Huang
342dccd988 Merge "Fix back taking multiple swipes." into tm-dev 2022-03-30 15:00:45 +00:00
Shan Huang
83e901d8d7 Fix back taking multiple swipes.
Bug: 226417634
Bug: 226723586
Test: Try swiping back on multiple devices. It seems it's easier to
repro on bluechip devices. A good test case for me was to bring up and
dismiss all apps folder repeatedly on a p22 device.

Change-Id: I4dc5f5ee1f67822206a5e0442f26a52114cf63f0
2022-03-29 17:28:41 +00:00
Nataniel Borges
786e62ef54 Enable passing shell transition tests
- App close: with home / with back
- Launch app: cold / warm / from overview
- Bubbles: expand / launch / dismiss

Bug: 214452854
Bug: 213852103
Bug: 219690120
Bug: 217777115
Bug: 205288792
Fixes: 219693385
Fixes: 219688533
Fixes: 218604389
Test: atest FlickerTests:com.android.server.wm.flicker.close
Change-Id: Ib9b290baac911d42fdc8ac87755fd8df98fdb272
2022-03-29 16:46:15 +00:00
Nataniel Borges
9b6e35749e Wait for correct surface to disappear on transition
Waiting for the wrong surface makes the transition crash

Fixes: 227308870
Test: atest ExitPipViaExpandButtonClickTest
Change-Id: I3be2da3c344301586cc61201b962ffce3937e77d
2022-03-29 13:40:34 +00:00
Jerry Chang
64d76ce090 Merge changes from topic "splitscreen_singletop" into tm-dev
* changes:
  Consolidate split screen rotation in shell transition
  Add a single-top root task for split screen
2022-03-29 02:13:29 +00:00
Vadim Caen
09f7f6f69b Merge changes from topic "presubmit-am-b87ddd3bbf2947f1aa639cddcee6ecb8" into tm-dev
* changes:
  Remove callback before WindowState removal
  Improve startBackNavigation stability
2022-03-28 18:53:26 +00:00
TreeHugger Robot
3ab801d3ca Merge "Introduce TaskView.setObscuredTouchRegion." into tm-dev 2022-03-26 02:04:15 +00:00
Jerry Chang
31838fb8dd Consolidate split screen rotation in shell transition
1. Prevent updating split layout twice during rotation with
   configuration changed. If the only difference is orientation, it
   means we've handled bounds changes for rotation before, the only
   thing thing left is to make sure divider bar will be rendered
   with proper resources that matching with the new orientation.

2. When handling child task changes, make sure to also update crop if
   it's not sharing the same bounds with its parent.

3. Also exclude adjusting bounds of tasks created-by-organizer while
   display changed, since the organizer created them should handle
   that instead. This is needed to prevent their bounds being rotated
   twice in organizer and wm-core.

Bug: 207185041
Bug: 206487881
Test: atest WMShellUnitTests
Test: enable shell-transition, enter split screen, check the rotation
      behavior of split screen.
Change-Id: I63e4a8566bdc4f3fcad7d4bae59fa23ad03929ac
2022-03-25 06:12:16 +00:00
Jerry Chang
d6b42472ea Add a single-top root task for split screen
Make direct children of a created-by-organizer task organizable.
Add a single-top root task which the split divider bar can attach to. So
we can remove the special logic of the divider bar z-ordering in the
followup patch.

Bug: 207185041
Fix: 215322621
Test: atest ZOrderingTests
Test: atest com.android.wm.shell.splitscreen
Test: manual check the divider bar z-order setup with pip window and
      assistant voice plate
Change-Id: Ia36d7529ef52685be4516b6f6ea5d7179fc26fd6
2022-03-25 00:58:09 +00:00
Vadim Caen
6a074eca5c Improve startBackNavigation stability
- Use the focused window instead of the topApp window
    - Instead we now rely on WindowManagerService to get
     the focused window.
    - SystemUI does not have ActivityRecord so we can't rely
     on the top window of the Task to find the correct
      window on which the callback will be called.

  - Introduce a Builder for BackNavigationInfo
    - This reduces the number of variable needed outside the synchonized
    block.
    - It also reduces the number of early return of BackNavigationInfo
    instances

  - Adding log messages to help further debug the method.

Test: BackNavigationControllerTests
Test: Manual dismiss of SystemUi dialog in QS
Bug: 216604581
Fixes: 221458292
Change-Id: I9ba2c7f89956f34d6338824502c210b3e58dc076

Introduce builder for BackNavigationInfo

Change-Id: I14b4a4b3abc8f417998b7b32831cb3d5c4faa491
2022-03-24 14:14:26 +01:00
Mateusz Cicheński
8b9c15bd73 Pass the keep clear areas through proper implementation. The PipController is not registered as DisplayWindowListener, but this inner implementation is.
Bug: 183746978
Test: atest PipControllerTest, manually via extra log statement I noticed it's not being receiving the keep clear areas changes
Change-Id: Iaae4aad3dfd1dd5a5dbab79f91efab3d52b94f80
2022-03-24 01:29:24 +00:00
Nataniel Borges
e08000c02d Merge "Allow LaunchBubble app to be launcher from launcher" into tm-dev 2022-03-23 17:47:26 +00:00
Yuncheol Heo
2bb65a2c92 Introduce TaskView.setObscuredTouchRegion.
- We have the existing api TaskView.setObsucredTouchRect(), but introduce new api to provide more flexibility.
- go/aaos-taskview-improvements

Bug: 225388469
Test: Check the behavior in the sample app with 2 buttons.
Change-Id: I3db7fcc45b73523fb17039f5a88d015cefce4819
2022-03-22 21:29:42 -07:00
Mateusz Cicheński
a6ac70eddf Pass the keep clear areas to PipBoundsState.
Bug: 183746978
Test: atest PipControllerTest
Change-Id: Ic1cfe6e51298f172a09d3ab31dd599b7002e99b7
2022-03-22 17:36:48 +00:00
Tom Natan
87de67b69e Merge "[19/n] Letterbox Education: fix multi-user preference key" into tm-dev 2022-03-22 04:19:30 +00:00
tomnatan
f94b460fda [19/n] Letterbox Education: fix multi-user preference key
TaskInfo#userId should be used instead of Context#getUserId because the
latter isn't correct following user switch.

In addition, don't mark the education as seen for the current user until
the dialog enter animation is done, to make sure the dialog is fully
visible to the user.

Fix: 225840105
Test: atest WMShellUnitTests:LetterboxEduWindowManagerTest
Change-Id: Ic99c59bc866735bdc1420513f7a3eade4253e391
2022-03-21 17:42:34 +00:00
tomnatan
7ce3e6a5a4 Fix issue where KidsModeTaskOrganizer registers itself as CompatUICallback
This results in the compat UI clicks reaching KidsModeTaskOrganizer instead of ShellTaskOrganizer.

Test: tested manually
Fix: 225137584
Change-Id: I1c79dd400810cc31c1d0f938887e45ab11ecf6fa
2022-03-19 00:08:25 +00:00
Tom Natan
5059dbde7b Merge "[18/n] Letterbox Education: start dialog enter animation after all shell transitions have finished" into tm-dev 2022-03-16 00:26:02 +00:00
tomnatan
dc3dac34bd [18/n] Letterbox Education: start dialog enter animation after all shell transitions have finished
Fix: 219499529
Test: atest WMShellUnitTests:LetterboxEduWindowManagerTest
Test: atest WMShellUnitTests:CompatUIControllerTest
Test: atest WMShellUnitTests:ShellTransitionTests
Change-Id: Ifa7ab82c6fa076fbb054b8d370a244e7e8738b0b
2022-03-15 18:05:38 +00:00
Tony Huang
d5cdea4800 Merge "Fix divider disappear when rotation on shell transition" into tm-dev 2022-03-15 07:25:57 +00:00
Shan Huang
0e9d709e2f Implement back to launcher animation from shell and WM animation
controllers.

Test: m -j.
Test: Open and swipe back on pre-T and T apps.
Test: atest BackNavigationControllerTests
Test: atest BackAnimationControllerTest
Bug: 195946584

Change-Id: I981f8deff9fad75355ee0e8bbe08b375f4da6e74
2022-03-14 23:12:41 +00:00
Tony Huang
dd637175b1 Fix divider disappear when rotation on shell transition
When rotation, it will re-init the split divider for new rotation on
DAinfoChanged callback, but when shell transition, we should do it on
startAnimation to make transition smooth and make didider could release
by specfic Transcation to avoid it hide immediately but didn't sync with
transition.

Fix: 222158856
Test: manual
Test: pass existing tests
Change-Id: I797ffd0ea35d89b4ec1e3ef4828ce36e18c860be
2022-03-14 04:02:01 +00:00
Pablo Gamito
633398fe8c Merge "Promote stable flicker tests" into tm-dev 2022-03-10 18:30:39 +00:00
Pablo Gamito
19caa1d7d8 Promote stable flicker tests
Change-Id: Ibdb17efe85a8a6cb8da16d96c1658720f53bd671
2022-03-10 11:28:41 +00:00