Commit Graph

94 Commits

Author SHA1 Message Date
wilsonshih
d52e491d2f Implement default exit animation for splash screen.(9/N)
Implement default exit animation on the view of splash screen, there
will be a two layers switch happen when playing exit animation. For
the detail please reference
go/improved_app_launch_animations and go/app-startup

Note: For this version we skip shift-up animation, need to fix the
flicker test so we can enable it.
Note2: Fix the possible missing splash screen view issue, but could
make the first window draw slower, keep tracking.

Bug: 73289295
Test: build/flash
Test: check splash screen starting window.
Test: atest StartingSurfaceDrawerTests ShellTaskOrganizerTests
WindowOrganizerTests SplashscreenTests

Change-Id: I796811d010ac70f256169dd03d5e05ef0ed79d28
2021-03-12 03:46:15 +00:00
Chris Li
9efcb0bd3f Merge "Allow non-resizable apps in split-screen (12/n)" into sc-dev 2021-02-22 18:32:20 +00:00
TreeHugger Robot
9801436e7f Merge "Fix The education UI above one-handed mode isn't localized and Display size changes" into sc-dev 2021-02-20 12:03:43 +00:00
Bill Yi
3789c4982c Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-02-19 18:09:27 +00:00
Hongwei Wang
9c702c9b9e Merge "Polish the PipMenuView when showing the controls" into sc-dev 2021-02-18 23:37:31 +00:00
Jason Chang
bd2e7aa6ae Fix The education UI above one-handed mode isn't localized
and Display size changes

Handling onConfigurationChanged() event to response system
configuraiton changes.

Bug: 177980234
Bug: 177222027
Bug: 177222126

Test: manual
Change-Id: I93dec3e83ae287c5dabc494625929c43f44a7037
2021-02-18 14:38:23 +08:00
Chris Li
de551ad9b6 Allow non-resizable apps in split-screen (12/n)
Before, the hint uses PopupWindow to be placed at the bottom right of the
Display, which can't be attached to Task. Now, render size compat button
 hint popup on Task surface with WindowlessWindowManager.

Fix: 178327644
Bug: 176061101
Test: atest WMShellUnitTests:SizeCompatUILayoutTest
Test: atest WMShellUnitTests:SizeCompatHintPopupTest
Change-Id: I6f8d7afc996d7f312516d85deb2bd113eae8bc3f
2021-02-17 20:57:15 -08:00
Bill Yi
bbee340460 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I5d886966724ebf8800f6ed0402aa6ac99ce0c4bc
2021-02-18 01:50:43 +00:00
Hongwei Wang
1c2fd3aa7f Polish the PipMenuView when showing the controls
- Decreases the menu action size
- Wraps custom actions into PipMenuActionView and restricts the size
  to be identical to other PiP actions such as settings and dismiss
- Removed unused pip_menu_activity.xml layout

Screenshot: https://screenshot.googleplex.com/6LFk5WJFfC4FQyA.png
Bug: 179312210
Test: Enter PiP and tap to show controls, see screenshot
Change-Id: I9de63be60ff66ee5198785885a28d495f1fb7af3
2021-02-16 14:27:46 -08:00
Winson Chung
5eee3dce74 Merge "Add protolog config as java resource" into sc-dev 2021-02-16 19:36:23 +00:00
Chris Li
85377a9785 Allow non-resizable apps in split-screen (10/n)
Render size compat restart button on Task surface with
WindowlessWindowManager.

Bug: 176061101
Bug: 178327644
Test: atest WMShellUnitTests:SizeCompatRestartButtonTest
Test: atest WMShellUnitTests:SizeCompatUIControllerTest
Test: atest WMShellUnitTests:SizeCompatUILayoutTest
Change-Id: I86912adca18a6a62265cd31585f2c7d612c90fd1
2021-02-15 14:05:01 -08:00
wilsonshih
8ac1b58101 Add API for show branding image on splash screen.(4/N)
Add API windowSplashScreenBrandingImage to attach branding image
on splash screen.

Bug: 73289295
Test: build and flash
Test: StartingSurfaceDrawerTests SplashscreenTests

Change-Id: I15ab799d4e7bb74ce6814fa9375334db18022f3a
2021-02-15 15:22:42 +01:00
wilsonshih
ae7ee3f3ef Provide new APIs for customize splash screen window.(3/N)
Create new APIs for developer to customize starting window
- windowSplashScreenBackground: specify the background color
- windowSplashScreenAnimatedIcon: replace center icon on starting
window, and it can be animatable.
- windowSplashScreenAnimationDuration: the animation duration if
the replace icon is animatable, it cannot exceed
max_starting_window_intro_icon_anim_duration.

