Commit Graph

499 Commits

Author SHA1 Message Date
Ming-Shin Lu
19566e6d34 Merge "Add test APIs for makeCustomAnimation" into rvc-dev am: 49ccdb557f am: c1e19880fd am: 47b0836f9f am: 8843e5feac
Change-Id: I14bcf42e0aa3edc824e167795d37c1c8a7247df9
2020-04-17 04:29:42 +00:00
Ming-Shin Lu
49ccdb557f Merge "Add test APIs for makeCustomAnimation" into rvc-dev 2020-04-17 03:33:51 +00:00
Hyunyoung Song
3e1d68e352 Merge "Remove SystemUI-statsd out of SystemUISharedLib" into rvc-dev am: 5912900406 am: 2cc54aa11c am: 5712462e9c am: 1d3ea37d07
Change-Id: Ic17f3921dae867d8e3dbacebee05a219a5cc9191
2020-04-13 20:47:35 +00:00
Hyunyoung Song
5912900406 Merge "Remove SystemUI-statsd out of SystemUISharedLib" into rvc-dev 2020-04-13 20:10:18 +00:00
Hyunyoung Song
3d89c931f3 Remove SystemUI-statsd out of SystemUISharedLib
Bug: 148533500
Test: builds
Change-Id: I8609409b35d34902bf1fd3f8b308cc2825cf437c
2020-04-11 16:50:59 -07:00
TreeHugger Robot
dd0ca1b234 Merge "Deprecates the animatingBounds from WM to SysUI" into rvc-dev am: c3721ac874 am: 7b48e03224 am: 97b959516c am: 620d5354dc
Change-Id: Ibbbb861bc1dadb728a9926c38a378e78a31aa009
2020-04-10 23:47:57 +00:00
TreeHugger Robot
c3721ac874 Merge "Deprecates the animatingBounds from WM to SysUI" into rvc-dev 2020-04-10 23:13:52 +00:00
Hongwei Wang
3c981f6eb7 Deprecates the animatingBounds from WM to SysUI
PipTouchHandler, similar to other components in SysUI, should be in-sync
with the destination bounds calculated within SysUI rather than WM.

Fixed also the empty movement bounds upon the first call to
PipTouchHandler#onMovementBoundsChanged. Together, this change should
fix the PIP not being lifted on IME show up. PipTouchHandlerTest is
updated correspondingly.

Bug: 153352899
Test: manually enter/exit PiP
Test: atest PipTouchHandlerTest
Change-Id: I2912af2a181b7fb57c6d90751744d46c6b3366d2
2020-04-10 13:47:14 -07:00
Ming-Shin Lu
e9bd437978 Merge "Trigger onTaskAppeared when a task started from recents becomes ready." into rvc-dev am: 1c92e1f789 am: 7ffe6e70ae am: a22ad45c92 am: 82def810f5
Change-Id: I5389eadd171e9c658e01f5b13b57fbd0a39b7909
2020-04-10 07:52:15 +00:00
lumark
04bceb99f1 Trigger onTaskAppeared when a task started from recents becomes ready.
In quick switch flows, launcher will first swipe task snapshot
through recents animation, and then start new task with custom animation
options through startActivityFromRecents after gesture finish detected,
and then finish recents animation finally.

But that way user may experience flickering before the new task launch
and recents animation finish.

To improve quick switch flickering, we ignore the new task's custom
animation from recents and generate task remote animation target,
and then trigger a callback for launcher to control/animate this
task surface, more like a part of RecentsAnimation,

Also, adding removeTask method for launcher can flexibility remove the
new task animation target once no need to animate, so that launcher
can decide when to finish recents animation.

Bug: 152480470
Test: manual as below steps:
  1) Doing quick switch task.
  2) Make sure launcher can receive onTaskAppeared callback.
  3) Make sure launcher calls removeTask successfully.
  4) Make sure launcher can finish recents animation after 3).
