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

Unified Diff: webrtc/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java

Issue 1992213002: Replace LooperExecutor with built-in class in Android AppRTC Demo (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changes according to magjed comments 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/examples/androidjunit/src/org/appspot/apprtc/util/RobolectricLooperExecutor.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
diff --git a/webrtc/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java b/webrtc/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
index ab37520ab0a2982634292a5145f405fe90bc290e..bba182fa1ec1d80b2c9d810bc1fea44213bda890 100644
--- a/webrtc/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
+++ b/webrtc/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
@@ -13,13 +13,15 @@ package org.appspot.apprtc.test;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.appspot.apprtc.AppRTCClient.SignalingParameters;
import org.appspot.apprtc.PeerConnectionClient;
import org.appspot.apprtc.PeerConnectionClient.PeerConnectionEvents;
import org.appspot.apprtc.PeerConnectionClient.PeerConnectionParameters;
-import org.appspot.apprtc.util.LooperExecutor;
import org.webrtc.EglBase;
import org.webrtc.IceCandidate;
import org.webrtc.MediaCodecVideoEncoder;
@@ -66,7 +68,7 @@ public class PeerConnectionClientTest extends InstrumentationTestCase
private EglBase eglBase;
// These are protected by their respective event objects.
- private LooperExecutor signalingExecutor;
+ private ExecutorService signalingExecutor;
private boolean isClosed;
private boolean isIceConnected;
private SessionDescription localSdp;
@@ -279,8 +281,7 @@ public class PeerConnectionClientTest extends InstrumentationTestCase
@Override
public void setUp() {
- signalingExecutor = new LooperExecutor();
- signalingExecutor.requestStart();
+ signalingExecutor = Executors.newSingleThreadExecutor();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
eglBase = EglBase.create();
}
@@ -288,7 +289,7 @@ public class PeerConnectionClientTest extends InstrumentationTestCase
@Override
public void tearDown() {
- signalingExecutor.requestStop();
+ signalingExecutor.shutdown();
if (eglBase != null) {
eglBase.release();
}
« no previous file with comments | « webrtc/examples/androidjunit/src/org/appspot/apprtc/util/RobolectricLooperExecutor.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698