Commit Graph

1826 Commits

Author SHA1 Message Date
tomnatan
5cf6507e51 Update size compat restart button surface position after display insests changed
Fix: 204532180
Fix: 182905588
Test: atest WMShellUnitTests:SizeCompatUIControllerTest
Test: atest WMShellUnitTests:SizeCompatUILayoutTest
Change-Id: Icda54db231783f576832b22e4d286fe0524a2088
Merged-In: Icda54db231783f576832b22e4d286fe0524a2088
2021-11-05 02:14:10 +00:00
Jerry Chang
cb5907cc57 Merge "Fix unable to drag notification to enter split screen" into sc-v2-dev 2021-11-03 08:45:41 +00:00
Winson Chung
3e90f3b5be Merge "Abstract out common code for managing a single instance remote callback" into sc-v2-dev 2021-11-03 03:04:18 +00:00
Wu Ahan
43f59bb11b Merge "Instrument jank of splash screen AVD and exit animation" into sc-v2-dev 2021-11-03 02:44:08 +00:00
Jerry Chang
4d61bbca3b Fix unable to drag notification to enter split screen
Fix exception when resetting adjacent launch root, dragging expandable
notification and logging unknown activity dragging event.

Fix: 202276040
Fix: 197968594
Fix: 204900540
Test: tests passed
Test: drag expandable notification to split won't fail
Change-Id: I4bb6c361df2034547079a6e9d932b0f5589b3e35
2021-11-03 10:22:26 +08:00
Jerry Chang
7d7857b2c5 Merge "Support to transfer freeform task into split screen" into sc-v2-dev 2021-11-03 00:39:26 +00:00
Winson Chung
9f7ea0a38f Abstract out common code for managing a single instance remote callback
- Pull code that manages the lifecycle of the callback into its own
  class which takes care of cleaning up any callback references and also
  listening for when the binder dies
- Removing some boilerplate code

Bug: 202740477
Test: atest WMShellUnitTests
Change-Id: I7ff4c876fc14291d6523c2c62a7c453a01d96294
2021-11-02 17:04:03 -07:00
Tom Natan
2d213c397a Merge "Redesign the size compat restart button according to mocks." into sc-v2-dev 2021-11-02 15:22:05 +00:00
tomnatan
825e55ed60 Redesign the size compat restart button according to mocks.
The width of the hint is constant but the height changes with respect to the number of lines the text requires (see screenshots below). The X position of the hint is set programmatically so that the point's center will be aligned with the button's center.