Change-Id: I0692a280a49719229fa8871509bad37a1343a00f
2020-04-10 02:20:03 +08:00
Ming-Shin Lu
b6d7002f36 Add test APIs for makeCustomAnimation
For CTS to verify activity custom transition duration
with onAnimationStartedListener / onAnimationFinishedListener
in ActivityOptions

Bug: 150443017
Test: build, atest ActivityTransitionTests
Change-Id: I603ab60a65343f3f336b311064ad55b01ead4929
2020-04-07 21:21:59 +08:00
Tracy Zhou
e508092fff Merge "Get rid of usage of Context#getDisplayNoVerify() in SurfaceViewRequestReceiver" into rvc-dev am: f1a03e07cd am: 2f1c11564a am: 90447d841f am: 8cb167b73c
Change-Id: I383f571d48185016c3dcf4e856132569fcaa8178
2020-04-03 21:15:34 +00:00
Vinit Nayak
eb42a8a3ef Merge "Disabled back gesture when quickswitching if needed" into rvc-dev am: 74153ee3e8 am: dc0fdfbfb8 am: 9753071125 am: 1c37d72fbc
Change-Id: I028638504acef314e946a00670ae075c18e41cc5
2020-04-03 21:12:34 +00:00
Tracy Zhou
f1a03e07cd Merge "Get rid of usage of Context#getDisplayNoVerify() in SurfaceViewRequestReceiver" into rvc-dev 2020-04-03 20:43:51 +00:00
Vinit Nayak
74153ee3e8 Merge "Disabled back gesture when quickswitching if needed" into rvc-dev 2020-04-03 20:27:50 +00:00
Tracy Zhou
a4b0b8d23c Get rid of usage of Context#getDisplayNoVerify() in
SurfaceViewRequestReceiver

Fixes: 149790106
Test: manual
Change-Id: I903f95317acd05cb6f40343a126194a8a4e41c0b
2020-04-02 14:10:58 -07:00
Vinit Nayak
f848e9d439 Disabled back gesture when quickswitching if needed
We allow quickswitching apps in different
orientations by touchiing in the same region on
the device. To avoid conflicting touches between
the swipe gesture and the back gesture, we disable
the back if the rotation of the swipe location and
rotation of current device do not match.

Fixes: 150250451
Test: Tested quickswitch manually with
test apps fixed to different rotations.
Ensured back only showed when rotation of
touch and display matched.

Change-Id: If3b4d15eb4b66ce688b91d44a2ec16b3610ecf0a
2020-04-01 14:40:40 -07:00
Hongwei Wang
61602f74df Merge "Save reentry bounds from SysUI" into rvc-dev am: 6173317ad8 am: 59d4c1d241 am: 63b8e5404a am: e07546970a
Change-Id: If3340cf1163de39bf9ff54e6eba887e3893276d9
2020-03-31 05:35:47 +00:00
Hongwei Wang
6173317ad8 Merge "Save reentry bounds from SysUI" into rvc-dev 2020-03-30 18:23:19 +00:00
Hongwei Wang
221fe3d905 Save reentry bounds from SysUI
On the other hand, since we won't be able to get the callback from
TaskOrganizer when an activity (used to be in PiP mode) is removed,
reset of the reentry bounds is kept in WM.

Bug: 152549281
Test: manually enter/exit PiP
Change-Id: I8b4b7f87c4a7601d8bdf32af8105a68450012a87
2020-03-27 11:10:12 -07:00
Winson Chung
07b821d68b Merge "Skip excluded MW mode tasks from recents and running tasks" into rvc-dev am: fa6a50484b am: 5dc4cf4d96 am: a64cafdb92 am: 9b89655a97 am: b8877744bf
Change-Id: Ice3d0421496e0c05e231c29a3e5ad58458d78ca8
2020-03-27 04:14:44 +00:00
Leon Scroggins
2a1b63c7df Merge "Convert ScreenshotGraphicBuffer to ScreenshotHardwareBuffer" 2020-03-26 17:29:14 +00:00
Leon Scroggins III
46c927ed33 Convert ScreenshotGraphicBuffer to ScreenshotHardwareBuffer
Bug: 150395371
Test: make && flashall

