Commit Graph

3882 Commits

Author SHA1 Message Date
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
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
Tom Natan
ad03eb31c2 Merge "Fix issue where KidsModeTaskOrganizer registers itself as CompatUICallback" into tm-dev 2022-03-19 15:34:35 +00:00
Kholoud Mohamed
a8e9aa390d Merge changes from topic "apiFeedback" into tm-dev
* changes:
  RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
  RESTRICT AUTOMERGE move device policy resource APIs to a separate class
  RESTRICT AUTOMERGE hide device policy resources constants
2022-03-19 06:30:43 +00:00
TreeHugger Robot
6df18cf891 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-dev 2022-03-19 00:35:33 +00:00
TreeHugger Robot
8698e514a5 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-dev 2022-03-19 00:34:37 +00:00
kholoud mohamed
b7aedc6f3d RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I8af03136e67057d171e97cb5a43187aa6c7f4fe7
2022-03-19 00:22:17 +00:00
tomnatan
7ce3e6a5a4 Fix issue where KidsModeTaskOrganizer registers itself as CompatUICallback
This results in the compat UI clicks reaching KidsModeTaskOrganizer instead of ShellTaskOrganizer.

Test: tested manually
Fix: 225137584
Change-Id: I1c79dd400810cc31c1d0f938887e45ab11ecf6fa
2022-03-19 00:08:25 +00:00
Sergey Serokurov
9256523855 Merge "Take into account cutout when hiding bubble stack in immersive mode" into tm-dev 2022-03-18 19:28:59 +00:00
Evan Rosky
a341f3003a Merge "Fix pip finish-callback when enter animation runs in shell" into tm-dev 2022-03-18 03:23:51 +00:00
Jerry Chang
c89ead8f46 Merge "Fix drag to split gesture puts an existing task into pip mode" into tm-dev 2022-03-18 02:29:11 +00:00
wilsonshih
4748ce9e02 Deprecating windowSplashScreenAnimationDuration attr.
In previous CL(5e0c72a2c5) we provide a
way to read the animation duration from AVD and AnimationDrawable,
which should be enough to deprecate this attribute since the naming
could confusing developers.

The attribute was used to cut off the animation if the icon is
animatable, but since the animation can be stop when removing the
splash screen view from window, the attribute is useless so framework
won't read it anymore.

The attribute was also be the return value from
SplashScreenView#getIconAnimationDuration, however, since this API was
designed to let developer decide when to cut off the animation if the
app want to handle OnExitAnimationListener#onSplashScreenExit,
developer can pre-decide the duration in the app without set this
attribute.

Bug: 211707095
Test: atest SplashscreenTests StartingSurfaceDrawerTests
Change-Id: Ib3a0b4314bd15158c392e56c0e125a33c753e716
2022-03-18 09:44:37 +08:00
Jacqueline Bronger
640869f3bb Add broadcast receiver to toggle expanded PiP (TV)
Broadcast protected by systemui permission

Bug: 219724552
Test: manual - add action to TV PiP notification temporarily and trigger
from notification

Change-Id: Ie69c780bb134012815be09bf9c9a7e8385259dcb
2022-03-17 14:38:05 +01:00
Jacqueline Bronger
96088059bd Add broadcast receiver to open PiP move menu on TV
- Adds broadcast receiver protected by systemui permission
- Adds option to show only the move menu instead of the button menu

Bug: 219723009
Test: manual - add action to TV PiP notification temporarily and trigger
from notification, also open menu while in move mode (double click home
or keyevent WINDOW)

Change-Id: I5044fbe26dfc6adc46aca6f2dc0cda2d9b6dacff
2022-03-17 14:37:49 +01:00
Evan Rosky
9c464cc063 Fix pip finish-callback when enter animation runs in shell
PiP animations happen in both launcher and in shell. On top of that,
the implementations are different!? The launcher impl will actually
merge expand-pip into an enter animation, but the shell impl waits
for the enter animation to finish. This means we need to alter the
finish-handling logic depending on whether the animation is running
"locally" in shell or not.

Additionally, fixed an ordering-problem: This was calling the
finish-callback before unsetting the mFinishCallback member. The
problem is that if there are pending animations queued-up, those
will start in sync -- if those end up calling-back into PipTransition,
then they will see mFinishCallback as non-null.

Bug: 224622288
Test: atest PinnedStackTests
Change-Id: Ie3696b101ecca69fae93b347ff358863cdb4e6c3
2022-03-16 09:55:07 -07:00
Jacqueline Bronger
aa3a7e6273 Implement custom PiP close action on TV.
The custom close action will replace the system close action and
the button in the menu will be colored red to be able to tell it
apart.
If one of the custom actions matches the close actions it will be
removed to avoid duplicates resulting from the custom close action.

If the app doesn't close the PiP after five seconds the system will
continue to close the PiP as normal.

Bug: 218487423
Test: manual
Change-Id: Ic3c520c50ac0e3d2f0e73cf2f71d47a4f548f861
2022-03-16 16:32:02 +01:00
Jacqueline Bronger
aa61eeefa7 Merge "Add symmetric Getters to PictureInPictureParams" into tm-dev 2022-03-16 14:48:19 +00:00
Bill Yi
dd0d4e2f6f Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I7bd4416c12f23d3c12cd73acb1c51ebec27ea5c6
2022-03-16 14:28:22 +00:00
Bill Yi
8d195c3d85 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I1bc341bcbd5809a117b0e929630ccd52d0a27a56
2022-03-16 14:24:07 +00:00
Jerry Chang
0e7e9487d7 Fix drag to split gesture puts an existing task into pip mode
And flag drag-to-split launch with no-user-action to prevent sending
user leaving event to the current top activity since it's going to be
put into another side of the split. This prevents the current top
activity from going into pip mode with user leaving event.

Bug: 223936167
Test: atest WMShellUnitTests
Test: Drag an app icon onto a task which supports auto-pip, it'll enter
      multi-window mode instead of pip mode properly.
Change-Id: Ifbeccbd19c8c83a31e116d9a73a2d7432c07917f
2022-03-16 05:17:53 +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
Pablo Gamito
ebe4e782e2 Undeprecate animation background color
Now that we support showing a background color behind animations again
to makes sense to undeprecate the background color animation API so the
background color can be set during in the animation's definition.

Test: atest CtsWindowManagerDeviceTestCases:ActivityTransitionTests
Change-Id: I1bd1468f7ae4ee41f5d2d25947852c78b93bc6ee
2022-03-14 22:48:46 +01:00
Sergey Serokurov
b21fd9cb48 Take into account cutout when hiding bubble stack in immersive mode
Bug: 215662432
Test: manual, https://drive.google.com/file/d/1bsokIRzrA1g7wn7qrd198UrpVY4_7-7k/view?usp=sharing
Test: atest SystemUITests
Change-Id: Ic70c334e18e6fdf6d9a97e2f23b7e4ac92055249
2022-03-14 18:30:54 +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