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

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

Issue 2741743002: IdlingResource for destroy() VideoFileRenderer (Closed)
Patch Set: Using local Collider and AppRTC Server 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..41bf1c8f7992859d763ba5a51b022aa3ea8618d1 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
@@ -81,6 +81,7 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
}
public static final String EXTRA_ROOMID = "org.appspot.apprtc.ROOMID";
+ public static final String EXTRA_COLLIDERURL = "org.appspot.apprtc.COLLIDERURL";
public static final String EXTRA_LOOPBACK = "org.appspot.apprtc.LOOPBACK";
public static final String EXTRA_VIDEO_CALL = "org.appspot.apprtc.VIDEO_CALL";
public static final String EXTRA_SCREENCAPTURE = "org.appspot.apprtc.SCREENCAPTURE";
@@ -153,6 +154,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;
@@ -337,7 +344,9 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
appRtcClient = new DirectRTCClient(this);
}
// Create connection parameters.
- roomConnectionParameters = new RoomConnectionParameters(roomUri.toString(), roomId, loopback);
+ String colliderUrl = intent.getStringExtra(EXTRA_COLLIDERURL);
+ roomConnectionParameters =
+ new RoomConnectionParameters(roomUri.toString(), roomId, loopback, colliderUrl);
// Create CPU monitor
cpuMonitor = new CpuMonitor(this);
@@ -378,6 +387,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 +512,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 +524,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