Still need to add UI for different states of the button (pressed, focused, etc.) and maybe also the hint (since it's clickable). Mocks for this are still TBD.

Mocks: https://www.figma.com/file/fLAVOdDkg0lnFWiltSYbGA/Multitasking?node-id=2719%3A54196

Screenshots:
[default - 2 lines]    http://screen/4EtytFiKsY3Q5NE
[LTR language]         http://screen/9BSPipZYUd7UGPV
[short text - 1 line]  http://screen/AN5bds6rh5V55Bw
[large font - 3 lines] http://screen/6utG596y52LBDjX
[long text - 4 lines]  http://screen/7mBL2fXWy43UsTq

Bug: 198347324
Test: atest WMShellUnitTests:SizeCompatRestartButtonTest
Test: atest WMShellUnitTests:SizeCompatHintPopupTest
Test: atest atest WMShellUnitTests:SizeCompatUILayoutTest
Change-Id: Ida4c4171be94b60499cfe8acb6a2278f7e10a1f3
2021-11-02 13:17:19 +00:00
Jerry Chang
bd8b345337 Support to transfer freeform task into split screen
Clear overrided windowing mode and window bounds when a task vanished
from freeform task organizer to make sure the task can inherit config
from its new parent.

Fix: 204842882
Test: put a task in freeform, then trigger split screen with such task,
      observed it applied multi-window windowing mode and bounds
      properly.
Change-Id: Ifb100d17a83931237e58bcd774dce304a3fdb731
2021-11-02 16:50:18 +08:00
Sergey Serokurov
1837681488 Merge "Hide bubbles when focus mode is enabled" into sc-v2-dev 2021-11-02 00:31:23 +00:00
Hongwei Wang
fdf6eedb10 Merge "Avoid conflict surface reset on auto-enter-pip" into sc-v2-dev 2021-11-01 20:51:41 +00:00
Jerry Chang
7b04c3ba76 Remove redundant operations of split screen
Make moveToSideStage doing reparent oeprations only and leave all the
other active operations to onStageHasChildren. Also make sure it evicts
original children.

Remove setLaunchRoot and setWindowingMode operations in MainStage since
it won't be set as launch root and won't change in between of fullscreen
and multi-window windowing mode anymore.

Fix: 204519739
Bug: 202740040
Test: atest WMShellUnitTests
Change-Id: I6199862502646056966412824a5be840a15e8726
2021-11-01 16:43:26 +08:00
Sergey Serokurov
102451972f Hide bubbles when focus mode is enabled
Bug: 191211593
Test: Manual, verifed that pre-existing bubbles are not visible once focus mode is eanbled and vice versa.
Test: Screen recording: https://drive.google.com/file/d/1oVwgQhv7yyzy5UFnidNYPVyE2pvEE39J/view?usp=sharing
Change-Id: I7c287b9d00ecaa0dba582b49f70a9f8fb7701782
2021-10-31 11:32:49 -07:00
Hongwei Wang
5c80561b44 Avoid conflict surface reset on auto-enter-pip
FullscreenUnfoldController#resetSurface happens in between
RecentsAnimationController cleanup and PipTaskOrganizer#onTaskAppeared
may cause flicker at the end of auto-enter-pip transition.

Fix it by intentionally ignore resetSurface if the task's pinned.

Bug: 203724707
Bug: 204284060
Test: repeatedly swipe to enter PiP from YT on foldables
Change-Id: Ie074e8a506d2526fc081ff4d089a2acb00549286
2021-10-29 14:24:40 -07:00
Tony Huang
2003f5796c Fix side stage cannot be focused
When split active by drag drop, the active point is
onStageHasChildrenChanged callback but we don't reorder side stage
to top then make it cannot be focused.

Add reorder root to top for fixing.

Fix: 204510713
Test: manual
Test: pass existing tests
Change-Id: I553a57250c302ff435a35c9a10599fc375e48248
2021-10-29 22:03:53 +08:00
Tony Huang
70b7b1e2d8 Fix divider rounded corner on specific devices
On large rounded corner devices, Rounded corners around divider
cannot display right corner path because it need more space to
draw corners and divider bounds is fixed.

Fix this by enlarging the divider window bounds. However, if we only
enlarge it, it will cause divider touch region too big to make app
hard to interactive. Therefore, migrate touch region setting logic
in legacy split to here, only set divider handle view size as touch
region.

Fix: 202808282
Test: flash on barbet and active split screen to check
Test: pass existing tests
Change-Id: If292c0d4c598d75672ec821d1fee45a8892b236f
2021-10-28 09:01:37 +08:00
TreeHugger Robot
1679d92eef Merge "Update split resizing transition to match design" into sc-v2-dev 2021-10-27 23:18:07 +00:00
Jerry Chang
222c9d3890 Update split resizing transition to match design
Remove the support of drawing side stage outline and update
OutlineManager to SplitDecorManager to help rendering decor view for
split screen like providing resizing hint.

Fix: 202740435
Fix: 202174975
Bug: 201653912
Bug: 200850654
Test: atest WMShellUnitTests
Test: manual check split resizing behavior

Merged-In: I4033255d8e2a94f69667ca1365b17da956816cde
Change-Id: I4033255d8e2a94f69667ca1365b17da956816cde
2021-10-27 23:22:33 +08:00
Tony Huang
cb7e987bb5 Merge "Fix split black when enable in landscape" into sc-v2-dev 2021-10-27 01:35:52 +00:00
Ben Lin
0aa2fa5b40 Merge "PiP: Fix more Shell Transition potential issues." into sc-v2-dev 2021-10-27 00:11:13 +00:00
Tony Huang
b58a09a59e Fix split black when enable in landscape
We assume dismissing side should be DOCKED_INVALID when split
active, however, if snap algorithm only have one target, it will
get other side due to current algorithm.

Fix this by correct algorithm and ensure dismissing side be
DOCKED_INVALID when split active or layout.

Fix: 203745267
Test: manual
Test: pass existing tests
Change-Id: I077a93472dad89bc620e490dcae5170e9a56279b
2021-10-26 15:53:05 +08:00
Wei Sheng Shih
26f39bdc52 Merge "Prevent receive extra callbacks from AnimatorListener." into sc-v2-dev 2021-10-26 05:12:02 +00:00
Ben Lin
f71a1b2970 PiP: Fix more Shell Transition potential issues.
If an animator is already running, we usually just update its end
bounds - but we also end up over-writing the original callbacks. This
used to work well since pre-shell transition, callbacks are always
pulled from PipTaskOrganizer, but now we can have two places that supply
callbacks (PipTransition). So let's just leave the callback alone.

Another potential issue is that sometimes finish callbacks from one
transition is not called before starting another one, and starting a new
transition overwrites the old finishCallback. We will then finish the
earlier callbacks to ensure the transition system does not hang the
entire device, but throw an Exception to not gloss over the potential
issue.

Bug: 183993924
Test: atest PinnedStackTests
Change-Id: Ib4c5926beec5745d8a0abccec5c67849488e532b
2021-10-25 17:13:25 -07:00
TreeHugger Robot
0826811ad3 Merge "Dump mIsSwipeToNotificationEnabled state" into sc-v2-dev 2021-10-25 13:46:05 +00:00
wilsonshih
aeb283f9f6 Prevent receive extra callbacks from AnimatorListener.
There will receive another onAnimationStart/onAnimationEnd callback
when calling ValueAnimator#end if the animation is not running, which
is not necessary if the animation was finished already.

Bug: 195736656
Test: atest SplashscreenTests
Change-Id: Ifbbf2f799e3e69624626b16e08f40b562fe483a8
2021-10-25 20:40:13 +08:00
Shawn Lin
59f51a9538 Merge "Add APIs to get system bar heights" into sc-v2-dev 2021-10-25 04:07:12 +00:00
Wu Ahan
61cd0b63c4 Instrument jank of splash screen AVD and exit animation
Add jank instrument support for splash screen avd and exit animation.

Bug: 195736656
Test: see trace in comment
Change-Id: I1fdb9e14145bcf519eea99e440de74238e3c765c
2021-10-25 03:56:42 +00:00
Jerry Chang
d0cda70d27 Fix drop to enter split not working
Sometimes when dropping app icon to enter split screen, it'll exit split
screen immediatlly because it evicts newly launched task before the task
considered to be visible. Update to collect child tasks to evict before
launching activity.

Fix: 203610931
Fix: 203636251
Test: atest WMShellUnitTests
Change-Id: If070fb5b3eb0b3fc178122d38b2dce3072621449
2021-10-21 19:02:56 +08:00
Bill Lin
305d699154 Dump mIsSwipeToNotificationEnabled state
Legacy code lack of mIsSwipeToNotificationEnabled when dumpsys

Test: atest WMShellUnitTests
Test: adb shell dumpsys activity service com.android.systemui
Bug: 203742040
Change-Id: I8bad4ff82952ec357131a7606c9ec94441400c07
2021-10-21 15:59:47 +08:00
Jerry Chang
430944cefb Merge "[DO NOT MERGE] Provide IconProvider in sysui dagger" into sc-v2-dev 2021-10-21 01:28:14 +00:00
Evan Rosky
b93d37627d Merge "Fix PiP Shell Transitions" into sc-v2-dev 2021-10-20 16:07:03 +00:00
Jerry Chang
7891acface [DO NOT MERGE] Provide IconProvider in sysui dagger
So that other components can get app icon throught it as well.
Like showing app icon as resizing hint while dragging divider bar in
split screen.

Bug: 202740435
Bug: 201653912
Test: atest WMShellUnitTests
Change-Id: I7cc10be4ebfe7f9aad5db036a595613546ca15c9
2021-10-20 11:26:23 +00:00
TreeHugger Robot
a18b8a827e Merge "Migrate screen rotation latency tracker with shell transition" into sc-v2-dev 2021-10-20 02:12:34 +00:00
Evan Rosky
c6d5abe414 Fix PiP Shell Transitions
PiP Shell Transitions needs to be more robust to pass CTS tests
reliably.

Some changes:

1. DELIVERED_TO_TOP intents don't create a transition since there is
   no change to the WM hierarchy. This way the app-launch transition
   won't conflict with activityRestartAttempt.

2. If PiP started an expand transition while an enter transition is
   ongoing, cancel the enter transition.
   a. Additionally, because PiP doesn't resize task until the enter
      transition finishes, the expand transition will actually be
      a no-op. If we see this pattern, also cancel the enter
      transition.

3. When taskVanished, make sure to call any pending finishCallback
   because it doesn't allow the running animator to properly finish.
   Transition systems require the finish callback to function
   properly.

4. Minimize the uses of finishTransition with a sync callback. We
   probably need to phase this out because it can conflict with
   subsequent startTransition calls (because only 1 sync is supported
   at a time).

Bug: 183993924
Test: atest PinnedStackTests
Change-Id: Ieb573032839a2f31b0bb371410484fc93a1714fa
2021-10-19 15:50:41 -07:00
Michał Brzeziński
d41437abf4 Merge "Revert^2 "Revert "Provide IconProvider in sysui dagger""" into sc-v2-dev 2021-10-19 14:50:22 +00:00
Michał Brzeziński
9a003a67aa Revert^2 "Revert "Provide IconProvider in sysui dagger""
769f04c8f0

Change-Id: I654c4fb5d393e8ac13840625662fa738359df4df
2021-10-19 14:36:35 +00:00
Riddle Hsu
9cb2c66248 Migrate screen rotation latency tracker with shell transition
It was done by WMS#startFreezingDisplay~stopFreezingDisplayLocked.
The duration is measured from rotation change to start animation.

Add a remote callback to know when the rotation animation is started.
So WM core can have the paired begin/end of trace that matches the
latency exactly.

The added ITransitionMetricsReporter is available for any processes.
So in the future it can also report the metrics from remote animator.
This change focuses on the rotation animation handled by shell.

Bug: 199836343
Test: adb shell setprop persist.debug.shell_transit 1; reboot
      Rotate display and check trace "L<ACTION_ROTATE_SCREEN>".
Change-Id: I180d2fe1a77e98b6427ba831a2db2593739376bd
2021-10-19 19:02:38 +08:00
Shawn Lin
16496cb5c1 Add APIs to get system bar heights
In multi-display devices, there might be differnt cutout on each display
which also causes different status bar height.

Now we no longer overlay the status_bar_height dimen and keep it as
default value and add APIs to calculate the status bar size.

- Add APIs for getting status_bar_height & quick_qs_offset_height in
  system.
- Add APIs for getting split_shade_header_height and
  qs_header_system_icons_area_height in SystemUI.
- Remove all resource overlay for status_bar_height &
  quick_qs_offset_height.

Bug: 186604541
Test: atest SmallClockPositionTest DisplayLayoutTest
      HideDisplayCutoutOrganizerTest SizeCompatTests
      NotificationPanelViewControllerTest
Change-Id: I5a6dfcc6ff06da8ea0fe119fc9d4c089f13b0dff
2021-10-19 14:51:20 +08:00
Chloris Kuo
36a15a906c Merge "Notification text change should not be interruptive during post time" into sc-v2-dev 2021-10-19 01:16:13 +00:00
Jerry Chang
299b926bcf Merge "Revert "Revert "Provide IconProvider in sysui dagger""" into sc-v2-dev 2021-10-19 01:05:00 +00:00
Chloris Kuo
fbe9702f6e Notification text change should not be interruptive during post time
Rename NLS#Ranking.visuallyInterruptive and source from isTextChanged

Bug: 201087764

Test: atest NotificationManagerServiceTest, NotificationRecordTest,
NotificationListenerServiceTest, BubblesTest, BubbleDataTest,
NewNotiPipelineBubblesTest

Change-Id: I5949183704c3747084c83af7737a5212ede48fc0
2021-10-18 20:13:00 +00:00
Mady Mellor
a80ecceba9 Merge "Add a sysui state for manage menu being expanded" into sc-v2-dev 2021-10-18 19:35:05 +00:00
TreeHugger Robot
6f26ef6d74 Merge "Separate split layout shifting callback from layout changed callback" into sc-v2-dev 2021-10-18 14:28:30 +00:00
TreeHugger Robot
3d13d0cbad Merge "Replace tasks in the same split with the dropping app" into sc-v2-dev 2021-10-18 14:27:18 +00:00
TreeHugger Robot
6ba778585f Merge "Synchronize screen turning on and unfold overlay" into sc-v2-dev 2021-10-18 12:28:26 +00:00
Jerry Chang
769f04c8f0 Revert "Revert "Provide IconProvider in sysui dagger""
This reverts commit 289347aedf.

Reason for revert: re-land the CL with CarLauncher change

Merged-In: If4ab0590f4b850103411b6a2dccf2092bb06d563
Change-Id: I5a43908f958b45a936d0e7ac09f96d85d08663b7
2021-10-18 11:02:14 +00:00
Miguel Aranda
b169404b77 Merge "Revert "Provide IconProvider in sysui dagger"" into sc-v2-dev 2021-10-18 09:17:45 +00:00
Jerry Chang
289347aedf Revert "Provide IconProvider in sysui dagger"
This reverts commit f59eccd4a6.

Reason for revert: b/203356785, missed to update CarLauncher correspondingly in sc-v2

Change-Id: I0902b496b69e415fa0208948307fdf3883a1be17
2021-10-18 08:55:36 +00:00
Jerry Chang
f426ad9776 Merge "Provide IconProvider in sysui dagger" into sc-v2-dev 2021-10-18 02:03:24 +00:00