Commit Graph

11907 Commits

Author SHA1 Message Date
Winson Chung
d19e69d0bc 6/ Update pip to use shell main thread
- Remove some currently unused pip interface methods
- Remove some usages of handler
- Remove update thread (will eventually run on shell main thread)

Bug: 161979899
Test: atest WMShellUnitTests
Change-Id: If97e5182e396029120f0d0fb9e730ece93cddcc8
Signed-off-by: Winson Chung <winsonc@google.com>
2021-01-27 05:39:01 +00:00
Nathaniel Nifong
c2f5fc009a Merge "Use onEndPage callback in hwui skp recording" 2021-01-26 19:44:05 +00:00
Jorge Gil
0d98528ce2 Merge "Add crossfade animation on finish resize" 2021-01-26 17:37:12 +00:00
Nataniel Borges
732cde8f57 Merge "Enable RotateAppPairs tests" 2021-01-26 16:21:32 +00:00
TreeHugger Robot
c64d83723f Merge "Disable visibleLayersShowInConsecutiveEntries assertion" 2021-01-26 14:31:26 +00:00
TreeHugger Robot
c79f0ed9d5 Merge "Enable Pip tests" 2021-01-26 09:28:36 +00:00
Nataniel Borges
5de871ffd2 Enable RotateAppPairs tests
The tests are stable in postsubmit, so they can be moved to presubmit

Bug: 162923992
Test: atest FlickerTests
Change-Id: Ie691d8ae11672337e46529b26cc358f99e5a0bf4
2021-01-26 08:48:29 +01:00
Nataniel Borges
beaddd2cde Disable visibleLayersShowInConsecutiveEntries assertion
This assertion is ~30% flaky at the moment

Bug: 162923992
Test: atest FlickerTests
Change-Id: I288b5f19ee45bd708a4c47b161f6b7f5405968b5
2021-01-26 08:45:06 +01:00
Lucas Dupin
e6fee6030a Merge "Make bubble scrim respect opacity flag" 2021-01-26 05:29:20 +00:00
jorgegil@google.com
fe0ab24277 Add crossfade animation on finish resize
If seamless resize is enabled and the pip param for it is set to false,
the finish resize transaction will do a crossfade animation between the
two states.

Bug: 152554547
Test: corner/drag resize or tap to expand, stretch resize crossfade when let go
Change-Id: I8b2b27335ab8150a84914fc29615dd6625b1af35
2021-01-25 17:20:58 -08:00
Evan Rosky
27923b5a68 Merge "Add support/adapter for recents animation via shell transition" 2021-01-26 00:29:40 +00: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
Wale Ogunwale
2a9e1e73ac Merge "Fixed some bugs with main/side stage splits" 2021-01-25 23:46:26 +00:00
Nathaniel Nifong
7c216772a6 Use onEndPage callback in hwui skp recording
Test: so far none, need to find an app that uses AHardwareBuffer via hwui

Change-Id: Ia8c2fa32bff9762a8ed0e66f9961650dbd2e19d5
2021-01-25 21:26:10 +00:00
Yuncheol Heo
857ebd3ccd Merge "Move setTaskAlwaysOnTop from TaskView to BubbleExpandedView." 2021-01-25 19:39:13 +00:00
Wale Ogunwale
f84a471b02 Fixed some bugs with main/side stage splits
- Dragging to right to dismiss no working.
- Dragging to left to dismiss closes all apps
- Not able to put app in split after left drag to dismiss
- Pressing back on last activity in one split dismisses both.
- Don't move home task forward when startActivityFromRecents with launch
root set.

Fixes: 176061049
Test: they pass!
Change-Id: Ic1219b747e995ee8833b31433356bd44435118da
2021-01-25 10:51:58 -08:00
Nataniel Borges
82d51f03ab Enable Pip tests
The tests are stable in postsubmit, so they can be moved to presubmit

Bug: 171049720
Test: atest FlickerTests
Change-Id: I116157823f192ce31473d2d7d33ae7b8bf4e7a43
2021-01-25 18:34:56 +01:00
Nataniel Borges
1257711e65 Merge changes from topics "media-projection", "merge-specs", "single-assertion"
* changes:
  Use MediaProjection for screen recording
  Split app pair tests into individual assertions
  Compatibilize tests with new runner
2021-01-25 14:06:18 +00:00
Sergey Nikolaienkov
322819916e Merge "Filter out WmShellFlickerTests that are not supported on TV" 2021-01-25 10:12:46 +00:00
Nataniel Borges
9d110213e9 Use MediaProjection for screen recording
Use media projection instead of the shell command for screen recording.

Test: atest FlickerTests
Bug: 177077842
Change-Id: I9ac7351bf04004b5512316232637fd5cc2dd5fcc
2021-01-25 08:58:32 +01:00
Nataniel Borges
d04791d65c Split app pair tests into individual assertions
After this CL each assertion in the AppPairs test will appear as independent tests