Support ADV to replace the icon on starting window.

Ref doc: go/improved_app_launch_animations

Bug: 73289295
Test: build/flash
Test: check splash screen starting window.
Test: atest StartingSurfaceDrawerTests SplashscreenTests
Test: atest ShellTaskOrganizerTests
Change-Id: Id3de3e9b57d769f096baf43713c1e3c327ecfdc8
2021-02-15 15:22:03 +01:00
Winson Chung
9169b373ef Add protolog config as java resource
- No longer need the checked in version, this just adds the generated
  viewer config as a java resource
- Disabling logs by default

Bug: 168497382
Test: adb shell wm logging enable-text WM_SHELL_TASK_ORG
Change-Id: Idc5f423dfc24b455de833e7f3f76e9e6db9ceb47
2021-02-12 13:18:46 -08:00
Hongwei Wang
f3e5e9cdee Merge "Revert "Add an invisible layer to trap focus"" into sc-dev 2021-02-08 22:36:14 +00:00
Hongwei Wang
f2fd0294a9 Revert "Add an invisible layer to trap focus"
This reverts commit cb98114abd.

Reason for revert: Not needed once ag/13507782 is merged

Bug: 169372603
Change-Id: I52d4344f6f2f3fb973f3f20e7d6f1ec2844d7567
Test: manually enter PiP
2021-02-08 18:43:30 +00:00
Evan Rosky
4146eb6af4 Add some more Protologs to Shell-side Transitions
Some more details about how local and remote transitions
are dispatched.

Bug: 172695387
Test: enable shell transitions and look at logs
Change-Id: I9edff6e43287514557b10b558a94c3300d835157
2021-02-03 17:38:11 +00:00
Hongwei Wang
58b9a4e48e Merge "Add an invisible layer to trap focus" into sc-dev 2021-02-03 01:22:03 +00:00
Chris Li
27d983a098 Allow non-resizable apps in split-screen (8/n)
Refactor SizeCompatModeActivityController to WM Shell. The old one will
be removed in separate cl as there are some dependencies in other
packages.

This cl is mainly for refactor. Major change will come after.
Besides refactor, also changed the mActiveButtons key to TaskId, because
launcher Task will also trigger onTaskInfoChanged, but should not remove
the restart button on the same display.

Bug: 176061101
Bug: 178327644
Test: manually verify that the size compat restart button works as usual
Test: atest WMShellUnitTests:SizeCompatUIControllerTest
Test: atest WmTests:SizeCompatTests
Change-Id: I9143e079a1a945b76c3c56596976dd6ad2802897
2021-02-02 12:54:40 -08:00
Hongwei Wang
cb98114abd Add an invisible layer to trap focus
This is a work around for b/169372603 where PiP menu defaults the focus
on expand button when being attached to system window.

There is another inconsistency observed regarding of touch feedback
which may not be related to b/169372603 but worth mentioning
- when entering PiP and close button is shown, tap on PiP window shows
  visual touch feedback
- when PiP menu in closed state, eg. nothing is shown in menu, tap on
  PiP window shows no visual touch feedback

Video: http://rcll/aaaaaabFQoRHlzixHdtY/cLwTz7ad7P9nrrqk1uPiRP
Bug: 169372603
Test: Enter PiP from YT, see video
Change-Id: Ief8976fac28a65ac35724adcad7f25e11f1876a5
2021-02-01 21:12:49 -08:00
Hongwei Wang
352f35ddaf New tap on PiP window behavior
PiP window stays same on tap if it's large enough to hold all the
actions within it. Ignore the artifacts in demo video such as the shift
of settings button and menu resize out of sync, they are tracked in
separate bugs.

Video: http://rcll/aaaaaabFQoRHlzixHdtY/hkQgdmbuBhNT0WdKW8aegL
Bug: 175055101
Test: See video
Change-Id: Ie19b30dd1e8ba716095b76a3f341b5ab2a51399b
2021-01-28 17:42:53 -08:00
Lucas Dupin
2107c5815f Make bubble scrim respect opacity flag
Test: atest ScrimControllerTes
Fixes: 173562716
Change-Id: If815eb75f63078741f2b1104938b223e0a99df31
2021-01-25 16:27:14 -08:00
Winson Chung
ebf6903682 Move the overflow ui to the bubble window
- An activity always runs on the main looper of the process
  and this simplifies threading since all bubble data will
  run on the shell thread
- The BubbleExpandedView will not initialize the task view
  when mIsOverflow is set.  We still snapshot the overflow
  view to keep the existing selection animation logic the
  same between overflow/task bubbles

Bug: 161979899
Test: atest WMShellUnitTests
Test: atest SytemUITests