Bitmap is replacing methods that use a hidden GraphicBuffer with ones
that use the public HardwareBuffer. ScreenshotGraphicBuffer is just a
holder for GraphicBuffer and some metadata; switch it to hold a
HardwareBuffer (and rename to match).

Remove GraphicBuffer#createFromExisting, which was only called by
ScreenshotGraphicBuffer#createFromNative. Also remove JNI references to
that method, which were no longer in use.

Switch uses of GraphicBuffer that retrieve it from a
ScreenshotGraphicBuffer to HardwareBuffer.

Changes are almost entirely mechanical:
- (Screenshot)GraphicBuffer -> (Screenshot)HardwareBuffer
- GraphicBuffer#destroy -> HardwareBuffer#close
- getGraphicBuffer -> getHardwareBuffer

When creating a Snapshot in SurfaceFreezer, use the ColorSpace of the
ScreenshotHardwareBuffer.

Remove GraphicBuffer#createFromExisting. This is no longer necessary,
and although it was marked UnsupportedAppUsage, go/nonsdk-dash shows no
usage.

Change-Id: I41cb03fb65432d208820a428783de82a9f152035
2020-03-25 13:45:12 -04:00
Josh Tsuji
490a92894b Merge "Adds SYSUI_STATE_BUBBLES_EXPANDED to QuickStepContract." into rvc-dev am: 040c89290b am: d55eecb2a8 am: 7660049017 am: 2837a125c5
Change-Id: Iff17b6fc5ce0bacd4eb4a596eb5d8366d5cbe20a
2020-03-25 16:44:24 +00:00
Winson Chung
e5ab0170f8 Skip excluded MW mode tasks from recents and running tasks
- Skip multi-window mode tasks with the exclude-from-recents flag from
  the visible recent tasks list
- Expose a method in LauncherApps to be able to start a shortcut with
  additional intent flags (to add the exclude-from-recents flag)
- Remove unused ActMan path (only ActTaskMan call is used now)
- Refactor the call to get the running tasks, there are currently only
  two usages of getFilteredTasks(), one is to get all the tasks, the
  other is really to get tasks that we will end up using for transitioning
  into the task in recents.

  As such, we can remove the individual ignore flags (it would get more
  complicated if we wanted to filter based on logic like MW mode +
  excluded recents only), and instead have a boolean that filters the
  running tasks based on whether they would ever show in recents at all,
  with the exception of the home and recent tasks.

Bug: 152133859
Test: atest WmTests:RunningTasksTest
Test: atest WmTests:RecentTasksTest
Change-Id: Ia4f5fd37228c72ce449490f948e923afba821bb2
Signed-off-by: Winson Chung <winsonc@google.com>
2020-03-25 09:29:29 -07:00
Joshua Tsuji
be60a58a60 Adds SYSUI_STATE_BUBBLES_EXPANDED to QuickStepContract.
Also, modifies bubbles to update this value when bubbles are expanded or collapsed.

This will work in concert with the other CLs in this topic to collapse bubbles (but not the app behind it) when a swipe-to-home gesture occurs. It will not affect the behavior of the home button in three-button nav.

Test: atest SystemUITests
Bug: 146167884
Change-Id: I825afc7fa58c66e92a277bf94876c23917c412da
2020-03-23 17:17:29 -04:00
Automerger Merge Worker
c40273eb00 Allows the Assistant to request suppression of fling am: 53ce01cc35 am: cff46005fd am: bc8c4076ed am: 0cb4431448
Change-Id: I40052b0c6d465b5f8d49c34726bd4ae63f44df69
2020-03-16 13:14:03 +00:00
Automerger Merge Worker
cff46005fd Allows the Assistant to request suppression of fling am: 53ce01cc35
Change-Id: I1b9c06a3eac88140f5c519fa36adf41f25d057d6
2020-03-16 12:29:56 +00:00
Govinda Wasserman
2da3da62d9 Merge "Allows the Assistant to request suppression of fling" into rvc-dev 2020-03-16 12:12:56 +00:00
Automerger Merge Worker
f9714f0a7a Merge "SurfaceControlViewHost: Respond to API feedback" into rvc-dev am: 1660402a5c am: 9dd2d03308 am: 2744208948 am: 8a58ee1b36
Change-Id: I75502afa1d283656732e034abb1b767fbd0fbb96
2020-03-16 03:38:09 +00:00
Govinda Wasserman
53ce01cc35 Allows the Assistant to request suppression of fling
Test: Tested locally
BUG: 150688842
Change-Id: I8e8b2ccb87d9ff48d5a287f12ca9a6a2240a2cdb
2020-03-13 09:29:52 -04:00
Robert Carr
271d9c76b6 SurfaceControlViewHost: Respond to API feedback
API Council provided the following feedback:
	1. Rename addView() to setView()
	2. Add getView()

