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

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

Issue 2640433003: Android: AppRTCMobile: Don't leak CallActivity. (Closed)
Patch Set: Created 3 years, 11 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 | webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 87ee8443a68eb52863650cdc59427e09a4436666..79363e00fe56979b1b98251d26a5b5609393e2d9 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
@@ -346,7 +346,7 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
peerConnectionClient.setPeerConnectionFactoryOptions(options);
}
peerConnectionClient.createPeerConnectionFactory(
- CallActivity.this, peerConnectionParameters, CallActivity.this);
+ getApplicationContext(), peerConnectionParameters, CallActivity.this);
if (screencaptureEnabled) {
MediaProjectionManager mediaProjectionManager =
@@ -434,6 +434,7 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
@Override
protected void onDestroy() {
+ Thread.setDefaultUncaughtExceptionHandler(null);
disconnect();
if (logToast != null) {
logToast.cancel();
@@ -530,7 +531,7 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
// Create and audio manager that will take care of audio routing,
// audio modes, audio device enumeration etc.
- audioManager = AppRTCAudioManager.create(this);
+ audioManager = AppRTCAudioManager.create(getApplicationContext());
// Store existing audio settings and change audio mode to
// MODE_IN_COMMUNICATION for best possible VoIP performance.
Log.d(TAG, "Starting the audio manager...");
« no previous file with comments | « no previous file | webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698