Commit Graph

1688 Commits

Author SHA1 Message Date
Bill Yi
d33678aeda Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I07982d191fa21baf91580868663b0937263ff855
2021-09-10 22:17:28 +00:00
Vinit Nayak
2d113fb2a3 Merge "Update split screen interface to indicate dismissing to top task" into sc-v2-dev 2021-09-09 20:19:19 +00:00
TreeHugger Robot
99ce862e47 Merge "Fix an issue with bubbles overlapping the taskbar" into sc-v2-dev 2021-09-07 18:51:24 +00:00
Wei Sheng Shih
50c8b2d994 Merge "Adding the SurfaceView on splash screen thread." into sc-v2-dev 2021-09-07 10:45:02 +00:00
Tony Huang
6fbb385f24 Merge "Reset cached values when reset divider position" into sc-v2-dev 2021-09-07 06:27:49 +00:00
TreeHugger Robot
f64f48c526 Merge "Prevent NPE when checking focused stage before root task is ready" into sc-v2-dev 2021-09-07 03:35:16 +00:00
wilsonshih
bcb99535f9 Adding the SurfaceView on splash screen thread.
The SurfaceView of the AVD icon should be create on splash screen
thread instead of worker thread, this can guarantee that the first
frame of the FrameLayout and AVD will be draw at the same frame.
And it also become faster by combining two view in same traversal
together.

Also stop the AVD animation after splash screen window removed.

Bug: 195736516
Test: verify no more Choreographer#doFrame on splash screen thread
after splash screen window removed.

Change-Id: I5942db8974f1272d9c26ac19b164312e4424be66
2021-09-07 10:46:38 +08:00
Jerry Chang
553f62019b Prevent NPE when checking focused stage before root task is ready
If the root task of the stage is not created, treat the stage as not
focused to prevent trowing NPE when traversing the root task and its
child.

Fix: 199060332
Test: manual check isFocused won't throw before root task is ready
Change-Id: I3869f934b641c8ffd77730452d0501d65063785c
2021-09-07 09:20:49 +08:00
wilsonshih
c86f1eb19e Use SystemUI theme to inflate FrameLayout and SplashScreenView
The FrameLayout and SplashScreenView are only used as container in
StartingSurfaceDrawer, so they do not need to be inflated by app's
context, which could be affected by app's resources.

Bug: 197936273
Test: cold launch test app and show splash screen.
Test: launch several apps to verify that everything is fine.
Test: atest StartingSurfaceDrawerTests
Change-Id: I6de444546b5dfba23fc1d7c9c4deb12787d667c5
2021-09-06 08:34:55 +00:00
Jerry Chang
c8a54dab1d Update split screen interface to indicate dismissing to top task
Bug: 198310766
Test: atest WMShellUnitTests
Change-Id: I78824605575825a41eb2e507123705bfca6482a2
2021-09-06 10:42:54 +08:00
TreeHugger Robot
6bd19fab1c Merge "[DO NOT MERGE] Sync flicker from master to sc-v2" into sc-v2-dev 2021-09-04 00:15:31 +00:00
Winson Chung
67b04aaef5 Merge "Always inset the IME by the extra nav bar frame height" into sc-v2-dev 2021-09-03 23:46:16 +00:00
Winson Chung
5d5f0987b2 Always inset the IME by the extra nav bar frame height
- If the taskbar is collapsed and isn't providing full insets to the
  app, we still want the IME to be inset for the nav button that shows

Fixes: 197727397
Test: Collapse taskbar, open IME
Change-Id: I9f2367344385c9a23e2d6323637a0b2d1713b169
2021-09-03 23:46:00 +00:00
Evan Rosky
ac3bddc1ce Merge "Wrap IRemoteTransition in a parcelable to enable extra properties" into sc-v2-dev 2021-09-03 19:53:10 +00:00
Evan Rosky
bc94c3d524 Wrap IRemoteTransition in a parcelable to enable extra properties
This is in preparation for attaching some extra meta information
to remote transitions (eg. process token). Most of this refactor
just replaces references to the raw interface with references
to the wrapper class.

There is also a small refactor in RemoteTransitionHandler to
better-manage death-recipients. It is possible to have >1 filter
and >1 pendings referencing the same remote simultaneously, so
this arrangement properly handles the 1-to-many possibility.

