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

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

Issue 2741743002: IdlingResource for destroy() VideoFileRenderer (Closed)
Patch Set: Rename of ConnectActivityStubbedInputOutputTest Created 3 years, 9 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/CallActivity.java
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
index 0197bcb3227dbc0fa0f290ab334199a4efa243ca..43eab0ad2055c648c71c2968f75ebda59d4e327f 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
@@ -153,6 +153,12 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
}
}
+ public interface CountingResource {
+ public void increment();
+ public void decrement();
+ }
+ public CountingResource countingResource;
+
private final ProxyRenderer remoteProxyRenderer = new ProxyRenderer();
private final ProxyRenderer localProxyRenderer = new ProxyRenderer();
private PeerConnectionClient peerConnectionClient = null;
@@ -378,6 +384,14 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
}
}
+ public CountingResource getCountingResource() {
+ return countingResource;
+ }
+
+ public void setCountingResource(CountingResource r) {
+ countingResource = r;
+ }
+
@TargetApi(17)
private DisplayMetrics getDisplayMetrics() {
DisplayMetrics displayMetrics = new DisplayMetrics();
@@ -495,6 +509,10 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
@Override
protected void onDestroy() {
+ Log.d(TAG, "onDestroy()");
+ if (countingResource != null) {
+ countingResource.increment();
+ }
Thread.setDefaultUncaughtExceptionHandler(null);
disconnect();
if (logToast != null) {
@@ -503,6 +521,9 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
activityRunning = false;
rootEglBase.release();
super.onDestroy();
+ if (countingResource != null) {
+ countingResource.decrement();
+ }
}
// CallFragment.OnCallEvents interface implementation.

Powered by Google App Engine
This is Rietveld 408576698