Commit Graph

3854 Commits

Author SHA1 Message Date
Jacqueline Bronger
aa61eeefa7 Merge "Add symmetric Getters to PictureInPictureParams" into tm-dev 2022-03-16 14:48:19 +00:00
Jerry Chang
aab0963fdd Merge "Support drag to switch split position for not multi-instance app" into tm-dev 2022-03-16 02:05:58 +00:00
Jerry Chang
fc447969a9 Merge "Consider screen insets when setting smallestWidthDp" into tm-dev 2022-03-16 02:05:17 +00:00
Tom Natan
5059dbde7b Merge "[18/n] Letterbox Education: start dialog enter animation after all shell transitions have finished" into tm-dev 2022-03-16 00:26:02 +00:00
tomnatan
dc3dac34bd [18/n] Letterbox Education: start dialog enter animation after all shell transitions have finished
Fix: 219499529
Test: atest WMShellUnitTests:LetterboxEduWindowManagerTest
Test: atest WMShellUnitTests:CompatUIControllerTest
Test: atest WMShellUnitTests:ShellTransitionTests
Change-Id: Ifa7ab82c6fa076fbb054b8d370a244e7e8738b0b
2022-03-15 18:05:38 +00:00
Jacqueline Bronger
dce27c4822 Add symmetric Getters to PictureInPictureParams
- Adds getter to all setters in PictureInPictureParams.Builder
- Changes getAspectRatio and getExpandedAspect ratio to return the
  Rational values instead of floats to ensure symmetry

Bug: 220740459
Test: atest PictureInPictureParamsTest#testPictureInPictureParamsGetters
Test: atest PictureInPictureParamsTest#testPictureInPictureParamsGettersNullValues
Test: atest PinnedStackTests#testFillMaxAllowedActions
Test: atest PinnedStackTests#testRejectExceededActions
Test: atest PinnedStackTests#testCloseActionIsSet
Test: atest PinnedStackTests#testTitleIsSet
Test: atest PinnedStackTests#testSubtitleIsSet
Test: atest PinnedStackTests#testIsSeamlessResizeEnabledDefaultToTrue
Test: atest PinnedStackTests#testDisableIsSeamlessResizeEnabled

Change-Id: Idb06fbf326815181c3e43907dc9c47e5ecc125d0
2022-03-15 12:46:08 +01:00
Tony Huang
d5cdea4800 Merge "Fix divider disappear when rotation on shell transition" into tm-dev 2022-03-15 07:25:57 +00:00
Shan Huang
7c722ca403 Merge "Implement back to launcher animation from shell and WM animation controllers." into tm-dev 2022-03-15 05:38:25 +00:00
TreeHugger Robot
58f0040146 Merge "Fix pip dismiss not visible on phone landscape" into tm-dev 2022-03-15 02:37:56 +00:00
Mady Mellor
d9685e2406 Fix pip dismiss not visible on phone landscape
The increase to the gradient height doesn't work well for phone
landscape since it can be larger. This meant the calculation to
place the dismiss target window is incorrect.

This change fixes it by capping the height to the window size.

Test: visual - have PIP in landscape on phone and verify drag to
               dismiss target is fully visible
Bug: 223467425
Change-Id: I78a5565c8e09f010fad46ccd96c137f1c4de93b0
2022-03-15 00:37:14 +00:00
Shan Huang
0e9d709e2f Implement back to launcher animation from shell and WM animation
controllers.

Test: m -j.
Test: Open and swipe back on pre-T and T apps.
Test: atest BackNavigationControllerTests
Test: atest BackAnimationControllerTest
Bug: 195946584

Change-Id: I981f8deff9fad75355ee0e8bbe08b375f4da6e74
2022-03-14 23:12:41 +00:00
TreeHugger Robot
b6468930d0 Merge "Revert "Turn off predictive back"" into tm-dev 2022-03-14 22:55:32 +00:00
Rob Carr
6caacdcf72 Merge "WMS/ViewRoot: Prepare for Async BLAST Sync [1/N]" into tm-dev 2022-03-14 22:48:21 +00:00
Shan Huang
d7d9fb32d7 Revert "Turn off predictive back"
This reverts commit ad89a82145.

