summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/videosurface
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-02-22 16:32:36 -0800
committerEric Erfanian <erfanian@google.com>2017-03-01 09:56:52 -0800
commitccca31529c07970e89419fb85a9e8153a5396838 (patch)
treea7034c0a01672b97728c13282a2672771cd28baa /java/com/android/incallui/videosurface
parente7ae4624ba6f25cb8e648db74e0d64c0113a16ba (diff)
Update dialer sources.
Test: Built package and system image. This change clobbers the old source, and is an export from an internal Google repository. The internal repository was forked form Android in March, and this change includes modifications since then, to near the v8 release. Since the fork, we've moved code from monolithic to independent modules. In addition, we've switched to Blaze/Bazel as the build sysetm. This export, however, still uses make. New dependencies have been added: - Dagger - Auto-Value - Glide - Libshortcutbadger Going forward, development will still be in Google3, and the Gerrit release will become an automated export, with the next drop happening in ~ two weeks. Android.mk includes local modifications from ToT. Abridged changelog: Bug fixes ● Not able to mute, add a call when using Phone app in multiwindow mode ● Double tap on keypad triggering multiple key and tones ● Reported spam numbers not showing as spam in the call log ● Crash when user tries to block number while Phone app is not set as default ● Crash when user picks a number from search auto-complete list Visual Voicemail (VVM) improvements ● Share Voicemail audio via standard exporting mechanisms that support file attachment (email, MMS, etc.) ● Make phone number, email and web sites in VVM transcript clickable ● Set PIN before declining VVM Terms of Service {Carrier} ● Set client type for outbound visual voicemail SMS {Carrier} New incoming call and incall UI on older devices (Android M) ● Updated Phone app icon ● New incall UI (large buttons, button labels) ● New and animated Answer/Reject gestures Accessibility ● Add custom answer/decline call buttons on answer screen for touch exploration accessibility services ● Increase size of touch target ● Add verbal feedback when a Voicemail fails to load ● Fix pressing of Phone buttons while in a phone call using Switch Access ● Fix selecting and opening contacts in talkback mode ● Split focus for ‘Learn More’ link in caller id & spam to help distinguish similar text Other ● Backup & Restore for App Preferences ● Prompt user to enable Wi-Fi calling if the call ends due to out of service and Wi-Fi is connected ● Rename “Dialpad” to “Keypad” ● Show "Private number" for restricted calls ● Delete unused items (vcard, add contact, call history) from Phone menu Change-Id: I2a7e53532a24c21bf308bf0a6d178d7ddbca4958
Diffstat (limited to 'java/com/android/incallui/videosurface')
-rw-r--r--java/com/android/incallui/videosurface/bindings/VideoSurfaceBindings.java44
-rw-r--r--java/com/android/incallui/videosurface/impl/VideoScale.java147
-rw-r--r--java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java249
-rw-r--r--java/com/android/incallui/videosurface/protocol/VideoSurfaceDelegate.java29
-rw-r--r--java/com/android/incallui/videosurface/protocol/VideoSurfaceTexture.java57
5 files changed, 526 insertions, 0 deletions
diff --git a/java/com/android/incallui/videosurface/bindings/VideoSurfaceBindings.java b/java/com/android/incallui/videosurface/bindings/VideoSurfaceBindings.java
new file mode 100644
index 000000000..96fccb451
--- /dev/null
+++ b/java/com/android/incallui/videosurface/bindings/VideoSurfaceBindings.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.incallui.videosurface.bindings;
+
+import android.view.TextureView;
+import com.android.incallui.videosurface.impl.VideoScale;
+import com.android.incallui.videosurface.impl.VideoSurfaceTextureImpl;
+import com.android.incallui.videosurface.protocol.VideoSurfaceTexture;
+
+/** Bindings for video surface module. */
+public class VideoSurfaceBindings {
+
+ public static VideoSurfaceTexture createLocalVideoSurfaceTexture() {
+ return new VideoSurfaceTextureImpl(VideoSurfaceTexture.SURFACE_TYPE_LOCAL);
+ }
+
+ public static VideoSurfaceTexture createRemoteVideoSurfaceTexture() {
+ return new VideoSurfaceTextureImpl(VideoSurfaceTexture.SURFACE_TYPE_REMOTE);
+ }
+
+ public static void scaleVideoAndFillView(
+ TextureView textureView, float videoWidth, float videoHeight, float rotationDegrees) {
+ VideoScale.scaleVideoAndFillView(textureView, videoWidth, videoHeight, rotationDegrees);
+ }
+
+ public static void scaleVideoMaintainingAspectRatio(
+ TextureView textureView, int videoWidth, int videoHeight) {
+ VideoScale.scaleVideoMaintainingAspectRatio(textureView, videoWidth, videoHeight);
+ }
+}
diff --git a/java/com/android/incallui/videosurface/impl/VideoScale.java b/java/com/android/incallui/videosurface/impl/VideoScale.java
new file mode 100644
index 000000000..1444f5900
--- /dev/null
+++ b/java/com/android/incallui/videosurface/impl/VideoScale.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.incallui.videosurface.impl;
+
+import android.graphics.Matrix;
+import android.view.TextureView;
+import com.android.dialer.common.LogUtil;
+
+/** Utilities to scale the preview and remote video. */
+public class VideoScale {
+ /**
+ * Scales the video in the given view such that the video takes up the entire view. To maintain
+ * aspect ratio the video will be scaled to be larger than the view.
+ */
+ public static void scaleVideoAndFillView(
+ TextureView textureView, float videoWidth, float videoHeight, float rotationDegrees) {
+ float viewWidth = textureView.getWidth();
+ float viewHeight = textureView.getHeight();
+ float viewAspectRatio = viewWidth / viewHeight;
+ float videoAspectRatio = videoWidth / videoHeight;
+ float scaleWidth = 1.0f;
+ float scaleHeight = 1.0f;
+
+ if (viewAspectRatio > videoAspectRatio) {
+ // Scale to exactly fit the width of the video. The top and bottom will be cropped.
+ float scaleFactor = viewWidth / videoWidth;
+ float desiredScaledHeight = videoHeight * scaleFactor;
+ scaleHeight = desiredScaledHeight / viewHeight;
+ } else {
+ // Scale to exactly fit the height of the video. The sides will be cropped.
+ float scaleFactor = viewHeight / videoHeight;
+ float desiredScaledWidth = videoWidth * scaleFactor;
+ scaleWidth = desiredScaledWidth / viewWidth;
+ }
+
+ if (rotationDegrees == 90.0f || rotationDegrees == 270.0f) {
+ // We're in landscape mode but the camera feed is still drawing in portrait mode. Normally,
+ // scale of 1.0 means that the video feed stretches to fit the view. In this case the X axis
+ // is scaled to fit the height and the Y axis is scaled to fit the width.
+ float scaleX = scaleWidth;
+ float scaleY = scaleHeight;
+ scaleWidth = viewHeight / viewWidth * scaleY;
+ scaleHeight = viewWidth / viewHeight * scaleX;
+
+ // This flips the view vertically. Without this the camera feed would be upside down.
+ scaleWidth = scaleWidth * -1.0f;
+ // This flips the view horizontally. Without this the camera feed would be mirrored (left
+ // side would appear on right).
+ scaleHeight = scaleHeight * -1.0f;
+ }
+
+ LogUtil.i(
+ "VideoScale.scaleVideoAndFillView",
+ "view: %f x %f, video: %f x %f scale: %f x %f, rotation: %f",
+ viewWidth,
+ viewHeight,
+ videoWidth,
+ videoHeight,
+ scaleWidth,
+ scaleHeight,
+ rotationDegrees);
+
+ Matrix transform = new Matrix();
+ transform.setScale(
+ scaleWidth,
+ scaleHeight,
+ // This performs the scaling from the horizontal middle of the view.
+ viewWidth / 2.0f,
+ // This perform the scaling from vertical middle of the view.
+ viewHeight / 2.0f);
+ if (rotationDegrees != 0) {
+ transform.postRotate(rotationDegrees, viewWidth / 2.0f, viewHeight / 2.0f);
+ }
+ textureView.setTransform(transform);
+ }
+
+ /**
+ * Scales the video in the given view such that all of the video is visible. This will result in
+ * black bars on the top and bottom or the sides of the video.
+ */
+ public static void scaleVideoMaintainingAspectRatio(
+ TextureView textureView, int videoWidth, int videoHeight) {
+ int viewWidth = textureView.getWidth();
+ int viewHeight = textureView.getHeight();
+ float scaleWidth = 1.0f;
+ float scaleHeight = 1.0f;
+
+ if (viewWidth > viewHeight) {
+ // Landscape layout.
+ if (viewHeight * videoWidth > viewWidth * videoHeight) {
+ // Current display height is too much. Correct it.
+ int desiredHeight = viewWidth * videoHeight / videoWidth;
+ scaleWidth = (float) desiredHeight / (float) viewHeight;
+ } else if (viewHeight * videoWidth < viewWidth * videoHeight) {
+ // Current display width is too much. Correct it.
+ int desiredWidth = viewHeight * videoWidth / videoHeight;
+ scaleWidth = (float) desiredWidth / (float) viewWidth;
+ }
+ } else {
+ // Portrait layout.
+ if (viewHeight * videoWidth > viewWidth * videoHeight) {
+ // Current display height is too much. Correct it.
+ int desiredHeight = viewWidth * videoHeight / videoWidth;
+ scaleHeight = (float) desiredHeight / (float) viewHeight;
+ } else if (viewHeight * videoWidth < viewWidth * videoHeight) {
+ // Current display width is too much. Correct it.
+ int desiredWidth = viewHeight * videoWidth / videoHeight;
+ scaleHeight = (float) desiredWidth / (float) viewWidth;
+ }
+ }
+
+ LogUtil.i(
+ "VideoScale.scaleVideoMaintainingAspectRatio",
+ "view: %d x %d, video: %d x %d scale: %f x %f",
+ viewWidth,
+ viewHeight,
+ videoWidth,
+ videoHeight,
+ scaleWidth,
+ scaleHeight);
+ Matrix transform = new Matrix();
+ transform.setScale(
+ scaleWidth,
+ scaleHeight,
+ // This performs the scaling from the horizontal middle of the view.
+ viewWidth / 2.0f,
+ // This perform the scaling from vertical middle of the view.
+ viewHeight / 2.0f);
+ textureView.setTransform(transform);
+ }
+
+ private VideoScale() {}
+}
diff --git a/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java b/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java
new file mode 100644
index 000000000..21160cadb
--- /dev/null
+++ b/java/com/android/incallui/videosurface/impl/VideoSurfaceTextureImpl.java
@@ -0,0 +1,249 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.incallui.videosurface.impl;
+
+import android.graphics.Point;
+import android.graphics.SurfaceTexture;
+import android.view.Surface;
+import android.view.TextureView;
+import android.view.View;
+import com.android.dialer.common.LogUtil;
+import com.android.incallui.videosurface.protocol.VideoSurfaceDelegate;
+import com.android.incallui.videosurface.protocol.VideoSurfaceTexture;
+import java.util.Locale;
+import java.util.Objects;
+
+/**
+ * Represents a {@link TextureView} and its associated {@link SurfaceTexture} and {@link Surface}.
+ * Used to manage the lifecycle of these objects across device orientation changes.
+ */
+public class VideoSurfaceTextureImpl implements VideoSurfaceTexture {
+ @SurfaceType private final int surfaceType;
+ private VideoSurfaceDelegate delegate;
+ private TextureView textureView;
+ private Surface savedSurface;
+ private SurfaceTexture savedSurfaceTexture;
+ private Point surfaceDimensions;
+ private Point sourceVideoDimensions;
+ private boolean isDoneWithSurface;
+
+ public VideoSurfaceTextureImpl(@SurfaceType int surfaceType) {
+ this.surfaceType = surfaceType;
+ }
+
+ @Override
+ public void setDelegate(VideoSurfaceDelegate delegate) {
+ LogUtil.i("VideoSurfaceTextureImpl.setDelegate", "delegate: " + delegate + " " + toString());
+ this.delegate = delegate;
+ }
+
+ @Override
+ public int getSurfaceType() {
+ return surfaceType;
+ }
+
+ @Override
+ public Surface getSavedSurface() {
+ return savedSurface;
+ }
+
+ @Override
+ public void setSurfaceDimensions(Point surfaceDimensions) {
+ LogUtil.i(
+ "VideoSurfaceTextureImpl.setSurfaceDimensions",
+ "surfaceDimensions: " + surfaceDimensions + " " + toString());
+ this.surfaceDimensions = surfaceDimensions;
+ if (surfaceDimensions != null && savedSurfaceTexture != null) {
+ savedSurfaceTexture.setDefaultBufferSize(surfaceDimensions.x, surfaceDimensions.y);
+ }
+ }
+
+ @Override
+ public Point getSurfaceDimensions() {
+ return surfaceDimensions;
+ }
+
+ @Override
+ public void setSourceVideoDimensions(Point sourceVideoDimensions) {
+ this.sourceVideoDimensions = sourceVideoDimensions;
+ }
+
+ @Override
+ public Point getSourceVideoDimensions() {
+ return sourceVideoDimensions;
+ }
+
+ @Override
+ public void attachToTextureView(TextureView textureView) {
+ if (this.textureView == textureView) {
+ return;
+ }
+ LogUtil.i("VideoSurfaceTextureImpl.attachToTextureView", toString());
+
+ if (this.textureView != null) {
+ this.textureView.setOnClickListener(null);
+ // Don't clear the surface texture listener. This is important because our listener prevents
+ // the surface from being released so that it can be reused later.
+ }
+
+ this.textureView = textureView;
+ textureView.setSurfaceTextureListener(new SurfaceTextureListener());
+ textureView.setOnClickListener(new OnClickListener());
+
+ boolean areSameSurfaces = Objects.equals(savedSurfaceTexture, textureView.getSurfaceTexture());
+ LogUtil.i("VideoSurfaceTextureImpl.attachToTextureView", "areSameSurfaces: " + areSameSurfaces);
+ if (savedSurfaceTexture != null && !areSameSurfaces) {
+ textureView.setSurfaceTexture(savedSurfaceTexture);
+ if (surfaceDimensions != null && createSurface(surfaceDimensions.x, surfaceDimensions.y)) {
+ onSurfaceCreated();
+ }
+ }
+ isDoneWithSurface = false;
+ }
+
+ @Override
+ public void setDoneWithSurface() {
+ LogUtil.i("VideoSurfaceTextureImpl.setDoneWithSurface", toString());
+ isDoneWithSurface = true;
+ if (textureView != null && textureView.isAvailable()) {
+ return;
+ }
+ if (savedSurface != null) {
+ onSurfaceReleased();
+ savedSurface.release();
+ savedSurface = null;
+ }
+ if (savedSurfaceTexture != null) {
+ savedSurfaceTexture.release();
+ savedSurfaceTexture = null;
+ }
+ }
+
+ private boolean createSurface(int width, int height) {
+ LogUtil.i(
+ "VideoSurfaceTextureImpl.createSurface",
+ "width: " + width + ", height: " + height + " " + toString());
+ if (savedSurfaceTexture != null) {
+ savedSurfaceTexture.setDefaultBufferSize(width, height);
+ savedSurface = new Surface(savedSurfaceTexture);
+ return true;
+ }
+ return false;
+ }
+
+ private void onSurfaceCreated() {
+ if (delegate != null) {
+ delegate.onSurfaceCreated(this);
+ } else {
+ LogUtil.e("VideoSurfaceTextureImpl.onSurfaceCreated", "delegate is null. " + toString());
+ }
+ }
+
+ private void onSurfaceReleased() {
+ if (delegate != null) {
+ delegate.onSurfaceReleased(this);
+ } else {
+ LogUtil.e("VideoSurfaceTextureImpl.onSurfaceReleased", "delegate is null. " + toString());
+ }
+ }
+
+ @Override
+ public String toString() {
+ return String.format(
+ Locale.US,
+ "VideoSurfaceTextureImpl<%s%s%s%s>",
+ (surfaceType == SURFACE_TYPE_LOCAL ? "local, " : "remote, "),
+ (savedSurface == null ? "no-surface, " : ""),
+ (savedSurfaceTexture == null ? "no-texture, " : ""),
+ (surfaceDimensions == null
+ ? "(-1 x -1)"
+ : (surfaceDimensions.x + " x " + surfaceDimensions.y)));
+ }
+
+ private class SurfaceTextureListener implements TextureView.SurfaceTextureListener {
+ @Override
+ public void onSurfaceTextureAvailable(SurfaceTexture newSurfaceTexture, int width, int height) {
+ LogUtil.i(
+ "SurfaceTextureListener.onSurfaceTextureAvailable",
+ "newSurfaceTexture: "
+ + newSurfaceTexture
+ + " "
+ + VideoSurfaceTextureImpl.this.toString());
+
+ // Where there is no saved {@link SurfaceTexture} available, use the newly created one.
+ // If a saved {@link SurfaceTexture} is available, we are re-creating after an
+ // orientation change.
+ boolean surfaceCreated;
+ if (savedSurfaceTexture == null) {
+ savedSurfaceTexture = newSurfaceTexture;
+ surfaceCreated = createSurface(width, height);
+ } else {
+ // A saved SurfaceTexture was found.
+ LogUtil.i(
+ "SurfaceTextureListener.onSurfaceTextureAvailable", "replacing with cached surface...");
+ textureView.setSurfaceTexture(savedSurfaceTexture);
+ surfaceCreated = true;
+ }
+
+ // Inform the delegate that the surface is available.
+ if (surfaceCreated) {
+ onSurfaceCreated();
+ }
+ }
+
+ @Override
+ public boolean onSurfaceTextureDestroyed(SurfaceTexture destroyedSurfaceTexture) {
+ LogUtil.i(
+ "SurfaceTextureListener.onSurfaceTextureDestroyed",
+ "destroyedSurfaceTexture: "
+ + destroyedSurfaceTexture
+ + " "
+ + VideoSurfaceTextureImpl.this.toString());
+ if (delegate != null) {
+ delegate.onSurfaceDestroyed(VideoSurfaceTextureImpl.this);
+ } else {
+ LogUtil.e("SurfaceTextureListener.onSurfaceTextureDestroyed", "delegate is null");
+ }
+
+ if (isDoneWithSurface) {
+ onSurfaceReleased();
+ if (savedSurface != null) {
+ savedSurface.release();
+ savedSurface = null;
+ }
+ }
+ return isDoneWithSurface;
+ }
+
+ @Override
+ public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {}
+
+ @Override
+ public void onSurfaceTextureUpdated(SurfaceTexture surface) {}
+ }
+
+ private class OnClickListener implements View.OnClickListener {
+ @Override
+ public void onClick(View view) {
+ if (delegate != null) {
+ delegate.onSurfaceClick(VideoSurfaceTextureImpl.this);
+ } else {
+ LogUtil.e("OnClickListener.onClick", "delegate is null");
+ }
+ }
+ }
+}
diff --git a/java/com/android/incallui/videosurface/protocol/VideoSurfaceDelegate.java b/java/com/android/incallui/videosurface/protocol/VideoSurfaceDelegate.java
new file mode 100644
index 000000000..8fa585a72
--- /dev/null
+++ b/java/com/android/incallui/videosurface/protocol/VideoSurfaceDelegate.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.incallui.videosurface.protocol;
+
+/** Callbacks from the video surface. */
+public interface VideoSurfaceDelegate {
+
+ void onSurfaceCreated(VideoSurfaceTexture videoCallSurface);
+
+ void onSurfaceReleased(VideoSurfaceTexture videoCallSurface);
+
+ void onSurfaceDestroyed(VideoSurfaceTexture videoCallSurface);
+
+ void onSurfaceClick(VideoSurfaceTexture videoCallSurface);
+}
diff --git a/java/com/android/incallui/videosurface/protocol/VideoSurfaceTexture.java b/java/com/android/incallui/videosurface/protocol/VideoSurfaceTexture.java
new file mode 100644
index 000000000..411b45f56
--- /dev/null
+++ b/java/com/android/incallui/videosurface/protocol/VideoSurfaceTexture.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.incallui.videosurface.protocol;
+
+import android.graphics.Point;
+import android.support.annotation.IntDef;
+import android.view.Surface;
+import android.view.TextureView;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/** Represents a surface texture for a video feed. */
+public interface VideoSurfaceTexture {
+
+ /** Whether this represents the preview or remote display. */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({
+ SURFACE_TYPE_LOCAL,
+ SURFACE_TYPE_REMOTE,
+ })
+ @interface SurfaceType {}
+
+ int SURFACE_TYPE_LOCAL = 1;
+ int SURFACE_TYPE_REMOTE = 2;
+
+ void setDelegate(VideoSurfaceDelegate delegate);
+
+ int getSurfaceType();
+
+ Surface getSavedSurface();
+
+ void setSurfaceDimensions(Point surfaceDimensions);
+
+ Point getSurfaceDimensions();
+
+ void setSourceVideoDimensions(Point sourceVideoDimensions);
+
+ Point getSourceVideoDimensions();
+
+ void attachToTextureView(TextureView textureView);
+
+ void setDoneWithSurface();
+}