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

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

Issue 2648483003: Stop camera onStop instead of onPause. (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 return videoCapturer; 403 return videoCapturer;
404 } 404 }
405 } 405 }
406 } 406 }
407 407
408 return null; 408 return null;
409 } 409 }
410 410
411 // Activity interfaces 411 // Activity interfaces
412 @Override 412 @Override
413 public void onPause() { 413 public void onStop() {
414 super.onPause(); 414 super.onStop();
415 activityRunning = false; 415 activityRunning = false;
416 // Don't stop the video when using screencapture to allow user to show other apps to the remote 416 // Don't stop the video when using screencapture to allow user to show other apps to the remote
417 // end. 417 // end.
418 if (peerConnectionClient != null && !screencaptureEnabled) { 418 if (peerConnectionClient != null && !screencaptureEnabled) {
419 peerConnectionClient.stopVideoSource(); 419 peerConnectionClient.stopVideoSource();
420 } 420 }
421 cpuMonitor.pause(); 421 cpuMonitor.pause();
422 } 422 }
423 423
424 @Override 424 @Override
425 public void onResume() { 425 public void onStart() {
426 super.onResume(); 426 super.onStart();
427 activityRunning = true; 427 activityRunning = true;
428 // Video is not paused for screencapture. See onPause. 428 // Video is not paused for screencapture. See onPause.
429 if (peerConnectionClient != null && !screencaptureEnabled) { 429 if (peerConnectionClient != null && !screencaptureEnabled) {
430 peerConnectionClient.startVideoSource(); 430 peerConnectionClient.startVideoSource();
431 } 431 }
432 cpuMonitor.resume(); 432 cpuMonitor.resume();
433 } 433 }
434 434
435 @Override 435 @Override
436 protected void onDestroy() { 436 protected void onDestroy() {
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 } 890 }
891 } 891 }
892 }); 892 });
893 } 893 }
894 894
895 @Override 895 @Override
896 public void onPeerConnectionError(final String description) { 896 public void onPeerConnectionError(final String description) {
897 reportError(description); 897 reportError(description);
898 } 898 }
899 } 899 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698