Commit Graph

1122 Commits

Author SHA1 Message Date
Chris Li
b4aec6206f Merge "Determine whether to support activities in multi window (8/n)" into sc-dev 2021-05-14 22:28:18 +00:00
Chavi Weingarten
1b0e20108d Merge "Add CAPTURE_BLACKOUT_CONTENT permission" into sc-dev 2021-05-14 16:28:43 +00:00
Jason Chang
e8b62e4d23 Merge "(1/n) Disabling OHM gesture in NavigationBar 3 Button mode" into sc-dev 2021-05-14 07:40:34 +00:00
Jerry Chang
c0302f5092 Merge "Only reparent controlling tasks when entering split" into sc-dev 2021-05-14 04:53:16 +00:00
Jerry Chang
68667bdd3a Merge "Fix wrong split bounds in legacy split flicker tests" into sc-dev 2021-05-14 02:29:18 +00:00
Jerry Chang
80d67949a2 Only reparent controlling tasks when entering split
Only move split controlling tasks to split secondary root when entering
split. So that it could align with launch root rule while in split.

Fix: 187892355
Test: enter split screen while having assist type task in recent,
observed it won't reparent assist type task to split-secondary-root.

Change-Id: I648dc74e2e44d62a0e40d50b29b08dd23b85ed26
2021-05-14 01:38:36 +08:00
Jerry Chang
93edc1eae5 Fix wrong split bounds in legacy split flicker tests
Fix: 188013792
Test: passed presubmit
Change-Id: I675633a078d172f9c8cd836980658c4f2aa2d246
2021-05-13 16:23:42 +08:00
Wei Sheng Shih
a9cbf391e0 Merge "Enable app reveal animation after splash screen." into sc-dev 2021-05-13 01:40:49 +00:00
Jason Chang
1d1ea541f0 (1/n) Disabling OHM gesture in NavigationBar 3 Button mode
1) UX mentioned the swipe gesture in 3-Button NavgationBar area
may confuse user from taping NavBar buttons(Back, Home, Recents).
They decide to disable the swipe gesture and allow user to trigger
One Handed Mode(3 Button Mode) through A11y shortcut.
However, user can still use OHM by enabled shortcut button on
both Gesture Navigation & 3-Button mode.

2) OHM gestural handler consume the touch event while window
Magnification overlap with NavigationBar area in 3-button mode,
this result Magnification function can no long obtain the control.

Bug: 184903678
Bug: 179648683

Test: manual
Test: atest WMShellUnitTests
Change-Id: Ib9a06e19d749707e6f5e08c3ef803c1681f86bbc
2021-05-13 08:47:56 +08:00
chaviw
fb796315ed Add CAPTURE_BLACKOUT_CONTENT permission
Added a permssion to allow an application to capture screenshots of
layers that would normally be blacked out.

Test: Builds, screenshots still work as before
Test: ScreenshotTests
Bug: 173746627
Change-Id: I27237c8e340904cbaa82c7e5793de35cab85d8de
2021-05-12 18:00:36 -05:00
Chris Li
806b5b8ed6 Merge "Determine whether to support activities in multi window (5/n)" into sc-dev 2021-05-12 22:37:41 +00:00
Ben Lin
4c21ac8f33 Merge "PiP: Update menu state AFTER animation is done for show/hide/resize." into sc-dev 2021-05-12 21:34:48 +00:00
Ben Lin
8c39ee10d3 Merge "PiP: Recheck condition to pass input to menu." into sc-dev 2021-05-12 21:33:01 +00:00
Leon Scroggins III
4dda15cd27 PIP: Always enable rounded corners
Bug: 187922869

Previously, we turned on rounded corners with a sysprop in
bf309e63d4. Now that a bug in rendering
them in landscape has been fixed, remove the sysprop and always use
the rounded corners radius specified in the xml file.

Change-Id: Ib0f61bbcbee6ead82beec2b149b0892836492b78
2021-05-12 10:37:43 -04:00
Jordan Demeulenaere
ac3b62b2d0 Merge "Scale splash screen icon by 1.2 instead of 1.3" into sc-dev 2021-05-12 13:19:10 +00:00
Jordan Demeulenaere
c970b02ee0 Enable app reveal animation after splash screen.
Bug: 184830058
Test: Open an app
Change-Id: I91746ebb8fd86d4db8c94a42712da094009d49be
2021-05-12 10:21:32 +00:00
Ben Lin
dcecbaed57 PiP: Recheck condition to pass input to menu.
This used to be OR (pip is not stashed), but it should be AND.

