Commit Graph

1084 Commits

Author SHA1 Message Date
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
Mady Mellor
16529a2613 Merge "Bubbles: fix some issues with the pointer" into sc-dev 2021-05-04 16:47:23 +00: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
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
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
Mady Mellor
23f3d34103 Merge "Restrict the width of bubble expanded view on large screens" into sc-dev 2021-04-30 16:07:54 +00:00
Jorge Gil
83c75ac733 Merge "Synchronize PIP menu fade out with task dismiss" into sc-dev 2021-04-30 15:53:32 +00:00
jorgegil@google.com
b2f5a2f985 Synchronize PIP menu fade out with task dismiss
This CL addreses two issues:
1. PipMenuView.dismissPip was previously fading out the PIP
menu, waiting for that to complete, then notifying the task
organizer to remove and fade out the window, and then it would
fade the menu out again even though it was already hidden.
This resulted in a quick flash because the menu and the window
are not faded out in sync.
2. The menu fade out animation had a fixed duration of 150ms,
meaning that even if it starting fading out at the same time
as the PIP window, it would not finish at the same time because
the PIP exit anim duration is longer.

To fix both of them, the X button now hides the menu and starts
dismissing the task at the same time (once), and the dismiss
animation duration is equal to the task fade out animation
duration.

Previous: http://recall/-/e8RgaQ0dFlwFuh0c7GRpyy/g7XMbvBGMyAOKZMuFlYpW0
With CL: http://recall/-/e8RgaQ0dFlwFuh0c7GRpyy/g7XMbvBGMyAOKZMuFlYpW0

Bug: 182727923
Test: Tap X to dismiss PIP, no flashes seen
Change-Id: If9bdda8d0fd8b819c00ec4a592d1b2441d642d00
2021-04-29 17:56:02 -07:00
Mady Mellor
8e29f94a89 Merge "Fix text color for bubble user education screens" into sc-dev 2021-04-29 23:00:20 +00:00
Ben Lin
7fc1313d39 Merge "PiP: Take inset into consideration when calculating stash offset." into sc-dev 2021-04-29 22:51:26 +00:00
Mady Mellor
8e5f4733ee Restrict the width of bubble expanded view on large screens
* Width is restricted via padding applied to the view when the device
  is considered large screen
* Adjusted animation code so bubbles slide in from edges when showing
  vertically
* Overflow uses max height available when on a large screen
* Fixed a bug where overflow height wasn't being updated correctly
  since it's no longer using an activity
* Fixed a bug where when the view was expanded & you rotated its
  position could be off

Test: manual - expand bubble on large screen from left / right edges
               in landscape & portrait
            => bubbles should be anchored to edge they are opened from
               & positioned vertically along the edge
             - expand bubble on phone in portrait
            => bubbles should be anchored to the top edge &
               horizontally
             - expand bubble on phone in landscape, check overflow
            => bubbles should be anchored to the edge they are opened
               from & positioned vertically along the edge, the
               overflow should have a restricted width
Bug: 175211639

Change-Id: I7c3f3024260a08ebdf4c6e7c7724e51fbc480f61
2021-04-29 15:24:49 -07:00
Mady Mellor
435ab536c2 Fix text color for bubble user education screens
Test: manual - look at user education screens for the bubble stack and
               manage button in light & dark theme and make sure the
               text is as expected
Bug: 183238079
Change-Id: Ia83b2e849f46c3e3eb055ff263a0171f4ad62288
2021-04-29 12:57:07 -07:00
Chris Li
f9c4ee1fd3 Merge "Move legacy split screen flicker tests for non-resizable to presubmit" into sc-dev 2021-04-29 17:49:15 +00:00
Nataniel Borges
8a26f00f1f Merge "Fix pip window visibility assertions" into sc-dev 2021-04-29 15:51:59 +00:00
TreeHugger Robot
c8a0871269 Merge "Disable flaky app pair assertions" into sc-dev 2021-04-29 15:18:23 +00:00
Nataniel Borges
4b2f1da126 Fix pip window visibility assertions
1) Fix `Could not find: PipApp`, the test previously used the launcher name, instead of the window name for assertion