Reason for revert: b/222170518 was unrelated to gesture back, and is now fixed.
Test: m -j. Test back behavior throughout system.

Change-Id: Ia27c7ea97416831355e1949ec6874de570b52108
2022-03-14 17:09:00 +00:00
Robert Carr
027b59d90a WMS/ViewRoot: Prepare for Async BLAST Sync [1/N]
We would like to make relayoutWindow a non-blocking call,
and of course why not, who likes blocking. However it functions
as a critical path of BLASTSync. To understand why examine the
Guarantee described in BLASTSync.md.

In order to implement this guarantee we need to know
“Which frame has the client finished drawing” when it calls
finishDrawing. The current answer to this question is
“The frame reflecting the state observed in the last call
to relayoutWindow”. The comments on mPending and mCurrentDrawHandlers
also have a lot more context on how this works currently. Since
relayoutWindow has a critical section, it also ensures that changes
to syncable state and preparation of sync will be observed atomically
(since they are both observed over relayoutWindow, which is always
called before any frame drawing updated syncable state).

We design a new protocol described in BLASTSync.md, which uses a seqId
to track which call to finishDrawing reflects which syncable state.
We implement this seqId based system. Unfortunately the WindowManager
doesn’t quite conform to the requirements specified by the protocol,
and a follow up CL ensures that syncable state changes will
always be sent with the seqId.

This CL simply adds the protocol specification and makes some required
interface changes. It can be seen to be a no-op.

Bug: 161810301
Bug: 175861051
Bug: 175861127
Bug: 200285149
Change-Id: If2dea07121fe7de5d2524c5b63678dddf955d4b7
2022-03-14 08:08:40 -07:00
Tony Huang
791c8fed1b Merge "Clean up the legacy split screen (8/n)" into tm-dev 2022-03-14 04:07:44 +00:00
Tony Huang
dd637175b1 Fix divider disappear when rotation on shell transition
When rotation, it will re-init the split divider for new rotation on
DAinfoChanged callback, but when shell transition, we should do it on
startAnimation to make transition smooth and make didider could release
by specfic Transcation to avoid it hide immediately but didn't sync with
transition.

Fix: 222158856
Test: manual
Test: pass existing tests
Change-Id: I797ffd0ea35d89b4ec1e3ef4828ce36e18c860be
2022-03-14 04:02:01 +00:00
Winson Chung
8e53c05243 Merge "Fix issue with wrong style being used in landscape" into tm-dev 2022-03-11 05:45:09 +00:00
Mady Mellor
e2acb6ce05 Merge "Fix an issue where bubbles didn't collapse onTaskMovedToFront" into tm-dev 2022-03-11 01:20:04 +00:00
Mady Mellor
ba395508c5 Fix an issue where bubbles didn't collapse onTaskMovedToFront
I noticed when opening settings while stack is expanded wouldn't
cause the stack to collapse. This was because we skipped the collapse
if the shade was expanded. I don't think there's any reason to be
doing this, I think this was accidentally added during the refactor
to move bubbles into shell.

Test: manual - have bubbles expanded, pull down the shade, tap on
               the settings gear or long press on a tile, ensure that
               when the settings screen opens that the stack collapsed
Bug: 223635739
Change-Id: Ia3476e694a8e64c95eed63dea4a3729e83766683
2022-03-10 22:54:45 +00:00
Pablo Gamito
633398fe8c Merge "Promote stable flicker tests" into tm-dev 2022-03-10 18:30:39 +00:00
Winson Chung
edb03dc840 Fix issue with wrong style being used in landscape
- Legacy style was overriding the Shell landscape style for the
  divider

