Commit Graph

1141 Commits

Author SHA1 Message Date
TreeHugger Robot
70c1287127 Merge "Modify app expected position base on the drag behavior change" into tm-qpr-dev 2022-05-27 21:39:24 +00:00
Mateusz Cicheński
2542f63ded Merge "Add keep clear area avoidance algorithm for PiP" into tm-qpr-dev 2022-05-27 19:53:42 +00:00
Chilun Huang
31b85ddad7 Modify app expected position base on the drag behavior change
Because ag/18529596 change the drop position, the test need to modify
the expected position of the app.

Bug: 232878493
Test: atest EnterSplitScreenByDragFromAllApps
Change-Id: Ib4823a899aa42ab2c0b23f9e654cbf13becb02bd
2022-05-28 02:24:33 +08:00
TreeHugger Robot
e4d77e2522 Merge "Add assertions for layers become visible" into tm-qpr-dev 2022-05-26 05:56:07 +00:00
Mateusz Cicheński
407ea1ad4f Add keep clear area avoidance algorithm for PiP
The algorithm computes a new position for PiP based on the registered
keep clear areas within the system. If no occlusion happens the original
position is being returned. Otherwise, the bounds are moved in one of the
available directions so that none of the keep clear areas are occluded
while keeping PiP within the display bounds.

Test: atest PipKeepClearAlgorithmTest
Bug: 183746978
Change-Id: Ic2d11861329a46e2da0448f90283f67f6e7125d7
2022-05-25 23:01:54 +00:00
Chilun Huang
6384389786 Add assertions for layers become visible
Add more assertions for layers become visible.

Bug: 232878493
Test: atest EnterSplitScreenByDragFromAllApps

Change-Id: Ida948525b618b800915813cf2927523600e23724
2022-05-25 15:07:28 +08:00
Vadim Caen
21421cd776 DO NOT MERGE Only rely on developer option for back animation am: ab58191c7f am: 1d83999ad0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18310267

Change-Id: I59cdc9e93cce4e8b7cbeaea5f0816d5a78a7d7de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 19:34:50 +00:00
Vadim Caen
1d83999ad0 DO NOT MERGE Only rely on developer option for back animation am: ab58191c7f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18310267

Change-Id: I150be6a4fae771ffe6e841806772aa2218ae871b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 19:32:00 +00:00
Vadim Caen
ab58191c7f DO NOT MERGE Only rely on developer option for back animation
BackNavigationController was still relying on a debug setting. Now the
animation request is handled via a boolean parameter passed by sysui,
which has access to the developer option.

Test: Existing test modified
Bug: 231502692
Change-Id: Icda4692e05396407d961610de0ce709492adadc1
Merged-In: Icda4692e05396407d961610de0ce709492adadc1
2022-05-23 10:43:04 +00:00
TreeHugger Robot
611e9ca2fa Merge "Create flicker tests for split screen" into tm-qpr-dev 2022-05-19 03:50:07 +00:00
Ben Lin
8f049afdf4 Merge "Apply PiP Params if there was a deferred info." into tm-dev am: 26b096d288 am: 2bbd40e21b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18380631

Change-Id: I260e95b48c681eb89929b05421286f5cdd8f66fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:48:20 +00:00
Mady Mellor
4e4780bef5 Merge "Fix potential NPE & clean up some logic" into tm-dev am: 5126e8b1b5 am: 7d2923a911
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18421368

Change-Id: I9436983ccb31fcefcb82b68bdf6178274f6f4091
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:01:56 +00:00
Alex Johnston
00090b1d4a Merge "Add background protection when work biometrics is shown" into tm-dev am: ed00c662dc am: 9eeb0112fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18351382

Change-Id: Ic48ca6f44aabcb4cc02ac03dc656603f8e8a3c4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:00:03 +00:00
Mady Mellor
2a40a813db Merge "When a user is removed make sure we remove their persisted bubbles" into tm-dev am: f0f1105de7 am: dd7397e3d5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18153123

Change-Id: Ia9cb0ff9d31de4ba8d5fbc1d2227319ad45eeb4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:54:49 +00:00
Shan Huang
f0712948d3 Merge "Add missing @Test annotation to ignoresGesture_transitionInProgress" into tm-dev am: 308f9bfa58 am: 8efc556da6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18407083

