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

Unified Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.java

Issue 1989813002: Convert LooperExecutorTest in AppRTC Demo into JUnit test (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changes according to magjed's 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
Index: webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.java
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.java
index 731630405a0d1f279ae76e32935cd8e6ce96d8d5..bcc8fd1a0fc59ffed0951d289f44400cadbf63b9 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/util/LooperExecutor.java
@@ -71,7 +71,7 @@ public class LooperExecutor extends Thread implements Executor {
handler.post(new Runnable() {
@Override
public void run() {
- Looper.myLooper().quit();
+ handler.getLooper().quit();
Log.d(TAG, "Looper thread finished.");
}
});
@@ -130,4 +130,10 @@ public class LooperExecutor extends Thread implements Executor {
}
}
+ /**
+ * Access to the handler for testing purposes.
+ */
+ Handler getHandler() {
+ return handler;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698