Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java

Issue 2007863005: VideoCapturerAndroid: Remove isDisposed() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
diff --git a/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java b/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
index e4c33d50a002acf0aee02dae3a93e80808015e39..5c59318ea97f7dd3f60b788b6f9abafebc867579 100644
--- a/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
+++ b/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
@@ -47,7 +47,6 @@ public class VideoCapturerAndroid implements
private final static String TAG = "VideoCapturerAndroid";
private static final int CAMERA_STOP_TIMEOUT_MS = 7000;
- private boolean isDisposed = false;
private android.hardware.Camera camera; // Only non-null while capturing.
private final Object handlerLock = new Object();
// |cameraThreadHandler| must be synchronized on |handlerLock| when not on the camera thread,
@@ -257,25 +256,9 @@ public class VideoCapturerAndroid implements
}
}
- // Dispose the SurfaceTextureHelper. This needs to be done manually, otherwise the
- // SurfaceTextureHelper thread and resources will not be garbage collected.
@Override
public void dispose() {
- Logging.d(TAG, "release");
- if (isDisposed()) {
- throw new IllegalStateException("Already released");
- }
- synchronized (handlerLock) {
- if (cameraThreadHandler != null) {
- throw new IllegalStateException("dispose() called while camera is running");
- }
- }
- isDisposed = true;
- }
-
- // Used for testing purposes to check if dispose() has been called.
- public boolean isDisposed() {
- return isDisposed;
+ Logging.d(TAG, "dispose");
}
// Note that this actually opens the camera, and Camera callbacks run on the
« no previous file with comments | « webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698