Change-Id: If3632a3030c58c9ec334afcb06aac4c51e28938b
2021-01-19 14:39:39 -08:00
Evan Rosky
30f3544f65 Add support for remote transition playback in shell transitions
This adds IRemoteTransition interface for other processes (like
launcher) to register for playing transition animations.

Then there are 2 supported ways to "register":

1. Is to attach an IRemoteTransition to ActivityOptions. To
   support this pathway, requestStartTransition now takes a
   TransitionRequest object which can contain whatever info
   is needed at the time. One piece of that is the passed-in
   IRemoteTransition.

2. Is to register directly with shell (via systemuiproxy for
   now) with a TransitionFilter. This filter allows shell
   transitions to dispatch a transition to a remote without
   need to make queries over binder.

This also hooks up launcher animations by converting the new
transition info to the old RemoteAnimationTargetCompat stuff.

Bug: 169035082
Test: launch app from launcher and observe the icon animation.
      atest ShellTransitionTests
Change-Id: I8014a6f46cffda3a48a1a4ae101e2643078f4a14
2021-01-14 14:50:51 -08:00
Evan Rosky
57000adf8e Move shell Transitions into a package
For organization.

Bug: 169035082
Test: builds/runs (no logic changed)
Change-Id: I224ab5f19df7ce49a2112dcf7c900a3fc310532d
2021-01-11 19:29:29 -08:00
Jason Chang
21538ffb10 Merge "Fix after turning the Dark theme on, users can not clearly identify the screen has entered one handed mode" 2021-01-11 08:44:25 +00:00
Jason Chang
7e8e7441ee Fix after turning the Dark theme on, users can not clearly identify
the screen has entered one handed mode

Add a new DisplayArea feature color background layer to fix it.

Bug: 157124724

Test: manual
Test: atest WMShellUnitTests
Test: atest DisplayAreaPolicyBuilderTest
Change-Id: I16beddb182125551621d0083dba2f259140d7b78
2021-01-11 13:45:31 +08:00
TreeHugger Robot
6581a7d0ac Merge "Fix and clean up Tv Pip Menu" 2021-01-08 09:44:55 +00:00
wilsonshih
73e0da3c98 Improve app launch animation (1/N)
Make new default splash screen starting window.

Ref doc: go/improved_app_launch_animations

Bug: 73289295
Test: build/flash
Test: check splash screen starting window.
Test: atest StartingSurfaceDrawerTests

Change-Id: I590630942e9b1baa816206c6ac3895e7ff013e06
2021-01-06 17:18:37 +08:00
Sergey Nikolaienkov
1991120975 Fix and clean up Tv Pip Menu
Fix for Tv Pip Menu not properly setting custom actions provided by an
application.
Fix Pip Menu not closing on the Home button press.
Simply and revise Tv Pip Menu implementation which now consists of 3
classes:
- TvPipMenuController
- TvPipMenuView (formerly PipMenuView)
- TvPipMenuActionButton (formerly PipControlButtonView)
and thus spare
- PipControlsView
- PipControlsViewContoller

Bug: 174818743
Test: atest WMShellFlickerTests:TvPipBasicTest
Test: atest WMShellFlickerTests:TvPipMenuTests
Test: atest WMShellFlickerTests:TvPipNotificationTests
Change-Id: I9e08ca142e0407a4ede084323b0201194a7e89b8
2020-12-28 06:22:41 +00:00
Bill Yi
ae2d946c96 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I9f66e56fb8f45be75b2aa867161d1f5bc6b5c230
2020-12-24 10:14:18 -08:00
Jerry Chang
2c8ea7b021 Fix showing black background when resizing the divider bar.
Reports resizing state to WM core so that app client could apply bigger
visible bounds while resizing splits. Also moves DividerHandleView to
more generic package.

Fix: 172704238
Test: manul check divider behavior
Test: atest WMShellUnitTests
Change-Id: I1656c86de9a0b5dfe5e6da57ccc9d5f6e467843a
2020-12-17 07:39:24 +08:00
Wale Ogunwale
062b17a171 Rename splitscreen package to legacysplitscreen
Split-screen implementations moving forward would be based on app-pairs
and main/side stage models. So, renaming existing package to avoid
confusion.

Bug: 175416931
Test: They pass!
Change-Id: I55ab1d27fb1c00ba7a58d685ea7eb2840efb9437
2020-12-14 12:13:11 -08:00
Mariia Sandrikova
2f37c38f33 Clean up LetterboxTaskListerner and all related logic.
This is the first step towards moving letterbox gravity logic from WM Shell to WM Core. It's important to do this even before the new implementation in WM Core is ready because surface repositioning in WM Shell causes visible flickering on rotation for all apps on devices with cutout.