Bug: 186499713
Test: Double tap on where the play button should be even when the menu
is not visible, no longer pauses

Change-Id: If8e101286ddfbb83caf0d6a85a1089e6c257f996
2021-05-11 16:23:40 -07:00
Sunny Goyal
b04efdff70 Merge "Removing generalization from OneHandledAnimationController" into sc-dev 2021-05-11 16:20:44 +00:00
Jordan Demeulenaere
4acb22437c Scale splash screen icon by 1.2 instead of 1.3
Bug: 186847483
Test: Open an app
Change-Id: I889df24a8a39bafa3c4c5eec6b14536a7cc804a2
2021-05-11 17:15:54 +02:00
Chris Li
375ce7fe52 Determine whether to support activities in multi window (8/n)
Dismiss multi window from Shell if the task no longer supports multi
window.

Bug: 176061101
Test: manually test with fold/unfold
Change-Id: Ie8bdb70ed63805c6e51a20e6db8f02e91f18dd35
2021-05-11 04:21:40 +00:00
Chris Li
43d99647e4 Determine whether to support activities in multi window (5/n)
Update Task/ActivityRecord to use the new elgibility check and update
tests

Bug: 176061101
Test: pass existing
Change-Id: Ibb78a43d5901a604b02904be0a0bfdc6da0eb421
2021-05-11 04:20:49 +00:00
Riddle Hsu
81e85863e5 Merge "Skip creating config context if it is the same as current" into sc-dev 2021-05-11 04:15:57 +00:00
Hongwei Wang
57618b94ef Merge "Unify round corner radius in PipSurfaceTransactionHelper(s)" into sc-dev 2021-05-11 03:23:11 +00:00
Jordan Demeulenaere
0cd1d01d63 Merge "Polish the app reveal animation." into sc-dev 2021-05-10 14:09:51 +00:00
Bill Yi
bca4acc749 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I0fb1a33648fe6a9f57a7f1412ad03164eebacb0b
2021-05-07 04:29:30 +00:00
Jordan Demeulenaere
37a3c61b82 Polish the app reveal animation.
This CL polishes the app reveal animation after a cold start. It does so
by:

1. Fading out the icon during 233ms before revealing the app, as spec'ed
   in the direct [1].
2. Animating the reveal gradient opacity from 0 too 100% (instead of
   starting at 100% opacity directly).

See b/184830058#comment7 and #comment13 for before/after videos.

[1] https://direct.googleplex.com/#/spec/241550001

Bug: 184830058
Test: atest SplashscreenTests StartingSurfaceDrawerTests
Change-Id: Ie4561887a259eec398f8f347050f27a094026945
2021-05-06 15:25:55 +02:00
Vadim Caen
279e06697b Merge "Support enable default splash screen reveal aninatmion" into sc-dev 2021-05-06 10:03:56 +00:00
Riddle Hsu
0c54f2192f Skip creating config context if it is the same as current
If the launching app is fullscreen on default display, the task
config should be the same as current global config. Then it is
unnecessary to create a context again.

Use diffPublicOnly because task config may have specified windowing
mode, which won't affect resources resolving.

It saves up to 4ms when adding splash screen starting window.
Also simply the initialization a bit.

Bug: 187104264
Test: OpenAppMicrobenchmark
Change-Id: I2bc7e8dfba3b1d8ad501f6935080a86f2c45f032
2021-05-06 16:15:29 +08:00
Riddle Hsu
a54290f36b Merge "Load icon of splash screen only once" into sc-dev 2021-05-06 02:28:59 +00:00
Bill Lin
f94486117f Merge changes from topic "ohm-shortcut" into sc-dev
* changes:
  3/ Listen ONE_HANDED_MODE_ACTIVATED for A11y shortcut action
  2/ Implement Shortcut for One Handed mode feature