Bug: 183993977
Test: refactor, so existing tests pass
Change-Id: Icae8f2128e0ffdf7aee51284cba106963450e3e7
Merged-In: Icae8f2128e0ffdf7aee51284cba106963450e3e7
2021-09-03 17:19:44 +00:00
Wei Sheng Shih
10b3662274 Merge "Release the child layer on TaskSnapshot" into sc-v2-dev 2021-09-03 10:11:37 +00:00
Shawn Lin
97b0de7326 Merge "[DO NOT MERGE]Support rounded corner for multi-display devices" into sc-v2-dev 2021-09-03 03:57:09 +00:00
Tony Huang
7d335eb1c8 Reset cached values when reset divider position
We should reset these cached values when divider position reset
which should be called while split exiting.

Fix: 198557357
Test: pass exist tests
Test: manual
Change-Id: I1606ff785985752c2fd45df84a99979aa5063c64
2021-09-03 11:34:41 +08:00
Mady Mellor
45b2235bd6 Fix an issue with bubbles overlapping the taskbar
Test: manual - have bubbles opened, rotate device
             => observe that bubbles don't overlap
Bug: 196857292
Change-Id: Ic108852e516e18441c265e8a03b0524c4b589b4f
2021-09-02 14:46:26 -07:00
Jerry Chang
10de7a4f56 Fix first drag to split not working
There's a timing when dragging to split opening a new app, the new app
might not be put into DC.mOpeningApps yet while startLegacyTransition
triggering app transition. And result to executing an extra TRANSIT_NONE
app transition. This patch leaves the app transition triggering to
ActivityTaskSupervisor.reportResumedActivityLocked where the new opening
app has been put into DC.mOpeningApps.

With CL[1], it'll invoke onAnimationCancelled when there's no valid app
to anmate while executing app transition. So we don't need to cancel
animation with startActivity result.

Also unbind exit split screen logic with onAnimationCancelled in
wm-shell since it only enters split screen after a new task being
launched/reparented to the side stage root after CL[2].

[1]: I50ddc91f7bd7ed24a977fa3face9c6e56e1bea02
[2]: I1cad96f6265eb1a14369bfc708871f701764066a

Fix: 197917994
Test: drag and drop to split works
Change-Id: If9ab7c3a89c8153c3731103571162fe21c94b3aa
2021-09-02 20:30:32 +08:00
wilsonshih
cbf8798bcf Release the child layer on TaskSnapshot
Try to eliminante the offscreen layer from TaskSnapshot. When remove
the task snapshot window, although the SurfaceControl has destroyed in
WindowManager, but that layer seems still left as offscreen layer in
SurfaceFlinger, a possible reason is there didn't release the copied
layer so that reference keep it alive.

Test: keep hot launch apps and monitor no TaskSnapshot layer left in
offscreen layer.
Bug: 192298258

Change-Id: I6beff78112da2309d4825e185bd960974892f5e8
2021-09-02 19:40:06 +08:00
Tiger Huang
a42a8d6bf3 Merge "Invoke insets animation callbacks when resizing system bars" into sc-v2-dev 2021-09-02 11:12:17 +00:00
Winson Chung
851f1df2f1 Return the existing display ids when registering a display window listener
- This ensures that the caller can synchronously initialize the existing
  displays without waiting for the onDisplayAdded() callback, which can
  happen asynchronously (since the callback is oneway).

Bug: 196186963
Test: atest WMShellUnitTests
Test: atest ActivityTaskManagerServiceTests
Change-Id: I0a8d5f9b4ede7b487a8de14bdb6eaacae7d03d9f
2021-09-01 13:37:31 -07:00
Nataniel Borges
c8287a930f [DO NOT MERGE] Sync flicker from master to sc-v2
Flicker on master diverged form sc-v2, to make it easier to debug
flicker issues on sc-v2, push the current version of flicker into sc-v2

