16707 Commits

Author SHA1 Message Date
Chris Li
cbc449164b Merge "Register remote animation per Task" into tm-dev 2022-04-02 10:36:24 +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
TreeHugger Robot
c5866bede0 Merge "Re-deprecate animation backgroundColor API" into tm-dev 2022-04-01 11:48:52 +00:00
Tony Huang
86aff45356 Merge "Reduce flicker when resize animation" into tm-dev 2022-04-01 10:10:06 +00:00
Vadim Caen
87a1c2dd46 Merge "Ensure no animation is run except for HOME" into tm-dev 2022-04-01 09:23:26 +00:00
Nick Chameyev
a830367d97 Merge "Migrate unfold animation to Shell transitions [Part 1]" into tm-dev 2022-04-01 09:13:09 +00:00
Chris Li
add68184dd Register remote animation per Task
Before, we register remote animation per organizer, and assume it only
organizes in one Task. Now, we register per organizer Task if there is a
rule that supports split in the Task width.

Bug: 207720388
Test: atest WMJetpackUnitTests
Change-Id: Iac4e10af9aa0e7846c81b036b2cf708b6cbe627e
2022-04-01 16:47:46 +08:00
Pablo Gamito
2b770a7e86 Re-deprecate animation backgroundColor API
It's prefered to keep the API deprecated since the API was previously
deprecated and made a noop. Undeprecating it would lead to inconsistent
behavior across android versions. With the API not working on some
versions which can easily look like a bug from a developer's
perspective.

Instead we create a new API for the animation background effect refering
to an animation backdrop instead of a background. This also required
updating other API references of background in this context to backdrop.

Bug: 226122431
Test: atest CtsWindowManagerDeviceTestCases:ActivityTransitionTests

Merged-In: I4493d22a33606d639d498b6dc0f6f1bfa3d7f135
Change-Id: I4493d22a33606d639d498b6dc0f6f1bfa3d7f135
2022-03-31 23:27:01 +00:00
Hongwei Wang
901e20fdf0 Merge "Do not set shadow when leaving PiP mode" into tm-dev 2022-03-31 23:19:32 +00:00
Hongwei Wang
b1ffb7953c Do not set shadow when leaving PiP mode
Regression from ag/17456722 that setting the shadow radius when leaving
away from PiP would result in screen dimming.

Change to apply shadow radius when entering / moving / resizing PiP only

Bug: 227607130
Test: follow the reproduce steps in bug
Change-Id: Ie4d4dba94a1c66da52825798df60ebf3f971aa32
2022-03-31 18:47:52 +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
Nick Chameyev
3f12009a16 Migrate unfold animation to Shell transitions [Part 1]
Adds a trigger to DisplayContent that creates
unfold transition before applying the display size
and marks it as ready when the sizes are applied.

Adds a placeholder animation for fullscreen tasks.

Bug: 204925795
Test: enable shell transitions, open an app, unfold =>
 check that app surface is animated
Change-Id: Ia88178a7c7849a99c17b4d18117a05b2a0fb8b7f
2022-03-31 10:38:56 +00:00
Tony Huang
cfeb154a1b Reduce flicker when resize animation
When resize split, split decor use fade in animation but bottom
larger than bounds area is black, it will make color change from
black to decor background color and it just like flicker.

To avoid this, we should add back using of am#setSplitScreenResizing
which could make black backgound to color similar to app content
background. And it should also reduce flicker while snap divider to
dismiss split.

Bug: 220985951
Bug: 221178408
Test: manual
Test: pass existing tests
Change-Id: I961a4d3ab4f3552fd5ace4b3a6742afa980f073c
2022-03-31 14:47:44 +08:00
Charles Chen
9dc93c7c06 Merge "Make WM Jetpack unit tests mockable" into tm-dev 2022-03-31 03:35:00 +00:00
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
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
Derek Sollenberger
5a79258c64 Merge "Update the global light position based on the rotation of the surface." into tm-dev 2022-03-30 13:17:03 +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
Charles Chen
745801fe80 Make WM Jetpack unit tests mockable
Also adding a test to prove it's usable.

Test: atest SplitControllerTest
Bug: 219652919
Change-Id: I8a01ab0fb7e74739a626624f00a772c136771de7
2022-03-30 06:13:34 +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
Derek Sollenberger
0784f240b8 Update the global light position based on the rotation of the surface.
Vulkan enables clients like HWUI to manage buffer rotation directly, but
in doing so HWUI must transform any point lights so that they end up in
the correct place relative to the display.

Bug: 195934485
Bug: 205493984
Test: atest CtsUiRenderingTestCases
Change-Id: I84b43ad5f422b042c40e89477c31685b7726ce3f
2022-03-28 19:59:42 +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
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