Fix: 174632285
Bug: 175212232
Fix: 173440321
Test: atest WMShellUnitTests
Change-Id: I2b3706a1a46bb2c7ee4bb3789fb09b216e32f290
2020-12-13 15:17:11 +00:00
Jerry Chang
0c9c2cfac1 Support dragging divider bar of app-pair to resize the splits
Update SplitLayout and DividerView to support dragging divider bar and
make them more generic to be able to share among different split impl.

Bug: 172704238
Test: manual check the behavior of divider bar
Test: atest WMShellUnitTests
Change-Id: I16ed1fd86bdff4d8544c5787c95315c59055ad04
2020-12-04 01:49:58 +08:00
TreeHugger Robot
b91eb3cdbd Merge "Import translations. DO NOT MERGE ANYWHERE" 2020-11-21 02:26:15 +00:00
Bill Yi
c19062102a Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ibda03e416260efefa40a2d662b45fa03aee35486
2020-11-20 07:52:33 -08:00
Bill Yi
3d6151257d Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I61ae0a3a1d32304c3ba001315f59af611638514e
2020-11-20 07:24:09 -08:00
TreeHugger Robot
a0522a60fd Merge "Revert "Import translations. DO NOT MERGE ANYWHERE"" 2020-11-20 05:08:56 +00:00
TreeHugger Robot
b38a884912 Merge "Revert "Import translations. DO NOT MERGE ANYWHERE"" 2020-11-20 04:55:15 +00:00
Jason Chang
9fa8702d0c Merge "Fix change One-handed mode screen size from 50% to 40% but also keep adb command mechanism for UX tuning" 2020-11-20 03:51:53 +00:00
Bill Yi
98537ca3aa Revert "Import translations. DO NOT MERGE ANYWHERE"
This reverts commit 6652772648.

Reason for revert: Incorrect import

Change-Id: I7202b60632640d44202c5246c6408a6f54892e68
2020-11-20 03:16:26 +00:00
Bill Yi
5e4e11b20c Revert "Import translations. DO NOT MERGE ANYWHERE"
This reverts commit 6ced8e47a4.

Reason for revert: Incorrect import

Change-Id: Ie5f63ad2562f38cebd36dae986c530d07de088ca
2020-11-20 03:01:27 +00:00
TreeHugger Robot
0718e79de0 Merge "Import translations. DO NOT MERGE ANYWHERE" 2020-11-19 18:16:38 +00:00
Bill Yi
6ced8e47a4 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I23c6083fd728447f86a1b272ae53c4c57be47bd4
2020-11-19 04:00:09 +00:00
Bill Yi
6652772648 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I5ac32a47f2a98d5430814f615555fe2d6aaf58e9
2020-11-19 03:59:40 +00:00
TreeHugger Robot
5bc9594c6b Merge "Add divider view support for app-pairs" 2020-11-18 12:12:18 +00:00
Jason Chang
fc4f7c948d Fix change One-handed mode screen size from 50% to 40% but also keep
adb command mechanism for UX tuning

Provide both config.xml and adb command mechanism.

Bug: 169724216

Test:
adb shell setprop persist.debug.one_handed_offset_percentage 60
adb shell pidof com.android.systemui |xargs -i adb shell kill -9 {}
or adb reboot

adb shell setprop
persist.debug.one_handed_translate_animation_duration 150
adb shell pidof com.android.systemui |xargs -i adb shell kill -9 {}
or adb reboot

Test: manual
Test: atest WMShellUnitTests
Change-Id: I9502cbe8e496f484fdeb8041b5618c47aba0f1d1
2020-11-18 17:43:41 +08:00
Mariia Sandrikova
2b54b5d709 Merge "Make positioning in letterbox mode configurable." 2020-11-17 22:45:44 +00:00
Mariia Sandrikova
49fc5569f0 Make positioning in letterbox mode configurable.
Changes:
- Allow to specify in config_letterboxPortraitGravity and config_letterboxLandscapeGravity desired alignment for letterboxed apps.
- Add ADB commands to allow overriding these config values for testing
- Move positioning logic for letterbox mode from WM Core to WM Shell.

Test: atest LetterboxTaskListenerTest LetterboxConfigControllerTest
Test: go/wm-smoke
Test: manual with adb shell dumpsys activity service SystemUIService WMShell (get)set-letterbox-portrait-gravity / (get)set-letterbox-landscape-gravity
Fix: 170216257, 170215849
Change-Id: I8e6392faab05bec1bf61b9691f3bd9b8b09b9621
2020-11-17 20:15:31 +00:00