2021-05-05 23:43:12 +00:00
Ben Lin
150072f401 PiP: Update menu state AFTER animation is done for show/hide/resize.
When hiding the menu, there is a brief moment where the menu hide
animation is running, but the menu is already set as hidden in
mMenuState. In that case, other menu operations, such as resizing it,
would no-op, since it assumes the menu is not visible to the user
anymore. We will update the menu at end of the animation so that before
the animation finishes, we will respect that the menu is still in its
previous state. This will break apart the callback into two parts -
onMenuStateChanging, and onMenuStateChangeFinish.

Additionally, PipAnimationController used to only control animating the
PiP leash, but not the menu. This CL also adds a handler callback to
allow menu controller to apply the transaction.

Bug: 185513811
Bug: 186424689
Test: Tap once (show menu), pinch resize - menu resizes & fade along
with the resize
Test: Resize to smallest size, tap once (so that it grows bigger), and
then tap outside region - see that the menu no longer lags behind on
fading out.

Change-Id: I4432961aff074f4569d5d6d61b0e917511e2cbad
2021-05-05 13:41:12 -07:00
Riddle Hsu
2595465821 Load icon of splash screen only once
It is unnecessary to load icon without scale and load again
with scale. Just load the scaled one directly.

The construction time of SplashScreenView:
Dialer  : 36ms -> 24ms
Messages: 21ms -> 13ms
Contacts: 27ms -> 16ms

Bug: 187104264
Test: OpenAppMicrobenchmark
Change-Id: I0b71d3038f85a0839af862e5822e10fccbe1395d
2021-05-05 23:50:06 +08:00
Vadim Caen
b5881bd59f Merge "Remove uses of deprecated splashscreenContent attribute" into sc-dev 2021-05-05 12:45:40 +00:00
Jerry Chang
6a60e58c46 Merge "Add a flag to determin whether to support legacy split" into sc-dev 2021-05-05 06:33:39 +00:00
Mady Mellor
ae6e4330be Merge "Add the priority person highlight back to bubbles badge" into sc-dev 2021-05-04 20:10:55 +00:00
Sunny Goyal
1a62ef4056 Removing generalization from OneHandledAnimationController
Bug: 152086714
Test: Manual
Change-Id: I812c4c7163dc55a1e76b6423fd4fc9fce20f8a9a
2021-05-04 12:56:52 -07:00
Mady Mellor
16529a2613 Merge "Bubbles: fix some issues with the pointer" into sc-dev 2021-05-04 16:47:23 +00:00
Vadim Caen
c784a70726 Remove uses of deprecated splashscreenContent attribute
Test: atest CtsWindowManagerDeviceTestCases:SplashscreenTests#testSplashscreenContent
Bug: 182271482
Change-Id: If84fe4eff95afd4fe89754b25aa160f50d605c3a
2021-05-04 14:07:06 +02:00
Bill Lin
02f635462b Merge "OneHandedUiEventLoggerTest sometimes flaky" into sc-dev 2021-05-04 10:12:06 +00:00
Bill Lin
77f40a59bf Merge "Refine dump info of One Handed Mode components" into sc-dev 2021-05-04 08:37:59 +00:00
Mady Mellor
1f6d6d5d33 Add the priority person highlight back to bubbles badge
In BubbleViewInfo task where the icons are fetched, we were creating
the ringed badge for priority people but we weren't using it. Instead
the original badge drawable was being used.

This switched the app badge to be a bitmap & uses the bitmap with the
priority person ring.

Also fixes an issue where the ring would draw through a badge that
also had the work profile indicator. This is done by drawing the
highlight first and then drawing the badge on top.

Test: manual 1) have a conversation notif that can bubble
             2) mark it as priority
             => Observe that the bubble is created and it has the
                ringed bitmap
             3) dismiss the bubble
             => check that the ring is present on the bubble in the
                bubble overflow
             4) repeat above steps with a bubble from workprofile,
                ensure it has the ring and the workprofile badge
Bug: 185202938
Change-Id: Ief297f073f9684930b3a08fd93e90bbaae3180ca
2021-05-03 15:35:38 -07:00
Mady Mellor
794e3f0922 Bubbles: fix some issues with the pointer
* Pointer was missing if showing vertically on the right
  side, this is fixed & tried to make the code a lil more
  clear
* Pointer was missing for the bubble overflow, this is
  also fixed

