From c854ac3755932ea79ac8791ee2fa21e64e6c7826 Mon Sep 17 00:00:00 2001 From: sakal Date: Fri, 20 Jan 2017 04:09:11 -0800 Subject: [PATCH] Stop camera onStop instead of onPause. In multi-window mode the non-active activity receives onPause. We shouldn't stop the camera in this case. BUG=webrtc:7018 Review-Url: https://codereview.webrtc.org/2648483003 Cr-Commit-Position: refs/heads/master@{#16186} --- .../androidapp/src/org/appspot/apprtc/CallActivity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java index 6e94db920f..e56d5bcabd 100644 --- a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java +++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java @@ -418,8 +418,8 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven // Activity interfaces @Override - public void onPause() { - super.onPause(); + public void onStop() { + super.onStop(); activityRunning = false; // Don't stop the video when using screencapture to allow user to show other apps to the remote // end. @@ -430,8 +430,8 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven } @Override - public void onResume() { - super.onResume(); + public void onStart() { + super.onStart(); activityRunning = true; // Video is not paused for screencapture. See onPause. if (peerConnectionClient != null && !screencaptureEnabled) {