Commit Graph

3934 Commits

Author SHA1 Message Date
Colin Cross
9a92d62767 Merge "Add kotlin-annotations to WindowManager-Shell" am: b8e11a0afd am: 21b19f0f4f am: 3ba75e7300
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2031024

Change-Id: I378d8f29f6a8686f505ea5f46bad880bb5c05caf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 15:30:07 +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
Sebastián Franco
97a605b1d1 Merge "Brighten theme-icons when in Dark mode and add dark color for taskbar" into tm-dev 2022-03-29 00:00:33 +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
Colin Cross
3ba75e7300 Merge "Add kotlin-annotations to WindowManager-Shell" am: b8e11a0afd am: 21b19f0f4f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2031024

Change-Id: I740e4f08d4eba1b0488c0218044024a5ad591ae1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-28 18:47:12 +00:00
Colin Cross
b8e11a0afd Merge "Add kotlin-annotations to WindowManager-Shell" 2022-03-28 18:07:14 +00:00
TreeHugger Robot
7436573ad9 Merge changes from topic "presubmit-am-14c0d0dd1ab9408c8fbd89013e2295b5" into tm-dev
* 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
2022-03-28 11:26:31 +00:00
Tony Huang
50faf89e94 Merge "Fix NPE when rotation after split dismissed" into tm-dev 2022-03-28 09:41:26 +00:00
Treehugger Robot
952326b9cf Merge "Import translations. DO NOT MERGE ANYWHERE" 2022-03-28 06:29:55 +00:00
Bill Yi
cf26612579 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ia6249741219e3c3890c1dd2c04edc30a4a5c5f83
2022-03-27 02:21:49 +00:00
Bill Yi
541d27c599 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I881eb98e260fed0895bb7748083c2726435c5c07
2022-03-27 02:20:26 +00:00
Tiger Huang
5b19a1584a Merge "Send InsetsState to the client via IWindow#resized" into tm-dev 2022-03-26 03:50:44 +00:00
TreeHugger Robot
3ab801d3ca Merge "Introduce TaskView.setObscuredTouchRegion." into tm-dev 2022-03-26 02:04:15 +00:00
Mady Mellor
e8756a5689 Merge "Make sure to update the manage button click listener after rotation" into tm-dev 2022-03-25 17:03:43 +00:00
Jacqueline Bronger
04fcd21d6c Fix NPE when PiP actions, but no close action set
Bug: 226566586
Fixes: 226566586
Test: manual

Change-Id: Ia7343c994a08fa3eba90decee83d65a0e91c43fe
2022-03-25 13:59:51 +01:00
Jacqueline Bronger
b258b21892 Fix gravity issue when enabling expanded PiP (TV)
Bug: 226570096
Fixes: 226570096
Test: manual - open expanded PiP, close PiP, open regular PiP, add
expanded aspect ratio to the PiP

Change-Id: I951db94a23ee1c885dfa508ea02f1329f604742e
2022-03-25 13:59:32 +01:00
Tony Huang
b5594c6538 Fix NPE when rotation after split dismissed
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
2022-03-25 19:16:02 +08:00
Jacqueline Bronger
84dedaffac Fix orientation change between PiPs when collapsed
Bug: 226571625
Fixes: 226571625
Test: manual - open vertical expanded PiP, close PiP, open horizontal
expanded PiP

Change-Id: I574e53d496b9b03539970f380b4ee1a5ec5d36fc
2022-03-25 11:59:37 +01: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
Tiger Huang
bc1d8093db Send InsetsState to the client via IWindow#resized
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
2022-03-25 12:39:18 +08: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
Mady Mellor
d7cd8499e9 Make sure to update the manage button click listener after rotation
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
2022-03-24 22:52:07 +00:00
Mady Mellor
dbb792733d Merge "Fix bubbles IME alignment on tablet" into tm-dev 2022-03-24 21:38:18 +00:00
Colin Cross
4a26fe8119 Add kotlin-annotations to WindowManager-Shell
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
2022-03-24 17:44:40 +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
Hongwei Wang
4b1f6bbae3 Merge "Add IPipAnimationListener#onExpandPip" into tm-dev 2022-03-23 22:39:30 +00:00
Mady Mellor
020aa38488 Fix bubbles IME alignment on tablet
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
2022-03-23 19:16:01 +00:00
Mady Mellor
4db1adb65e Merge "Fix an issue where stack education and the stack weren't aligned" into tm-dev 2022-03-23 18:27:38 +00:00
Mady Mellor
139a3c1803 Merge "Adjust the sizes of user education for large screens / landscape" into tm-dev 2022-03-23 18:25:45 +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
Tony Huang
56c6199477 Merge "Implement fade animation on SplitDecorManager" into tm-dev 2022-03-23 06:45:09 +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
86f4c7710d Merge "Pass the keep clear areas to PipBoundsState." into tm-dev 2022-03-23 03:31:03 +00:00
Hongwei Wang
bddc58e3bc Add IPipAnimationListener#onExpandPip
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
2022-03-22 18:34:59 -07:00
Jerry Chang
f3de3fee6b Merge "Consolidate split layout adjust animation for showing IME panel" into tm-dev 2022-03-23 00:48:06 +00:00
Evan Rosky
d5826ea531 Merge "Sync PiP WM bounds to rotation immediately for fade-in" into tm-dev 2022-03-22 21:09:35 +00:00
Mady Mellor
50ee3ce879 Fix an issue where stack education and the stack weren't aligned
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
2022-03-22 18:50:22 +00:00
Mady Mellor
9052b5c2fe Adjust the sizes of user education for large screens / landscape
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
2022-03-22 18:50:08 +00: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
Sergey Serokurov
493666178c Merge "Set Manage button click listener using postDelayed" into tm-dev 2022-03-22 15:55:50 +00:00
TreeHugger Robot
8bd2541e6e Merge "Deprecating windowSplashScreenAnimationDuration attr." into tm-dev 2022-03-22 14:23:31 +00:00
Pablo Gamito
7fb9397972 Merge "Undeprecate animation background color" into tm-dev 2022-03-22 13:48:12 +00:00
Jacqueline Bronger
c037af53ba Merge changes from topics "presubmit-am-1325d67a7f674ca38123dd172960bc6f", "presubmit-am-ffd5cd4e8da74d618406f2c336a0d70d" into tm-dev
* changes:
  Add broadcast receiver to toggle expanded PiP (TV)
  Add broadcast receiver to open PiP move menu on TV
2022-03-22 13:33:35 +00:00
Tony Huang
d76637e8fd Implement fade animation on SplitDecorManager
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
2022-03-22 16:46:02 +08: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
Sergey Serokurov
7fcda60a99 Set Manage button click listener using postDelayed
Bug: 223901921
Test: manual
Change-Id: If4db2a7872ead26cfd02a3e8f5f752cb6f111503
2022-03-21 12:53:07 -07: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
Jacqueline Bronger
3c5b9738c7 Merge "Implement custom PiP close action on TV." into tm-dev 2022-03-21 07:56:37 +00:00
Tiger Huang
3e194cc9fa Push drag-resize mode to the client
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
2022-03-20 14:36:19 +08:00