Commit Graph

1031 Commits

Author SHA1 Message Date
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
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
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
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
Robert Horvath
3f574e253e Merge "Move TV PiP away from keep clear areas" into tm-dev 2022-03-09 09:14:54 +00:00
Shawn Lin
bf8b8621ad Merge "Exclude nav bar area from apps bounds when in kids mode" into tm-dev 2022-03-09 06:18:00 +00:00
Evan Rosky
10dc2271c1 Merge "move shell_transit sysprop to persist.wm" into tm-dev 2022-03-08 19:34:01 +00:00
Robert Horvath
c4f571a27e Move TV PiP away from keep clear areas
The PiP is placed in a way to avoid keep clear areas.
If no areas overlapping the default PiP anchor position are defined,
the PiP will stay at its anchor position.
Otherwise, it will try to move to a free location closest to its anchor
position. Unrestricted areas can cause the PiP to move across the entire
screen, but restricted areas have limited influence and can only move
the PiP a short distance.
If no free position is found, the PiP will be stashed for some time.
To find the position to move to once the PiP unstashes, a relaxed search
is performed, excluding a restricted keep clear area. If this still does
not yield a position to move to, only unrestricted areas will be taken
into account. The PiP is stashed along the edge closest to the unstash
position.

Bug: 218416347
Bug: 218494300
Test: atest TvPipKeepClearAlgorithmTest
Change-Id: I76c6527320fc403bb604b188f38eed505eeaab89
2022-03-08 18:23:16 +01:00
shawnlin
10d7cb3c0f Exclude nav bar area from apps bounds when in kids mode
GKS requested that app's bounds should not overlap with the nav bar area
when kids mode is enabled except for Launcher.

Creates a dedicate task organizer for kids mode. When kids mode is
enabled, create a root task with its bounds excluding the nav bar area
and tasks except launcher will be launched into it.

Bug: 161689887
Test: manual:
      1. adb shell settings put secure "nav_bar_force_visible" "1"
      2. choose 3-buttons navigation mode in
         Settings>System>Gestures>System navigation
      3. check winscope and see if bounds are set correctly
Test: atest KidsModeTaskOrganizerTest
Test: atest WindowOrganizerTests

Change-Id: I93af1bc5b2696654d8ca5055dbbbebf5a41f89aa
2022-03-08 16:00:22 +08:00
Hongwei Wang
6bafc9804c Merge "Cleanup LegacySplitScreen usage in PiP" into tm-dev 2022-03-07 18:13:21 +00:00
Tom Natan
687af63e66 Merge "Check if keyguard is showing instead of occluded for compat UI." into tm-dev 2022-03-07 15:35:08 +00:00
Tom Natan
2e12d3499c Merge "[16/n] Letterbox Education: focus on the dialog title for accessibility." into tm-dev 2022-03-07 15:32:28 +00:00
Hongwei Wang
5524cdd990 Cleanup LegacySplitScreen usage in PiP
Bug: 207532012
Test: verify PiP works with new split screen
Change-Id: I457bfc174ddf86f3005a47eb6f45eb926915757c
2022-03-04 16:36:00 -08:00
tomnatan
3beba95ad3 [16/n] Letterbox Education: focus on the dialog title for accessibility.
This will cause talkback to read the title and the rest of the dialog when the user swipes right.

Bug: 222112590
Test: atest WMShellUnitTests:LetterboxEduDialogLayoutTest
Test: atest WMShellUnitTests:LetterboxEduWindowManagerTest
Change-Id: Id850520380144055c9efa95f6006b7b277cf8eb9
2022-03-04 18:48:38 +00:00
tomnatan
7b22430139 Check if keyguard is showing instead of occluded for compat UI.
This fixes an issue where compat UI is hidden even when keyguard is dismissed (but still considered occluded because the activity could occlude the keyguard).

Bug: 206627721
Test: atest SystemUITests:WMShellTest
Test: atest WMShellUnitTests:CompatUIControllerTest
Change-Id: I95f5b4d75d46a4958763c5ea3cdadb09b88f9836
2022-03-04 17:14:31 +00:00
Jerry Chang
16fc7aa4f5 Merge "Fix no touch events on half of the split screen" into tm-dev 2022-03-03 01:21:46 +00:00
Evan Rosky
cf3d0a65a4 move shell_transit sysprop to persist.wm
This way we can use a context that systemui can set via flipper

Bug: 219067621
Test: manual
Change-Id: I29d1c39a1733e4d5f19f7f025e8a2cf2ca4f6d5a
2022-03-02 17:04:32 -08:00
Jerry Chang
5982b80584 Fix no touch events on half of the split screen
Make sure the surface bounds of split root tasks will be properly set
after enabled shell-transition. So client apps can inherit the correct
touch region.

Fix: 222163100
Test: atest StageCoordinatorTests
Test: manual check with the repro steps
Change-Id: I5c71e54513ad37d43347f9716081751aad477149
2022-03-02 11:14:16 +00:00
Jerry Chang
613fbf778c Merge "Update smallestScreenWidthDp when split bounds resized" into tm-dev 2022-03-02 04:31:36 +00:00
Nataniel Borges
78019cb9db Allow LaunchBubble app to be launcher from launcher
Test: install all and check launcher
Change-Id: Ib544248a34bc6fd925b343bff819216cdec15f30
2022-02-24 16:27:25 +01:00
Nataniel Borges
e74d47839a Fix wait condition for SetRequestedOrientationWhilePinnedTest
The setup waited for a ROTATION_0, but this test starts at ROTATION_90

Bug: 219773854
Bug: 220977327
Test: atest WMShellFlickerTests:SetRequestedOrientationWhilePinnedTest
Change-Id: Ib2bde1f66f248adbe69acf5c344322e32b364eb2
2022-02-24 11:24:20 +01:00
Chris Li
1e9ff8eea6 Merge "Fix SetRequestedOrientationWhilePinnedTest with Shell transition" into tm-dev 2022-02-24 00:59:34 +00:00
Mateusz Cicheński
429c0a9769 Merge "Moving the resources related to PiP to the WindowManager/Shell." into tm-dev 2022-02-23 19:49:36 +00:00
Nataniel Borges
7f7b20e086 Merge "Crash test when wait condition not met" into tm-dev 2022-02-23 11:16:52 +00:00
Chris Li
7404ff1182 Fix SetRequestedOrientationWhilePinnedTest with Shell transition
When the windowing mode is changed during fixed rotation, we don't want
to animate to the fixed rotation anymore, because the fixed rotation
will be cancelled later.

Bug: 214324061
Test: atest WMShellFlickerTests:SetRequestedOrientationWhilePinnedTest
Change-Id: I24b5389ec2b6ea28ce3ba7abf38fbd269566edf3
2022-02-23 14:50:01 +08:00