Commit Graph

3949 Commits

Author SHA1 Message Date
Jerry Chang
c3cd94f727 Merge "Make sure to release split layout when returning to home" into tm-dev 2022-03-31 00:37:38 +00:00
Hongwei Wang
b68626be54 Merge "Deprecate getSfInstance usage in PiP component" into tm-dev 2022-03-31 00:12:04 +00:00
Wei Sheng Shih
91da83b715 Merge "Use WeakReference for the TaskSnapshotWindow in inner Window." into tm-dev 2022-03-30 23:59:22 +00:00
Mady Mellor
8649b5088a Merge "Use KeyguardStateController to listen for unlocked shade state" into tm-dev 2022-03-30 23:03:18 +00:00
Hongwei Wang
b2a5b198cd Merge "Handle PiP shadow radius in WMShell" into tm-dev 2022-03-30 22:23:51 +00:00
Hongwei Wang
74092d1e49 Deprecate getSfInstance usage in PiP component
- Deprecated also the custom animation handler in PhysicsAnimator
- Ensures the transactions within PiP have VsyncId being set

Bug: 222697646
Test: verify PiP functionalities still work
Change-Id: Ib9a9bab2ffdc11b887271f4a05ee9953865db8b1
2022-03-30 12:50:54 -07: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
Jerry Chang
b3d0379faa Make sure to release split layout when returning to home
When returning to home from recent apps, the splitting tasks were
already hidden while performing the recent transition, so dismiss split
screen directly without requesting dismiss transition. Also reorder to
make sure it collects all clean-up operations before finishing the
transition.

Fix: 226682648
Bug: 206487881
Test: verify with the repro steps of the bug
Change-Id: I05e7ae6fa26631203d652ccb532fb57f532794d7
2022-03-30 06:52:18 +00:00
Mady Mellor
bd04e7d58f Use KeyguardStateController to listen for unlocked shade state
Using keyguard state controller allows us to check the occlusion
state and hide / show based on that as well.

Test: manual - have screensaver turn on and ensure bubbles are hidden
Test: atest BubblesTest NewNotifPipelineBubblesTest
Bug: 223913857
Change-Id: I29992ed76c7cdd4e99b4920849c143f6520f9c42
2022-03-30 00:24:40 +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
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
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
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
Hongwei Wang
2708c3a74d Handle PiP shadow radius in WMShell
Deprecate also the shadow radius for PiP in Task

Bug: 206508708
Test: Verify the PiP enter/exit/move/resize transitions
Change-Id: I8ff83dd4e626a3455373fed6c908cf131ecae8fe
2022-03-28 16:43:46 -07: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
wilsonshih
c8da7519c5 Use WeakReference for the TaskSnapshotWindow in inner Window.
Use WeakReference for the TaskSnapshotWindow so it can be clear at GC.
Also clear the TaskSnapshotWindow reference in
mStartingWindowRecords since it should be removed immediately.

Still observer the native Binder reference could hold the reference to
the TaskSnapshotWindow$Window object, from the local test it can be
released after force GC(need to trigger on system_server and systemUI).
So at least with this patch, TaskSnapshotWindow object can be released
immediately.

Bug: 225363815
Test: open several tasksnapshot starting window, verify the memory can
be released on perfetto.
Test: atest TaskSnapshotWindowTest StartingSurfaceDrawerTests

Change-Id: Iaa0a266c2c6756cef24d92cde57a6debc947e133
2022-03-28 12:18:48 +08: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