diff options
| author | Vishnu Nair <vishnun@google.com> | 2019-06-18 11:14:01 -0700 |
|---|---|---|
| committer | Arthur Hsu <arthurhsu@google.com> | 2019-06-18 12:49:24 -0700 |
| commit | f7645aa9a968e2da227f1edceaa2b83054b451dd (patch) | |
| tree | b1aa5d7b87c7b9890a17091ca7a25dd59f53b123 /core/java/android/view/SurfaceControl.java | |
| parent | 22dd194d6d1edc111f58e552d4bb2c8a45c09daa (diff) | |
Prevent SurfaceView from drawing over parent surface insets
Parent SurfaceView to a bounds layer that enforces a crop preventing it
from drawing over the surface insets. The bounds layer crop is set to the
surface insets and updated when the parent surface size changes or the
parent surface insets change.
If the SurfaceView children are reparented to another client surface
then ensure the SurfaceView relative layer info is updated correctly.
Bug: 132205507
Test: go/wm-smoke
Test: test preserve surfaces codepath with split screen and ensure relative z is preserved
Test: test surfaceview apps, youtube, maps & camera.
Test: try to repro maps pip issue described in bug
Change-Id: I14c2f7603345ad89f0af4db48150b05d8ada602a
Diffstat (limited to 'core/java/android/view/SurfaceControl.java')
| -rw-r--r-- | core/java/android/view/SurfaceControl.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index bb169e01bbac..c1633ae507ad 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -2693,6 +2693,14 @@ public final class SurfaceControl implements Parcelable { return this; } + /** + * Writes the transaction to parcel, clearing the transaction as if it had been applied so + * it can be used to store future transactions. It's the responsibility of the parcel + * reader to apply the original transaction. + * + * @param dest parcel to write the transaction to + * @param flags + */ @Override public void writeToParcel(@NonNull Parcel dest, @WriteFlags int flags) { if (mNativeObject == 0) { |