Change-Id: I24b15d7581da7864681a10dfc4b1a6cdfeb591f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:53:10 +00:00
Shan Huang
87370813e4 Merge "Fix broken animation on two consecutive swipes." into tm-dev am: 8a91edd4a3 am: 1d57848828
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17963879

Change-Id: Iebe3b12e42187ca004384938826f489aba5565b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:49:44 +00:00
Ben Lin
26b096d288 Merge "Apply PiP Params if there was a deferred info." into tm-dev 2022-05-18 18:02:09 +00:00
Chilun Huang
97db297984 Create flicker tests for split screen
Create the base split screen flicker test and the CUJ of entering split
by dragging from all apps.

Bug: 231399426
Bug: 232878493
Test: atest EnterSplitScreenByDragFromAllApps
Change-Id: Ic684474457f5da28554ff801f3e03d585e8db9fb
2022-05-18 17:22:52 +00:00
Mady Mellor
5126e8b1b5 Merge "Fix potential NPE & clean up some logic" into tm-dev 2022-05-17 16:50:10 +00:00
Alex Johnston
ed00c662dc Merge "Add background protection when work biometrics is shown" into tm-dev 2022-05-17 16:35:37 +00:00
Mady Mellor
185782ddbc Fix potential NPE & clean up some logic
- I had accidentally swapped the values in removeBubblesForUser
  in one place which could lead to a crash, it's actually simpler
  to just do the removal there since it's the parentUser that was
  removed so we can remove all of those entries.
- In other places I've added a null check before performing the
  removeIf to be safe
- Added a test checking bad input

Bug: 232847471
Test: atest BubbleVolatileRepositoryTest
Change-Id: I10f5b24e591db62edbb63ad40e588ba19ab621c1
2022-05-17 00:21:44 +00:00
Mady Mellor
f0f1105de7 Merge "When a user is removed make sure we remove their persisted bubbles" into tm-dev 2022-05-16 22:12:56 +00:00
Shan Huang
4b016bd6eb Add missing @Test annotation to ignoresGesture_transitionInProgress
Test: m -j
Test: atest BackAnimationControllerTest#ignoresGesture_transitionInProgress
Bug: 232793611

Merged-In: I1738b40c8df1c9af7bb0e63586cb2e70b3c9e8ca
Change-Id: I1738b40c8df1c9af7bb0e63586cb2e70b3c9e8ca
2022-05-16 21:00:20 +00:00
Mady Mellor
08a4570f32 When a user is removed make sure we remove their persisted bubbles
- Update the NotificationLockscreenUserManager code to listen for
  account removals and notify the new listener method onUserRemoved
- Use this to trigger removals in the bubble data repository / UI

Some users may have a parent user (e.g. work profile can belong to
a parent user). We store persisted bubbles under the parent user and
have a separate field for the specific bubble user. To support this,
I pass the parent of the removed user.

Test: atest BubbleVolatileRepositoryTest BubbleDataTest
Bug: 218525763
Change-Id: Ia147cbac15ebce70bbbcc52926089f33901a99dc
Merged-In: Ia147cbac15ebce70bbbcc52926089f33901a99dc
2022-05-16 18:36:49 +00:00
Shan Huang
8a91edd4a3 Merge "Fix broken animation on two consecutive swipes." into tm-dev 2022-05-16 15:16:02 +00:00
Alex Johnston
b3aa96f89f Add background protection when work biometrics is shown
* Remove existing coloured background.
* Add a background with a layout that includes a
  badged icon of the app being opened.

Manual testing steps:
* Set up device with a work profile using TestDPC
* Set a fingerprint in the work profile
* Open a work app
* Lock the device
* Verify the background protection is shown behind
  the biometric prompt

Screenshots:
* Dark mode: https://screenshot.googleplex.com/3SwGWrBREYoZFaH
* Light mode: https://screenshot.googleplex.com/8bzX9wLoFGJ2ado

Bug: 206761107
Test: Manual testing
    WorkLockActivityControllerTest
    TaskStackListenerImplTest
Change-Id: I90d117a97d7457a3186953c16db8bd0bbac048ed
2022-05-16 14:20:56 +01:00
Shan Huang
e8f9151270 Fix broken animation on two consecutive swipes.
The bug is caused by allowing a second swipe to restart animation in
BackAnimationController. This CL adds a flag to reject incoming gestures
when an uninterruptable transition (e.g. commit transition, cancel
transition) is already in progress.