2) The command previously missed a `verify` call to actually execute the assertion

Bug: 186115871
Bug: 186445782
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Ie9274e273bcda2be24491705cd28d7dc0d5ea5db
2021-04-29 12:02:31 +02:00
Bill Lin
57f37bf143 Refactor OHM to use (float)offset for translating windows
The core function of OHM is translate all windows down
instead of resize, it's unnecessary to set WCT & app bounds
that will introduce DA require to cache configuration in
DAInfo as well as handle configuration changes stuffs

This change ensure App Compat mode works good:
- Remove wct.setBounds() & wct.setAppBounds()
- Use float instead of bounds for transition/animation
- Remove unused code
- Reset setWindowCrop(leash, -1, -1) after rotate
- Reset setCornerRadius(leash, -1) after rotate
- Add dump() for OneHandedAnimationController
- Add dump() for OneHandedSurfaceTransactionHelper

Test: atest WMShellUnitTests
Test: maunal trigger OHM, rotate, and obseve function works
Bug: 184091042
Bug: 181091031

Change-Id: I401d9b8a79a2a1526b8683362a1e0330458141b1
2021-04-29 12:14:29 +08:00
Ben Lin
a4c8a3c524 PiP: Take inset into consideration when calculating stash offset.
When stashing, currently it assumes the entire display is usable - not
taking into insets into consideration that can be caused by navigation
bar, etc.

Bug: 186698828
Test: Manual. Stashing PIP while w/ insets now stashes correctly.
Test: atest PipSnapAlgorithmTest
Change-Id: Ia6cbb8f21b666a4ba4ee10b84e3087b6a23cd982
2021-04-28 19:31:40 -07:00
Chris Li
328079de27 Merge "Determine whether to support activities in multi window (1/n)" into sc-dev 2021-04-29 01:09:53 +00:00
TreeHugger Robot
088d1b952c Merge "Fix tapping on divider bar several times makes split sloggish" into sc-dev 2021-04-29 00:09:14 +00:00
TreeHugger Robot
ac126aa920 Merge "Hide the manage menu when switching to overflow" into sc-dev 2021-04-29 00:05:29 +00:00
Ben Lin
cabb4a0317 Merge "PiP: Add ResizeGestureHandlerTest." into sc-dev 2021-04-28 20:59:04 +00:00
Mady Mellor
b97a4cb691 Hide the manage menu when switching to overflow
Test: manual - open a bubble, tap the 'manage' button
             - tap the overflow
             => observe that the manage menu is hidden smoothly &
                then the overflow is shown
Fixes: 185263101
Change-Id: I1703db6c5eacdec6eaab7bdebac9a910cd0ccfa9
2021-04-28 18:29:20 +00:00
Chris Li
2e02036650 Move legacy split screen flicker tests for non-resizable to presubmit
Fix: 182235458
Test: pass existing
Change-Id: Ia139972beae25fcb60dc68c11c2d50efc38e00cf
2021-04-28 16:46:58 +00:00
TreeHugger Robot
4a44c4f4d7 Merge "Fix duplicate bubbles in the overflow" into sc-dev 2021-04-28 14:47:52 +00:00
Jerry Chang
59f0ef3535 Fix tapping on divider bar several times makes split sloggish
Make sure it won't introduce redundant fling animation when touch on
divider bar didn't exceed tap threshold. This make sure it won't queue
extra sync transactions with SyncTransactionQueue. Also skip redundant
checks after detected double tap in staged split.

Fix: 186626153
Fix: 179004532
Test: tapping on divider bar of legacy and staged split, it won't make
split sloggish.

Change-Id: I2a326f54f25d77e86fa51bca67b68daca21dedfc
2021-04-28 22:08:00 +08:00
TreeHugger Robot
da2192eacf Merge "Disable flaky pip/app close tests (flicker)" into sc-dev 2021-04-28 10:13:57 +00:00
Nataniel Borges
d825929c73 Disable flaky app pair assertions
Assertion is flaky in presubmit