Bug: 151311937
Test: Existing tests pass
Change-Id: I26665c8bb8d0c10c5eb4228feb4ff13ee89f0d7b
2020-03-12 13:14:42 -07:00
Automerger Merge Worker
9a7fdfe180 Merge "Implement wallpaper zoom hooking it to the shade" into rvc-dev am: 888edd6fdc am: 54f7f1997b am: 8eae55aeba am: cb7c334c3e
Change-Id: I222bd0a600e1e9da173d1387d71089309a9fd095
2020-03-12 16:21:24 +00:00
Lucas Dupin
888edd6fdc Merge "Implement wallpaper zoom hooking it to the shade" into rvc-dev 2020-03-12 04:07:51 +00:00
Automerger Merge Worker
a25b14c80e Merge "Merge "Always notify SystemUI when launching activity to existing task" into rvc-dev am: cfdd34adab am: 0dfbd837a7" into rvc-d1-dev-plus-aosp am: 1dc59bdeca am: b74860d4d1
Change-Id: Icf4489e7990511959f487e17006f22c8df07eee0
2020-03-11 03:44:53 +00:00
Winson Chung
cfdd34adab Merge "Always notify SystemUI when launching activity to existing task" into rvc-dev 2020-03-11 02:28:09 +00:00
Leon Scroggins
f0a23ce8dd Merge "App transitions/thumbnails: Switch to HardwareBuffer" 2020-03-10 20:58:39 +00:00
Lucas Dupin
13f4b8a158 Implement wallpaper zoom hooking it to the shade
This adds a notion of per caller wallpaper zoom, in order to support
simultaneous clients.

The shade might be pulled down while in overview, for example, and we
must coordinate between launcher and systemui.

Bug: 149792636
Bug: 146387434
Test: atest NotificationShadeWindowViewTest
Test: atest WallpaperControllerTests
Test: manual
Change-Id: I588ba56d3d2704845d033ea2a5890ce812b9ee07
2020-03-10 10:52:28 -07:00
Leon Scroggins III
7432f1831c App transitions/thumbnails: Switch to HardwareBuffer
Bug: 148155907
Bug: 150395371
Test: go/wm-smoke

These previously used a GraphicBuffer created from a HARDWARE Bitmap to
parcel the Bitmap. As part of moving UI Rendering into a mainline
module, which will not include/expose GraphicBuffer,
Bitmap#createGraphicBufferHandle is being replaced by
Bitmap#getHardwareBuffer. Switch over to the now public API.

Change-Id: Id714a48a10fd03a03faa371e206e0c478ae1a4b7
2020-03-10 11:46:10 -04:00
Tracy Zhou
705e25deb1 Merge "Support scaling with SurfaceControl when using WindowlessWindow APIs" into rvc-dev 2020-03-10 09:27:30 +00:00
Tracy Zhou
6470c60273 Support scaling with SurfaceControl when using WindowlessWindow APIs
Demo: https://drive.google.com/open?id=1wQ8dT5bfTxSh-NRQpNBwTCkKOtOOUMPj

