| OLD | NEW |
| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 // Store existing audio settings and change audio mode to | 362 // Store existing audio settings and change audio mode to |
| 363 // MODE_IN_COMMUNICATION for best possible VoIP performance. | 363 // MODE_IN_COMMUNICATION for best possible VoIP performance. |
| 364 Log.d(TAG, "Initializing the audio manager..."); | 364 Log.d(TAG, "Initializing the audio manager..."); |
| 365 audioManager.init(); | 365 audioManager.init(); |
| 366 } | 366 } |
| 367 | 367 |
| 368 // Should be called from UI thread | 368 // Should be called from UI thread |
| 369 private void callConnected() { | 369 private void callConnected() { |
| 370 final long delta = System.currentTimeMillis() - callStartedTimeMs; | 370 final long delta = System.currentTimeMillis() - callStartedTimeMs; |
| 371 Log.i(TAG, "Call connected: delay=" + delta + "ms"); | 371 Log.i(TAG, "Call connected: delay=" + delta + "ms"); |
| 372 | 372 if (peerConnectionClient == null || isError) { |
| 373 Log.w(TAG, "Call is connected in closed or error state"); |
| 374 return; |
| 375 } |
| 373 // Update video view. | 376 // Update video view. |
| 374 updateVideoView(); | 377 updateVideoView(); |
| 375 // Enable statistics callback. | 378 // Enable statistics callback. |
| 376 peerConnectionClient.enableStatsEvents(true, STAT_CALLBACK_PERIOD); | 379 peerConnectionClient.enableStatsEvents(true, STAT_CALLBACK_PERIOD); |
| 377 } | 380 } |
| 378 | 381 |
| 379 private void onAudioManagerChangedState() { | 382 private void onAudioManagerChangedState() { |
| 380 // TODO(henrika): disable video if AppRTCAudioManager.AudioDevice.EARPIECE | 383 // TODO(henrika): disable video if AppRTCAudioManager.AudioDevice.EARPIECE |
| 381 // is active. | 384 // is active. |
| 382 } | 385 } |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 } | 642 } |
| 640 } | 643 } |
| 641 }); | 644 }); |
| 642 } | 645 } |
| 643 | 646 |
| 644 @Override | 647 @Override |
| 645 public void onPeerConnectionError(final String description) { | 648 public void onPeerConnectionError(final String description) { |
| 646 reportError(description); | 649 reportError(description); |
| 647 } | 650 } |
| 648 } | 651 } |
| OLD | NEW |