OLD | NEW |
---|---|
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
431 } | 431 } |
432 if (audioManager != null) { | 432 if (audioManager != null) { |
433 audioManager.close(); | 433 audioManager.close(); |
434 audioManager = null; | 434 audioManager = null; |
435 } | 435 } |
436 if (iceConnected && !isError) { | 436 if (iceConnected && !isError) { |
437 setResult(RESULT_OK); | 437 setResult(RESULT_OK); |
438 } else { | 438 } else { |
439 setResult(RESULT_CANCELED); | 439 setResult(RESULT_CANCELED); |
440 } | 440 } |
441 VideoRendererGui.dispose(); | |
AlexG
2015/08/05 18:19:23
nit: Move before setResult() - we first dispose/cl
magjed_webrtc
2015/08/11 10:38:16
I moved it to onDestroy() instead. I think that ma
| |
441 finish(); | 442 finish(); |
442 } | 443 } |
443 | 444 |
444 private void disconnectWithErrorMessage(final String errorMessage) { | 445 private void disconnectWithErrorMessage(final String errorMessage) { |
445 if (commandLineRun || !activityRunning) { | 446 if (commandLineRun || !activityRunning) { |
446 Log.e(TAG, "Critical error: " + errorMessage); | 447 Log.e(TAG, "Critical error: " + errorMessage); |
447 disconnect(); | 448 disconnect(); |
448 } else { | 449 } else { |
449 new AlertDialog.Builder(this) | 450 new AlertDialog.Builder(this) |
450 .setTitle(getText(R.string.channel_error_title)) | 451 .setTitle(getText(R.string.channel_error_title)) |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
655 } | 656 } |
656 } | 657 } |
657 }); | 658 }); |
658 } | 659 } |
659 | 660 |
660 @Override | 661 @Override |
661 public void onPeerConnectionError(final String description) { | 662 public void onPeerConnectionError(final String description) { |
662 reportError(description); | 663 reportError(description); |
663 } | 664 } |
664 } | 665 } |
OLD | NEW |