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

Unified Diff: talk/app/webrtc/java/android/org/webrtc/SurfaceTextureHelper.java

Issue 1396373002: Replace API v23 calls. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/java/android/org/webrtc/SurfaceTextureHelper.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/SurfaceTextureHelper.java b/talk/app/webrtc/java/android/org/webrtc/SurfaceTextureHelper.java
index 175a00ed21b5660385733a42a1da90d8f8f3d6d5..e48019ad050ccc8fc5b19eb84e8d07589827bfda 100644
--- a/talk/app/webrtc/java/android/org/webrtc/SurfaceTextureHelper.java
+++ b/talk/app/webrtc/java/android/org/webrtc/SurfaceTextureHelper.java
@@ -105,7 +105,7 @@ final class SurfaceTextureHelper {
private boolean isQuitting = false;
private SurfaceTextureHelper(EGLContext sharedContext, Handler handler, boolean isOwningThread) {
- if (!handler.getLooper().isCurrentThread()) {
+ if (handler.getLooper().getThread() != Thread.currentThread()) {
throw new IllegalStateException("SurfaceTextureHelper must be created on the handler thread");
}
this.handler = handler;
@@ -169,7 +169,7 @@ final class SurfaceTextureHelper {
* onTextureFrameAvailable() after this function returns.
*/
public void disconnect() {
- if (handler.getLooper().isCurrentThread()) {
+ if (handler.getLooper().getThread() == Thread.currentThread()) {
isQuitting = true;
if (!isTextureInUse) {
release();
@@ -190,7 +190,7 @@ final class SurfaceTextureHelper {
}
private void tryDeliverTextureFrame() {
- if (!handler.getLooper().isCurrentThread()) {
+ if (handler.getLooper().getThread() != Thread.currentThread()) {
throw new IllegalStateException("Wrong thread.");
}
if (isQuitting || !hasPendingTexture || isTextureInUse) {
@@ -211,7 +211,7 @@ final class SurfaceTextureHelper {
}
private void release() {
- if (!handler.getLooper().isCurrentThread()) {
+ if (handler.getLooper().getThread() != Thread.currentThread()) {
throw new IllegalStateException("Wrong thread.");
}
if (isTextureInUse || !isQuitting) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698