Bug: 162923992
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Id704301b3396c4330001ef639faed6e978237f10
2021-01-25 08:58:27 +01:00
Nataniel Borges
143d584efd Compatibilize tests with new runner
Runner now prints each assertion individually to aid debugging.

Bug: 162923992
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I1c9a49ec3c283e5e034f0223573fca3ccafaf64c
2021-01-25 08:58:21 +01:00
Ben Lin
8df3b4e9a8 Merge changes Ie9be757c,I2e239d23
* changes:
  PiP pinch-to-resize: Enable two finger movement and slight rotation.
  PiP pinch-to-resize: add double-tap to max/min size.
2021-01-23 19:20:49 +00:00
Ben Lin
70a82b9076 PiP pinch-to-resize: Enable two finger movement and slight rotation.
Bug: 166478885
Test: Use two fingers and rotate and move PiP around
Change-Id: Ie9be757c95eb4bde66664ed3b8057b13f1d5bb5d
2021-01-23 09:10:10 +00:00
Ben Lin
dd1d40ef0d PiP pinch-to-resize: add double-tap to max/min size.
Per spec, max size would be the biggest possible bounds within the
movement bounds (displayWidth - 2 * insetWidth), and min size would be
40% of the width.

This also fixes the issue of portrait PiP not resizing correctly due to
wrong math being done in the resize algorithm.

Bug: 166478885
Test: Double-tap on PiP
Change-Id: I2e239d23a0e2519c0b482005614a1faddb1f808a
2021-01-23 01:06:06 -08:00
Yuncheol Heo
4664023109 Move setTaskAlwaysOnTop from TaskView to BubbleExpandedView.
Bug: 178212126
Bug: 175918200
Test: [Car] launch Dialer and check Dialer button is highlighted.
Test: [Phone] launch DetailDialog and check Navigation bar.
Change-Id: Ic10dca7e25a8828f8da36130ec78d2e24c765609
2021-01-22 23:24:25 -08:00
Lyn Han
03622914f7 Merge "Animations for new bubble while stack is collapsed" 2021-01-23 00:52:43 +00:00
Hongwei Wang
92998bace0 Merge "Get PictureInPictureParams from top activity" 2021-01-22 22:31:40 +00:00
Evan Rosky
710ff71169 Add support/adapter for recents animation via shell transition
This does the basics to adapt recents animation to shell transition.

Replaces startRecentsActivity with a normal startActivity. Once
we make a full switch to shell transitions, we can hopefully remove
it.

Updates the TransitionHandlers in shell and RemoteTransitions to
support attaching a WindowContainerTransaction to a transition's
finish. For recents, this is used to move the "pausing" app (the
one getting animated into the recents carousel) back to the front
if the gesture doesn't go all-the-way into recents.

Bug: 162503077
Test: enable shell transit. launch an app, use gesture to open
      recents. use gesture to start going to recents, but then
      release early to return to the app.
      atest ShellTransitionTests
Change-Id: Ied54f1b2c70c5c129b2f5798117d6d8a85360998
2021-01-22 13:43:55 -08:00
Lyn Han
f609cbd8fa Animations for new bubble while stack is collapsed
Bug: 170302562
Test: have no bubs, add bub => bub moves up to finalY
Test: have bubs, add bub => new bub moves up, old bubs move down
Test: update existing bub => updated bub swoops above stack, then
      moves down to finalY with other bubs
Test: the above on portrait left/right && landscape left/right

Change-Id: I1f9e38fed9ad66ad243700082981f75418c64bf5
2021-01-22 14:55:53 -06:00
George Burgess IV
8c080c527e Merge "androidfw: use a vector instead of manually managing memory" am: 972a78726b am: 490a13d53b am: b45ba7742f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1555550

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4999c11ba9ee999777497136da754b7b56ed0b43
2021-01-22 20:08:26 +00:00
George Burgess IV
972a78726b Merge "androidfw: use a vector instead of manually managing memory" 2021-01-22 18:20:58 +00:00
vichang
1c2e2f76ad Merge changes from topic "icu68" am: e17a139088 am: 714b3ec814 am: e10a7b9910
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1558548

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I95bcc68ca268b23524cf327fb2efa6f54df232df
2021-01-22 16:43:05 +00:00
Victor Chang
20d3aea8f7 Regenerate LocaleDataTables.cpp due to ICU 68 upgrade
The command:
./tools/localedata/extract_icu_data.py $ANDROID_BUILD_TOP > libs/androidfw/LocaleDataTables.cpp

Bug: 160356314
Test: m droid
Change-Id: I09c8d7e8b46255941168378c854d169d2e038508
2021-01-21 22:42:24 +00:00
Wale Ogunwale
91464139ff Merge "drag-n-drop support for main/side stage split-screen" 2021-01-21 21:33:05 +00:00
Wale Ogunwale
a47141f5ee drag-n-drop support for main/side stage split-screen
Switch shell dnd to use new split-screen infra.