Bug: 213379024
Test: Build sysui from studio and verify the divider background
      is correct
Change-Id: Ic47b411fad0469c86459cc01189a722dbad8d8c3
2022-03-10 18:28:35 +00:00
TreeHugger Robot
4827ea25a2 Merge "Add a few TODOs for removing getSfInstance" into tm-dev 2022-03-10 17:28:32 +00:00
Mateusz Cicheński
ecc08ff3f9 Merge "Update Picture-In-Picture TV to use ProtoLog instead of Log." into tm-dev 2022-03-10 16:46:29 +00:00
Pablo Gamito
19caa1d7d8 Promote stable flicker tests
Change-Id: Ibdb17efe85a8a6cb8da16d96c1658720f53bd671
2022-03-10 11:28:41 +00:00
Jerry Chang
899562852d Consider screen insets when setting smallestWidthDp
Take system bars and display cutout insets into account when calculating
smallestWidthDp for splitting tasks.

Bug: 217600744
Test: atest WMShellUnitTests
Change-Id: Ifa56c51d90418d9771d95bd64be69b2c084e446f
2022-03-10 03:38:38 +00:00
Tony Huang
607535b8d1 Merge "Fix NPE when quick switch on shell transition" into tm-dev 2022-03-10 02:31:07 +00:00
Mateusz Cicheński
8153efb7f3 Update Picture-In-Picture TV to use ProtoLog instead of Log.
Test: adb shell wm logging enable-text WM_SHELL_PICTURE_IN_PICTURE
Bug: 218457585
Change-Id: Icc5b9c6f79cebd8f2c084d88b10acd93a291a27b
2022-03-10 00:55:22 +00:00
Robert Horvath
3f574e253e Merge "Move TV PiP away from keep clear areas" into tm-dev 2022-03-09 09:14:54 +00:00
Jerry Chang
bae25dc8b8 Support drag to switch split position for not multi-instance app
Support to switch the split position of the splitting app which is not
supporting multi-instance when dragging its app icon to another side of
the split.

Bug: 199386272
Test: manual check repro steps of app not supporting multi-instance
Change-Id: Ib7c50ff29dd9ea72e33162bed55eb52c8e4fc31b
2022-03-09 08:10:07 +00:00
Shawn Lin
bf8b8621ad Merge "Exclude nav bar area from apps bounds when in kids mode" into tm-dev 2022-03-09 06:18:00 +00:00
Tony Huang
710e683523 Fix NPE when quick switch on shell transition
Some function call in finishEnterSplitScreen should be non-null so
passing transcation to it instaed of null.

Fix: 223396097
Test: manual
Test: pass existing tests
Change-Id: I0c3e2ab3d04191eabf749bda0f5bb0c11c09723a
2022-03-09 11:35:01 +08:00
Jerry Chang
4ab407e5fe Merge "Support to get the exact task which IME is attached to" into tm-dev 2022-03-09 01:23:38 +00:00
Galia Peycheva
01c7c259fe Merge "Add string for tv pip edu text" into tm-dev 2022-03-08 21:50:21 +00:00
Evan Rosky
10dc2271c1 Merge "move shell_transit sysprop to persist.wm" into tm-dev 2022-03-08 19:34:01 +00:00
Robert Horvath
c4f571a27e Move TV PiP away from keep clear areas
The PiP is placed in a way to avoid keep clear areas.
If no areas overlapping the default PiP anchor position are defined,
the PiP will stay at its anchor position.
Otherwise, it will try to move to a free location closest to its anchor
position. Unrestricted areas can cause the PiP to move across the entire
screen, but restricted areas have limited influence and can only move
the PiP a short distance.
If no free position is found, the PiP will be stashed for some time.
To find the position to move to once the PiP unstashes, a relaxed search
is performed, excluding a restricted keep clear area. If this still does
not yield a position to move to, only unrestricted areas will be taken
into account. The PiP is stashed along the edge closest to the unstash
position.