Test: atest FlickerTests WMShellFlickerTests
Bug: 188792659
Change-Id: I1c832bf32214b12ba4b708bccfc95cf259324844
2021-09-01 12:06:21 +00:00
Hongwei Wang
8fdc8dcad7 Merge "Deprecate MENU_STATE_CLOSE for PiP menu" into sc-v2-dev 2021-08-31 19:46:25 +00:00
Jerry Chang
bf71bb09b8 Merge "Draw rounded corners beside split divider bar" into sc-v2-dev 2021-08-31 03:50:53 +00:00
Wei Sheng Shih
421c7d25b8 Merge "Send request top ui to SystemUI when creating splash screen." into sc-v2-dev 2021-08-31 01:25:37 +00:00
Jerry Chang
5514e76d40 Draw rounded corners beside split divider bar
Draw rounded corners beside divider bar which inset with task bar if
the task bar is expanded.

Bug: 196272915
Bug: 182511830
Test: atest WMShellUnitTests
Test: manul check the rounded corners rendered in proper position.
Change-Id: I14c5a9416d52bf06b3e4c8ac843c5a65c0b940b8
2021-08-30 19:39:03 +08:00
wilsonshih
97c3131335 Send request top ui to SystemUI when creating splash screen.
Boost SystemUI's RenderThread to top-app when creating splash screen.

Bug: 195736516
Test: build and flash
Change-Id: Ie6589ec8abf0b3ab799b79ca12cc506cf2b4abdb
2021-08-30 11:20:29 +08:00
Tony Huang
5020a15a43 Merge "Reduce setBounds if bounds not really change" into sc-v2-dev 2021-08-30 03:15:46 +00:00
Tony Huang
4fb674ff67 Merge "Fix black screen when drag divider to bottom" into sc-v2-dev 2021-08-30 03:11:48 +00:00
Winson Chung
a7fedd963d Merge "Fix issues where the task was still touchable in overview" into sc-v2-dev 2021-08-27 20:11:09 +00:00
Winson Chung
04c0fa9bdc Fix issues where the task was still touchable in overview
- Reparent above the top window as an activity can have multiple windows
- Fix ordering when reparenting tasks into the temporary split container
  to match the previous ordering since the input consumer is layered
  above the top window

Fixes: 197571005
Fixes: 195958376
Test: Launch maps > share place > enter overview
      Enable stage split > split > enter overview
Change-Id: I84899e71f079f001eef737217897642460f5832b
2021-08-27 05:55:42 +00:00
Android Build Prod User
61babbcfb5 Merge "Update divider bar layout to match stage split design" into sc-v2-dev 2021-08-27 04:24:41 +00:00
Jerry Chang
074c7291a9 Update divider bar layout to match stage split design
Bug: 197361088
Bug: 196272915
Test: manual
Change-Id: Ic2fed9c6ef5d8004f922d766c7e3d3170846041d
2021-08-27 04:22:22 +00:00
Jerry Chang
a99034d9c6 Only run PipLegacySplitScreenTest when it is using legacy split
Ignore PipLegacySplitScreenTest if the system is not using legacy
split by checking config_useLegacySplit which is set to false since
sc-v2 or on jumbojack device. The flag should be deprecated along with
legacy split screen.

Bug: 189245318
Test: atest PipLegacySplitScreenTest
Change-Id: I6243f0b0990265c96867cb7ee87b6bd0b90330c7
2021-08-27 10:06:31 +08:00
Tony Huang
df08b0c3f9 Reduce setBounds if bounds not really change
When user drag the divider and drop it, we will always set split
window bounds for by transaction. But when bounds didn't changed,
we should avoid it for better performance if user operate roughly.

Bug: 195262673
Test: manual
Change-Id: I872b719395d891cb415159f8751432d5a119ce80
2021-08-26 14:20:12 +08:00
Tony Huang
0c6c558f89 Fix black screen when drag divider to bottom
This issue is caused when divider position is near bottom,
The bounds hight is less than 0 due to our algorithm, if
we do setWindowCrop by this bounds, the surface bounds
status abnormal which show in winscope is full screen.
This situation make dim layer show full screen.

Whether this is Surface bug or not, it can protect it split
side. Fix it by make sure both split bounds width or height
are always larger than 0.

