* changes:
Fix NPE when PiP actions, but no close action set
Fix gravity issue when enabling expanded PiP (TV)
Fix orientation change between PiPs when collapsed
Bug: 226570096
Fixes: 226570096
Test: manual - open expanded PiP, close PiP, open regular PiP, add
expanded aspect ratio to the PiP
Change-Id: I951db94a23ee1c885dfa508ea02f1329f604742e
Because drag to dismissed will not call SplitDecorManager#onResized
so mShown status will be wrong. Reset some flag in release and also
add some null check to avoid NPE.
Also refine some function params and naming to avoid confuse.
Fix: 226551765
Test: follow bug repro step and check no NPE
Test: pass existing tests
Change-Id: Ife592e176ef67c5df79be0a81509531ffcbd1b39
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
In some cases, the InsetsState and the window frame can be changed at
the same time (such as orientation changed). Reporting them separately
might produce incorrect insets.
When the window layout is moved to the client, it uses the configuration
and the InsetsState to compute the window frame. They need to be
reported together as well.
Bug: 161810301
Bug: 160732586
Test: atest ActivityRecordTests WindowStateTests
Test: Add logs to check if we dispatch the correct insets to apps while
rotating the display.
Change-Id: I5c9f628eda40932def97c5caf968cb62db128e80
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
The view gets recreated so the listener needs to be reapplied.
Test: manual - expand bubble stack
- rotate device
- make sure manage button works
- repeat but rather than rotate, fold / unfold
Bug: 206086337
Change-Id: Iedcf39613a9696f41a4f9f11f760e4b55beb61aa
Soong normally adds kotlin-annotations as a dependency to any module
that uses kotlin sources, but it can't find the kotlin sources in
WindowManager-Shell because they are all in a filegroup. Add it
manually as a workaround.
Bug: 225013372
Test: m checkbuild
Change-Id: I3b61702b13ae72d4cb20620dfbf9707f4b8aaaaa
- 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
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
There was a mistake in the math here, instead of using the y location
of the top of the IME, it was just using the height of the IME in
the calculation. This caused the bubbles to move out of the way
of the IME in tablet portrait when they didn't actually have to move.
This also impacted tablet landscape causing the bubbles to NOT move
out of the way of the IME when they should.
Test: manual - have bubbles on tablet in portrait and have the IME
show, bubbles should only move if the IME would
overlap with them.
- have 5 bubbles on tablet in landscape and have the IME
show, bubbles should move above the IME as much as
they can without going past the top of the expanded
view.
Bug: 223912157
Bug: 215063840
Change-Id: Ifd763caef6c521b1083757cade2898b1361198cd
- 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
This signals Launcher when user leaves PiP mode by tapping on the
expand button in PiP window. Launcher can use signal, for instance, to
hide the Taskbar to avoid flicker when the app settles in full-screen mode.
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dIgvinb9yEB8MYfYDx0Ijy
Bug: 218450853
Test: see video
Change-Id: I0e9882324daa6dc419ad2746312a22a0c8721ff4
On rotation the stack position is updated using the relative stack
position based on the last resting position. This doesn't work well
with the user education which relies on the stack being in the
"default" position & updating to the relative position clobbers this.
This change updates it so that:
1 - when the stack user education is shown it always updates the
stack to be in the default position
2 - if stack user education is showing, don't set the stack position
Bug: 223635730
Test: manual - rotate device with stack user education showing and
make sure the stack is aligned with the education view
Change-Id: I232227aed29ceef060883ed60ed02563093a9bbb
When the stack is expanded on large screen devices, the bubbles are
inset from the edge of the screen. Due to this the rounded corner
on the user education view for the manage button is kinda squished
with the text. To make this look better, increase the width of this
user education view when on large screens. Use this value for
landscape on phone as well because we were doing match parent in
that scenario and it looks bad.
Additionally, on all form factors, increase the padding at the end
of the view. This makes it look a little better especially for
languages where the words can be long.
Bug: 223635730
Test: visual - force user education to show for bubbles, take a look
at how the stack & manage user education views look
on tablet and phone (in landscape and portrait).
Change-Id: I7bcdfff7341b8c6acad0f6f5fdcbc7fd24aa4627
Implement fade animation on it and follow-up to new design that
only show decor on lager side.
Bug: 220985951
Test: manual
Test: pass existing tests
Change-Id: Ifa3487075ffcfb2041c94a9435e27d4aca500842
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
The goal of this CL is to remove RELAYOUT_RES_DRAG_RESIZING_DOCKED and
RELAYOUT_RES_DRAG_RESIZING_FREEFORM, which is a step to make relayout an
oneway binder call.
When the resize mode is changed at the server side, the server will send
the new mode to the client via IWindow#resized, so the client doesn't
need to obtain the resize mode from the flags returned from relayout.
Bug: 161810301
Test: Perform drag-resize and drag-move on a freeform task and see if
there is any unexpected behavior.
Change-Id: I450abc113932b6c1dc0ce0e2b76bebdf85a60777