Bug: 218416347
Bug: 218494300
Test: atest TvPipKeepClearAlgorithmTest
Change-Id: I76c6527320fc403bb604b188f38eed505eeaab89
2022-03-08 18:23:16 +01:00
Galia Peycheva
9258090943 Add string for tv pip edu text
Bug: 219884907
Test: m
Change-Id: I51e8a0d69954a7f9d7b3cf9d4423ddad36f5e6c3
2022-03-08 16:28:22 +01:00
Tom Natan
81e377699b Merge "[17/n] Letterbox Education: change the ripple color of the dismiss button." into tm-dev 2022-03-08 10:24:48 +00:00
shawnlin
10d7cb3c0f Exclude nav bar area from apps bounds when in kids mode
GKS requested that app's bounds should not overlap with the nav bar area
when kids mode is enabled except for Launcher.

Creates a dedicate task organizer for kids mode. When kids mode is
enabled, create a root task with its bounds excluding the nav bar area
and tasks except launcher will be launched into it.

Bug: 161689887
Test: manual:
      1. adb shell settings put secure "nav_bar_force_visible" "1"
      2. choose 3-buttons navigation mode in
         Settings>System>Gestures>System navigation
      3. check winscope and see if bounds are set correctly
Test: atest KidsModeTaskOrganizerTest
Test: atest WindowOrganizerTests

Change-Id: I93af1bc5b2696654d8ca5055dbbbebf5a41f89aa
2022-03-08 16:00:22 +08:00
TreeHugger Robot
1d42fb2f89 Merge "[Shell Transition] Fix exit PIP crash when there are multiple activity" into tm-dev 2022-03-08 06:01:17 +00:00
Chris Li
a300987d39 [Shell Transition] Fix exit PIP crash when there are multiple activity
When the Task contains multiple activities, entering/exiting PIP will
move the PIP activity in/out of a new PIP Task.

Bug: 222410428
Test: verify with test app that contains multiple activities
Change-Id: Icdb27b24b5dcf332c84ac01dd368e4f16f19889e
2022-03-08 11:23:10 +08:00
Mady Mellor
4c726719f3 Merge "Fix issue where the update dot wasn't showing" into tm-dev 2022-03-08 00:19:30 +00:00
tomnatan
ecba16d6fd [17/n] Letterbox Education: change the ripple color of the dismiss button.
Bug: 215314668
Test: N/A
Change-Id: Ifa36569c6bd089868a27448d483121163f41c567
2022-03-07 19:36:24 +00:00
Hongwei Wang
6bafc9804c Merge "Cleanup LegacySplitScreen usage in PiP" into tm-dev 2022-03-07 18:13:21 +00:00
Evan Rosky
25616b0905 Merge "When doing activity->activity transfer, use abort instead of finish" into tm-dev 2022-03-07 17:17:04 +00:00
Tom Natan
687af63e66 Merge "Check if keyguard is showing instead of occluded for compat UI." into tm-dev 2022-03-07 15:35:08 +00:00
Tom Natan
2e12d3499c Merge "[16/n] Letterbox Education: focus on the dialog title for accessibility." into tm-dev 2022-03-07 15:32:28 +00:00
Issei Suzuki
4a785a1407 Merge "Apply right animation type on translucent window containers." into tm-dev 2022-03-07 11:46:47 +00:00
TreeHugger Robot
7fe1c1386d Merge "Transfer PipContentOverlay when swipe to home with Shell transition" into tm-dev 2022-03-05 15:34:07 +00:00
Mady Mellor
66d0e4234e Fix issue where the update dot wasn't showing
Now that BadgedImageView is a viewgroup overriding onDraw doesn't
work, instead we can override dispatchDraw.

Fixes: 213595915
Test: visual - add a bubble and see that there is a dot
Change-Id: I5f417f95922a070f5290b7291b6e7748a69840d8
2022-03-05 01:14:19 +00:00