To prevent an unfinished transition from failing all future swipes, this CL also introduces a timeout mechanism to start accepting gesture again after a fixed period.

Bug: 221394367
Test: Do two quick consecutive swipes and observe the back to home
animation.

Merged-In: Ib969afb72cc15bd268613546f3495008b6bc9125
Change-Id: Ib969afb72cc15bd268613546f3495008b6bc9125
2022-05-15 23:30:33 +00:00
Ben Lin
efd8255419 Apply PiP Params if there was a deferred info.
If there was a deferred info, that means PiP params was saved but not
applied earlier. Force apply it.

Bug: 232104080
Test: Double tap on YouTube after exiting earlier Map PiP, aspect ratio
is correct

Change-Id: I52e9f38d4a923fdfee06e7ff37eb61a599caba04
2022-05-13 14:35:26 -07:00
Ats Jenk
d8aa1c3119 Animation for bubbles home gesture
Move bubbles expanded view up when user is performing the home gesture.
This gives immediate visual feedback to the user when swiping up to
collapse the expanded bubble.
Updating the expanded view collapse animation so that it works well
together with swipe up gesture.

Bug: 170163464
Test: atest PlatformScenarioTests:android.platform.test.scenario.sysui.bubble
Test: atest frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles
Change-Id: I834ef8de73dc4f9682583fa727ef42db21c19a7f
2022-05-12 13:13:35 -07:00
Nick Chameyev
343260adfa Merge "Synchronize display change with the Shell" into tm-qpr-dev 2022-05-12 16:55:06 +00:00
Tony Huang
d24e07e3b1 Merge "Remove App pairs related codes and files" into tm-qpr-dev 2022-05-12 07:03:37 +00:00
Robert Horvath
f8f41e3863 Merge changes I49d32c18,I8e8736fc into tm-dev am: d338520c9f am: e5c06176f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18142263

Change-Id: I6585db1259a55782eb5a535dd655b2189b61d8bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:49:27 +00:00
Robert Horvath
d338520c9f Merge changes I49d32c18,I8e8736fc into tm-dev
* changes:
  Apply temporary PiP decor separately from overall placement
  Debounce TV PiP movements
2022-05-11 07:59:53 +00:00
Nick Chameyev
0e1d4e23cb Synchronize display change with the Shell
This CL adds synchronization of applying of the window
container transaction with split-screen layout changes after
the display size change. This is needed for the unfold
animation to have the split screen layout ready
for the first frame of the unfold animation on foldable
devices.

The flow is similar to the display rotation synchonization,
now it is triggered on both physical display change and
rotation.

Bug: 204925795
Test: folding/unfolding, rotating with a split layout
  when Shell transitions enabled/disabled
Change-Id: I30f391dae69cf38768daf49361660d87165f886d
2022-05-10 09:50:34 +00:00
Tony Huang
c3565a503d Merge "Clean up the legacy split screen (9/n)" into tm-qpr-dev 2022-05-10 04:03:06 +00:00
Jerry Chang
98aed8d834 Merge "Consolidate animation to show divider bar" into tm-dev am: 56043e3d57 am: 1d0a63f685
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18157809

Change-Id: I4a9eadfb3e3349a47bead097502915bc425fe6fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 15:22:23 +00:00
Jerry Chang
56043e3d57 Merge "Consolidate animation to show divider bar" into tm-dev 2022-05-09 10:57:02 +00:00
Tony Huang
aea80e8de7 Remove App pairs related codes and files
Bug: 199236198
Test: build pass
Test: pass existing tests
Ignore-AOSP-First: remove whole folder
Change-Id: Iebd8803f53f1106d1b2df306ac239ad8c3765802
2022-05-09 13:59:17 +08:00
Tony Huang
103f4a9673 Clean up the legacy split screen (9/n)
This should be final clean patch, remove legacy split screen
package and its windowing modes

Bug: 199236198
Test: build pass
Test: pass existing tests
Ignore-AOSP-First: remove whole package
Change-Id: Ib2af42834938032bf525b8c16b1046b4c898b8d5
2022-05-09 13:59:13 +08:00
Jerry Chang
010ce715e4 Consolidate animation to show divider bar
Add a fade-in animation for showing the divider bar. And make sure it
animates in-sync with task bar by deferring the fade-in animation until
keyguard dismissed.