Bug: 150224413
Test: Manual test on both universal smartspace and wallpaper preview
Change-Id: I604e5a43727035cbeb36f02681fc317fd356268a
2020-03-10 00:06:34 -07:00
Winson Chung
e789ff64c8 Always notify SystemUI when launching activity to existing task
- SysUI can determine what to do based on the type of activity launched
  (ie. expand PIP/Bubbles to fullscreen)

Bug: 148977481
Test: atest TaskStackChangedListenerTest
Test: Launch app in split primary, ensure launching app again triggers
      recents
Test: Launch app in PIP, ensure launching app again triggers it to go
      fullscreen
Test: Launch app in bubble, ensure launching app again triggers bubble
      to expand
Change-Id: I754a71a72dd0e660930b19acbf9fe6ccbb453152
2020-03-10 03:46:48 +00:00
lumark
2ec1912dfb Add localBounds in RemoteAnimationTarget
With Hierarchical animation, the animation layer will no longer
be a fixed fullscreen layer but animate on the parent container's surface.

In order to run a remote animation, the animation controller needs to
know bounds of the target relative to both its parent and the screen.

The CL includes:
1) RemoteAnimationTarget changes:
    - Add localBounds field for indicating the target bounds which
    the coodiates relatives to its parent.
    - Add screenScreenBounds field to replace souceContainerBounds
      to reflect the target bounds relatives to the screen.
    - Mark position & sourceContainerBounds as deprecated.
2) Modified related places to set correct localBounds information.

Test: build / run, make sure installing the old version of launcher on
      the this new platform change still compatible without crash.
Test: manual as follow steps:
  - Launching app from launcher to split-screen secondary stack
  - Swipe up to overview screen and drag TaskView to see if the TaskView
    surface is shfted, expected is not.
Bug: 148780840
Change-Id: Id9dbf6de193ab73fe94bc24ef6a27edc93380a14
2020-03-09 22:24:17 +08:00
Tracy Zhou
417fa7eac8 Turn on hardware acceleration flag on the windowless window we render
Bug: 150224413
Test: Manual. Make sure universal smartspace still works as intended.
Change-Id: I9ed867ca1612b5c016e97765ebf077051c5da23c
2020-03-06 15:36:37 -08:00
Winson Chung
5570147aa0 Ensure that task org updates all happen off the main thread
- Move the animator to be called on the update thread
- Move the calls on task org to update on that thread as well
- Cache the leash and token to ensure we don't make binder calls to fetch
  the leash on each frame of the animation
- Don't align with SF vsync now that we're driving the surface animations

Bug: 150810666
Test: Enter PIP, move it around
Test: atest PipAnimationControllerTest
Change-Id: Id05980529681f892638f52f492262fde246cac20
2020-03-05 17:33:02 -08:00
Sunny Goyal
721de2359e Merge "Removing deferring gestureNav until managed profile is setup" into rvc-dev 2020-03-05 17:53:06 +00:00
Tracy Zhou
fceac76c37 Merge "Make SurfaceView rendering generic in SysUI" into rvc-dev 2020-03-05 05:54:58 +00:00
Tracy Zhou
ccfab35bf8 Make SurfaceView rendering generic in SysUI
WindowlessWindowManager is not visible as external APIs, so for
launcher / wallpaper to use the API the rendering code has to be in the
SysUI.

Bug: 150224413
Test: Manual. Make sure universal smartspace still works as intended.
Change-Id: If006d622f181f6c8cc7c1cebda3f63b0b2ad85d5
2020-03-04 18:29:35 -08:00
Sunny Goyal
5dcdc10345 Removing deferring gestureNav until managed profile is setup
Bug: 150458410
Test: Presubmit
Change-Id: I517246f62f89d3b4395410480ffa1cc775316090
2020-03-04 14:42:00 -08:00
Winson Chung
7e895da152 Update sync rt applier for background blur
- Copy surface params builder to compat class
- Add calls to set background blur
- Make recents/app transition leashes effect layers so blur can be set
  on them

Bug: 149792636
Test: Build with launcher with blurs enabled
Change-Id: I4cebcab090719c6a17f197a3cd4450d68e55b424
2020-03-04 08:45:12 -08:00