Test: exiting tests pass
Bug: 176061049
Change-Id: Iff299502d1126320dc0935a9925f0c74d3f3beee
2021-01-21 10:34:56 -08:00
Seigo Nonaka
7cdfcd8a87 Merge "Add utility method for identifying font type." 2021-01-21 17:58:54 +00:00
Seigo Nonaka
9d5ab7e41a Add utility method for identifying font type.
Bug: 176939176
Test: atest FontFileUtilTest
Change-Id: Iaf4e23128ee274c2beb10280eb64ba73e6bc2ad8
2021-01-20 22:50:09 -08:00
TreeHugger Robot
5bb5544909 Merge changes I057989ea,Ic2b318e4,I266d4a03
* changes:
  Fix some deprecation warnings in WM Shell.
  Clean up SysUI Kotlin warnings
  Clean up some deprecation warnings in SettingsLib
2021-01-21 02:16:27 +00:00
George Burgess IV
3c97e6a7d9 androidfw: use a vector instead of manually managing memory
The static analyzer caught a memory leak in this code:

> frameworks/base/libs/androidfw/ResourceTypes.cpp:1042:45: warning:
Potential leak of memory pointed to by 'convBuffer'
[clang-analyzer-unix.Malloc]

We can use a `std::vector` to hold our fixed-size, heap-allocated array.
This will manage its own buffer for us.

Bug: None
Test: TreeHugger
Change-Id: Ib83bdbc0bc60304747676e924f2ff549840aa861
2021-01-20 17:27:08 -08:00
Hongwei Wang
e2f35542fe Get PictureInPictureParams from top activity
Task#getPictureInPictureParams used to get the params from root activity
and it is okay doing so without autoEnterPip since the activity to be
pinned will be put in a task with one and only one activity.

With autoEnterPip, it it possible that the root activity has no
PictureInPictureParams being attached when the transition starts in
Launcher side, switch to use the PictureInPictureParams tied to the top
visible activity here.

Fixes also
- when this happens, we need to reset the window crop leash on the
  original task in FullscreenTaskListener#onTaskInfoChanged
- ensure the reparented task inherits the current bounds
- ensure we do not hide the leash in Task#setHasBeenVisible by setting
  mHasBeenVisible=true on the newly created task

Video: http://rcll/aaaaaabFQoRHlzixHdtY/gIO4G5dybW7tJWXihkhXfE
Bug: 177335910
Test: see video
Change-Id: I198443b93b7d8cc11108f0d0606f98eac58c07b7
2021-01-20 16:41:10 -08:00
Hongwei Wang
418ac0a7ee Merge "Delay the PiP menu attachment" 2021-01-20 21:37:56 +00:00
Wale Ogunwale
a648085407 Merge "WindowContainerTransaction for setting adjacent roots" 2021-01-20 20:10:12 +00:00
Winson Chung
94891df66a Merge "Move the overflow ui to the bubble window" 2021-01-20 17:48:55 +00:00
Wale Ogunwale
c04c4c1098 WindowContainerTransaction for setting adjacent roots
Ability to specify that 2 root tasks are adjcent there by allowing them
to occlude their parent. Similar to how the legacy primary/secondary
split windowing modes are used to occlude their parent.

Also, occlude parent if a child in multi-window mode as a matching
bounds.

Bug: 177166639
Test: AppConfigurationTests#testSplitscreenPortraitAppOrientationRequests
Change-Id: I7d54bfa188700a76b0bca911d2011123c21553ad
2021-01-20 06:37:04 -08:00
John Reck
0acf0dade3 Merge "Remove DisplayList.h dependency from Canvas.h" 2021-01-20 04:52:14 +00:00
John Reck
2e48df3705 Remove DisplayList.h dependency from Canvas.h
Canvas is included in a lot of places, reduce include
dependencies

Test: make
Change-Id: Iab513de8d4bc3eb18220307acc124859dbf44030
2021-01-19 21:58:40 -05:00
Hongwei Wang
ba4ded96a4 Delay the PiP menu attachment
The flash at the end of entering PiP transition in gesture navigation
mode is a regression from ag/12997165. Fixed by delaying
PipMenuController#attach late (when the leash is set to transparent) in
the process to avoid any artifacts on the leash caused by addShellRoot.

Video: http://rcll/aaaaaabFQoRHlzixHdtY/dFdpJHvTCP6NmNEkDHrtei
Bug: 174814759
Test: see video
Change-Id: I7e74253f94b16977d04e27c2ab76fd3178001630
2021-01-19 17:51:41 -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
Yuncheol Heo
cbb25bcfc3 Merge "Fix NPE in TaskView." 2021-01-19 21:54:49 +00:00