When quickswitch or overview switch back to a split pair, the launch
split tasks remote animation will get onAnimationCancelled due to the
app transition was handled by recent animation controller. So leaves
divider bar fade-in animation to launcher when the remote animation got
cancelled.

Fix: 229613465
Fix: 208651526
Test: atest WMShellUnitTests
Test: launch a split pair and a fullscreen app, switch from overview or
      quickswitch back and forth between split pair and the fullscreen
      app. Observed divider bar animates in in-sync with task views.
Test: verified divider bar animates in-sync with task bar after keyguard
      dismissed.
Change-Id: I2f9064a089c446711545afda8204557a708545c5
2022-05-09 04:22:57 +00:00
Tracy Zhou
ace8b6862a Merge "Rename navigationBarHeight to navigationBarFrameHeight" into tm-dev am: cf134e04c8 am: 9e3f03991d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18203341

Change-Id: Iaf46e2850ff4ede488df7d3520c8c25766245697
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-07 07:08:21 +00:00
Tracy Zhou
cf134e04c8 Merge "Rename navigationBarHeight to navigationBarFrameHeight" into tm-dev 2022-05-07 05:49:50 +00:00
Tracy Zhou
6cfc16157c Rename navigationBarHeight to navigationBarFrameHeight
This is used for surfaces

Bug: 200310506
Test: presubmit tests (since there is no behavior change)
Change-Id: I8c17777d14c1e8445ea426d9154580731b10632d
2022-05-06 19:47:58 +00:00
Arthur Hung
e437099db4 Merge "Fix back gesture send to wrong focus window" into tm-dev am: 4bf81d5758 am: dc621522ac
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17990066

Change-Id: I687552fca36b4e3d9b7602338fc060a202783a71
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 15:56:04 +00:00
Robert Horvath
faa548f4af Merge "Dismiss TV PiP when app op OP_PICTURE_IN_PICTURE is revoked" into tm-dev am: 7bea00698c am: 6b5a11cf3e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17907962

Change-Id: Ie365eacc179eab5cd579bb7bdafa25be4ed95120
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 15:42:34 +00:00
Arthur Hung
4bf81d5758 Merge "Fix back gesture send to wrong focus window" into tm-dev 2022-05-06 11:12:19 +00:00
Robert Horvath
86c660c7e8 Apply temporary PiP decor separately from overall placement
This change moves temporary decor handling out of the KeepClearAlgorithm
as it does not factor into keep clear area avoidance, and separating it
allows us to animate out the edu text without re-calculating the overall
PiP position. The PiP does not move immediately in response to keep
clear area changes, as it waits for the PiP position to stabilize - but
changes to temporary decor, such as edu text, should still be applied
immediately.

Bug: 226583836
Test: test TvPipBoundsControllerTest TvPipKeepClearAlgorithmTest
Change-Id: I49d32c18af13978a8a31b9a573273905fce934fd
2022-05-06 12:43:44 +02:00
Robert Horvath
5996d908e1 Debounce TV PiP movements
To prevent erratic movements of the TV PiP window, this change causes
changes to the PiP window position to be delayed by 300ms. Only if the
target position of the PiP stays uncontested for that time will the PiP
actually move there.

Bug: 226583836
Test: atest KeepClearRectsTests
Test: TvPipKeepClearAlgorithmTest TvPipBoundsControllerTest
Change-Id: I8e8736fc26b2382b8e540be82d335e0b00a3c62a
2022-05-06 12:43:42 +02:00
Arthur Hung
7d870f9ec2 Fix back gesture send to wrong focus window
Ensure we could get the proper focused window token what it's during
updating the focus if user touched down on another non-focused window.

It also called `startBackNavigation` when received first move that next
to down event to ensure the `WMS.onPointerDownOutsideFocus` could be
processed first.

Test: atest BackAnimationControllerTest BackNavigationControllerTests
Test: enabled split-screen, trigger back gesture on non-focused window
Bug: 230442550
Bug: 227724016
Change-Id: I81c4f02d43299c03f94dc295bb23ba80d46bded8
Merged-In: I81c4f02d43299c03f94dc295bb23ba80d46bded8
2022-05-06 03:11:40 +00:00
Robert Horvath
7bea00698c Merge "Dismiss TV PiP when app op OP_PICTURE_IN_PICTURE is revoked" into tm-dev 2022-05-05 16:03:31 +00:00