Fix: 197588020
Test: Active stage split, drag divider to bottom then check
Change-Id: I4bcd9ba353432bf852ad4a60b6ca9234c2cd84f1
2021-08-26 13:49:25 +08:00
shawnlin
6603444a76 [DO NOT MERGE]Support rounded corner for multi-display devices
- Add new array configs for every rounded corner configs.
- Update rounded corner drawable when a display changes in
  ScreenDecorations.

Bug: 131221697
Test: atest DisplayCutoutTest RoundedCornersTest LocalDisplayAdapterTest
      ScreenDecorationsTest
Change-Id: I1f32ff680609267010b05a39a5b8e84511bf1243
2021-08-25 15:58:28 +08:00
Tony Huang
c5c1623ee2 Merge "Keep split bounds after configuration update" into sc-v2-dev 2021-08-24 03:17:32 +00:00
Tony Huang
fbc5f923aa Keep split bounds after configuration update
Before this change, split bounds always reset to half-half if
rotation. This is weird on large screen devices because they can
scale bounds in landscape too, so bounds will reset even if from
landscape to seascape.

Add restore mechanism by compute ration of current divider
and total length. Use this ratio to compute estimate position in
new configuration then get suitable snap target. Update divider
position and split bounds by this snap target postition.

Fix: 192533269
Test: pass existing tests
Test: Set density to large screen, active stage split and make top
      task larger then rotate to landscape.
Change-Id: I3ea12273348575ae968c76bdf9236155380526ec
2021-08-20 15:24:43 +08:00
TreeHugger Robot
dded85a1bd Merge "Fix pip or bubbles is under split divider" into sc-v2-dev 2021-08-20 02:57:09 +00:00
Tom Natan
73fbff2cc4 Merge "Log SizeCompatRestartButtonEventReported atom." into sc-v2-dev 2021-08-19 15:43:14 +00:00
TreeHugger Robot
fc7ff7b7e2 Merge "Only run legacy split flicker tests when it is using legacy split" into sc-v2-dev 2021-08-19 07:19:39 +00:00
Tony Huang
95d37cedff Fix pip or bubbles is under split divider
In stage split, it always set the divider layer to top and it would
Cover some layer it should not cover such as pip or bubbles.

In legacy split, this ordering is handled by TDA but it cannot apply
on stage split because it directly use WindowlessWindowManager without
shell root.

Fix it by simplify the layer ordering. Make divider layer as a fixed
value. Normal task layer should always lower than it and always on top
tasks layer count start from it so we can ensure always on top tasks
higher than the divider.

Also move some constants layer value to WindowManagerPolicyConstants
for managerment and accessed by both wm-core and wm-shell.

Fix: 194359996
Test: open a pip app and active stage split then drap the pip to
      divider.
Test: Pass existing tests.
Change-Id: I6e4002435be350872aec5fa154849ed6e9561ce0
2021-08-19 14:12:04 +08:00
Jerry Chang
66e7ff7937 Only run legacy split flicker tests when it is using legacy split
Ignore legacy split flicker tests if the system is not using legacy
split by checking config_useLegacySplit which is set to false since
sc-v2 or on jumbojack device. The flag should be deprecated along with
legacy split screen.

Bug: 189245318
Test: pass existing tests
Change-Id: Ic3dfbe849e7fcc9f25e44b7ff37ad00fdee60e9a
2021-08-19 06:01:00 +00:00
Ben Lin
e266d53aa5 Merge "Fix PiP rotation when Shell Transition is on." into sc-v2-dev 2021-08-18 23:48:09 +00:00
Chris Li
a60a0a7cad Merge "Fix race condition on size compat UI" into sc-qpr1-dev am: f9c3101df3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15614097

Change-Id: I6f4dec56c0bccbbda0d2a58d18cb20190ab29917
2021-08-18 23:47:53 +00:00
Ben Lin
fa097e1fa8 Fix PiP rotation when Shell Transition is on.
Also fixed the associated flicker tests.

Bug: 193565745
Bug: 165793917
Test: atest
Change-Id: I5156aa0236e704d46badd28b8093174a04f329ea
Merged-In: Iebd847ab0d7dc394fc64bb54cdc5262db7b9f1b0
2021-08-18 23:04:04 +00:00
Mady Mellor
af3974cb9b Merge "Center bubbles horizontally on large screens" into sc-v2-dev 2021-08-18 19:42:38 +00:00