diff options
| author | Robert Carr <racarr@google.com> | 2020-01-19 17:27:00 -0800 |
|---|---|---|
| committer | Robert Carr <racarr@google.com> | 2020-01-22 12:54:06 -0800 |
| commit | 87f5d2cb7830d546c4094cb76b183c77f2b615e6 (patch) | |
| tree | 8a73a6a760051b9f736f16578d93818a6b65043d /core/java/android/view/SurfaceView.java | |
| parent | 30ad618cfef9dd7fad12b14d7e0bdadb5d68cb82 (diff) | |
Unhide SurfaceControlViewHost API
Unhide the SurfaceControlViewHost API and the getHostToken/setChildSurfacePackage
API's required to use them.
Bug: 134365580
Bug: 140587144
Test: WindowlessWmTests
Change-Id: I0c5af2166f1d87947f54a492fd0b887c6253b9fe
Diffstat (limited to 'core/java/android/view/SurfaceView.java')
| -rw-r--r-- | core/java/android/view/SurfaceView.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index db1c1612ce72..1981bdd93eeb 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -1479,11 +1479,12 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } /** - * @return The token used to identify the windows input channel. - * @hide + * A token used for constructing {@link SurfaceControlViewHost}. This token should + * be passed from the host process to the client process. + * + * @return The token */ - @TestApi - public @Nullable IBinder getInputToken() { + public @Nullable IBinder getHostToken() { final ViewRootImpl viewRoot = getViewRootImpl(); if (viewRoot == null) { return null; @@ -1545,9 +1546,13 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } /** - * @hide + * Display the view-hierarchy embedded within a {@link SurfaceControlViewHost.SurfacePackage} + * within this SurfaceView. If this SurfaceView is above it's host Surface (see + * {@link #setZOrderOnTop} then the embedded Surface hierarchy will be able to receive + * input. + * + * @param p The SurfacePackage to embed. */ - @TestApi public void setChildSurfacePackage(@NonNull SurfaceControlViewHost.SurfacePackage p) { final SurfaceControl sc = p != null ? p.getSurfaceControl() : null; final SurfaceControl lastSc = mSurfacePackage != null ? |