Bug: 186510496
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Ic796c86d555376283adbcdb06ea80c6d9ddbfe07
2021-04-28 10:05:16 +02:00
Chris Li
cde271685f Determine whether to support activities in multi window (1/n)
Add a field of supportsMultiWindow to TaskInfo for WM Shell to use.

Because we will change to Task#supportsMultiWindow to check the
support based on the root activity's resizibilty, min widht/height,
and the device settings, using this to replace the check in
ActivityTaskManager, which is pure device settings.

Bug: 176061101
Test: atest WMShellFlickerTests
Change-Id: Iad94b39506e71b6224d923f02bd7fc454cae02c8
2021-04-27 23:59:38 -07:00
Bill Lin
e19e708408 Merge "Revert "Revert "1/ Add onStartTransition() callback for SYSUI_ST..."" into sc-dev 2021-04-28 03:14:29 +00:00
TreeHugger Robot
f3b5218808 Merge "Prevent caching unexpected IME status while showing keyguard in split" into sc-dev 2021-04-28 02:27:46 +00:00
Mady Mellor
495b7069c6 Fix duplicate bubbles in the overflow
* If something was added to the overflow that was already there
  make sure to remove it from the list first
* Did this in data & in update adapter to be safe

Bug: 181890793
Test: atest BubbleDataTest
Change-Id: I2a576911e0f3791768536f4a866d7174f55a0a2d
2021-04-27 17:00:44 -07:00
Chris Li
4bc72c96db Merge "Fix EnterSplitScreenNotSupportNonResizable flaky" into sc-dev 2021-04-27 19:50:35 +00:00
Mady Mellor
95de12ed62 Merge "Bubbles: improve how rotation is listened for" into sc-dev 2021-04-27 17:08:19 +00:00
Nataniel Borges
73e2773099 Disable flaky pip/app close tests (flicker)
Some tests are still flaky and affecting presubmit

Bug: 185400889
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I477799646791c69b71c6f29d71e87caba900a983
2021-04-27 14:58:56 +02:00
Bill Lin
99d6eee148 Revert "Revert "1/ Add onStartTransition() callback for SYSUI_ST..."
Revert submission 14315426-revert_fix_ohm_exit_flicker

Reason for revert: The root cause of b/186197537 is ag/14296935
I should safe to re-landing the 2 CLs

Reverted Changes: 
Ifd17094f0:Revert "1/ Add onStartTransition() callback for SY...
Ia921d073c:Revert "2/ Resolve gesture one handed conflicts sw...

Change-Id: Ieccadf78ab873e00efa5102348c3787f00bd3275
2021-04-27 10:13:29 +00:00
Wei Sheng Shih
11b1cb280b Merge "Load higher resolution resource for icon on splash screen when needed" into sc-dev 2021-04-27 06:01:29 +00:00
Jerry Chang
8bfee40f41 Prevent caching unexpected IME status while showing keyguard in split
While showing keyguard in split, it hides divder bar surface instead of
updating visibility of divider bar view. Updates to make sure
DividerImeController only caches IME status when the divider bar surface
is shown.

Fix: 186466549
Test: manul check password keyguard while in split
Change-Id: I64b406ea3d93cc196fe3304720391b8cb5310111
2021-04-27 13:36:45 +08:00
Bill Lin
68f119447b Merge "Revert "1/ Add onStartTransition() callback for SYSUI_STATE_ONE_HANDED_ACTIVE"" into sc-dev 2021-04-27 03:37:31 +00:00
Jason Chang
40c86a7b16 Merge "Integrate DisplayLayout for Tutorial window of One handed mode" into sc-dev 2021-04-27 00:23:57 +00:00
TreeHugger Robot
929d2ce07d Merge "Support FLAG_ACTIVITY_LAUNCH_ADJACENT for launch root with adjacent" into sc-dev 2021-04-27 00:03:34 +00:00
Bill Lin
e3e06447cb Revert "1/ Add onStartTransition() callback for SYSUI_STATE_ONE_HANDED_ACTIVE"
This reverts commit 3e20856215.

Reason for revert: test for b/186197537

Change-Id: Ifd17094f0231b0d6efcf1318cbc86560c5a8f6d1
2021-04-26 23:35:09 +00:00