Bug: 181888630
Test: manual - make sure the pointer is visible when the
               stack is expanded, check landscape left &
               right on small & large screen and check
               portrait on phone.
Change-Id: Id7dc6ae9a1f3e798940342b780940fb77ceaed3a
2021-05-03 11:54:12 -07:00
Jerry Chang
fedf86ed49 Add a flag to determin whether to support legacy split
Bug: 187041611
Test: launch with adjacent flag won't trigger stage split
Change-Id: Iefaad20636dda88caa6988802d1b7640b5077e4e
2021-05-03 23:36:45 +08:00
Bill Lin
214bff101f Merge "Refactor OHM to use (float)offset for translating windows" into sc-dev 2021-05-03 09:49:20 +00:00
wilsonshih
3221600d7e Support enable default splash screen reveal aninatmion
- Add a temp flag persist.debug.enable_reveal_animation so user can
enable reveal animation.
- Remove icon shift animation.
- For shift up animation, use AnimationAdapter to capture the surface
control and pass to Shell, then cancel the animation when
WindowState#removeIfPossible for starting window.
- Fix the flicker test fail issue caused from shift up animation, the
surface control should be release after the last frame was commit.
- Use SyncRtSurfaceTransactionApplier to synchronize the shift-up
animation, and use vsyncId to ensure the transaction doesn't applyied
too early.
- Do not play reveal animation for empty splash screen.

Test: atest SplashscreenTests StartingSurfaceDrawerTests
Bug: 183004107
Bug: 182815506
Bug: 184830058
Change-Id: I4fc8456633b3f4ecd69b168e0222915945210426
2021-05-03 16:20:09 +08:00
Bill Lin
0a117d8fca Refine dump info of One Handed Mode components
1) "ComponentName" + "States:" Sometimes confuse developers
   (e.g: OneHandedControllerStates)
2) The indent of OneHandedSettingsUtil is incorrect

Test: adb shell dumpsys activity service com.android.systemui
Test: make
Bug: 187014022
Change-Id: Icca01221986efdf9a1f9975efa30e485c5be36b0
2021-05-03 15:30:56 +08:00
Bill Lin
eb9b719bc5 3/ Listen ONE_HANDED_MODE_ACTIVATED for A11y shortcut action
- Observe ONE_HANDED_MODE_ACTIVATED secure settings key
- Skip action when OneHandedState is in transition
  1. STATE_ENTERING
  2. STATE_EXITING
- Skip action if current OneHandedState = request activate
  1. STATE NONE -> Shortcut request ACTIVATED : StartOneHanded
  2. STATE_ACTIVE -> Shortcut request non ACTIVATED : StopOneHanded
  3. STATE_NONE -> Shortcut request non ACTIVATED : SKip
  4. STATE_ACTIVE -> Shortcut request ACTIVATED : Skip
- Controller will update latest state to secure setting
  ONE_HANDED_MODE_ACTIVATED either trigger by gesture or shortcut

Test: atest WMShellUnitTests
Test: enable shortcut and click
Bug: 182425480
Change-Id: I03bd2679a5a08801efc9868148adfddef87171f4
2021-05-03 15:04:24 +08:00
Bill Lin
0fd7baaf31 OneHandedUiEventLoggerTest sometimes flaky
Check : go/wm-tests

Ignore the unit tests until the better approach available

Test: atest WMShellUnitTests
Bug: 184813408
Change-Id: I3139afa58ed15c535a55822504c3331771f1bfdf
2021-05-03 12:45:33 +08:00
Jerry Chang
5663de7849 Merge "Make sure to reorder side stage above main stage to prevent flicker" into sc-dev 2021-05-03 02:36:14 +00:00
Jerry Chang
57b13e327f Make sure to reorder side stage above main stage to prevent flicker
Always reorder side stage to the top whenever there's a child task
appeared in side stage. This is needed to prevent main stage occludes
newly launched task in side stage and causing itself flipping between
fullscreen and multi-window windowing mode.

Fix: 186614428
Bug: 169271875
Test: enter staged split by launching task with adjacent flag, screen
won't flicker

Change-Id: I9176a97439d687bbc7b0bf2dd9ddfdaecacfa455
2021-05-01 01:26:24 +08:00