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

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

Issue 1998483003: General cleanup on AppRTC Android Demo codebase (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove unused string that was accidentally added. Created 4 years, 7 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
Index: webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
index 8f30451183261a0eed30c6da6e78b1438ce0b51d..0ce276e3cde8bc015eac9bdd157103ec10e8f24d 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
@@ -174,48 +174,48 @@ public class PeerConnectionClient {
/**
* Peer connection events.
*/
- public static interface PeerConnectionEvents {
+ public interface PeerConnectionEvents {
/**
* Callback fired once local SDP is created and set.
*/
- public void onLocalDescription(final SessionDescription sdp);
+ void onLocalDescription(final SessionDescription sdp);
/**
* Callback fired once local Ice candidate is generated.
*/
- public void onIceCandidate(final IceCandidate candidate);
+ void onIceCandidate(final IceCandidate candidate);
/**
* Callback fired once local ICE candidates are removed.
*/
- public void onIceCandidatesRemoved(final IceCandidate[] candidates);
+ void onIceCandidatesRemoved(final IceCandidate[] candidates);
/**
* Callback fired once connection is established (IceConnectionState is
* CONNECTED).
*/
- public void onIceConnected();
+ void onIceConnected();
/**
* Callback fired once connection is closed (IceConnectionState is
* DISCONNECTED).
*/
- public void onIceDisconnected();
+ void onIceDisconnected();
/**
* Callback fired once peer connection is closed.
*/
- public void onPeerConnectionClosed();
+ void onPeerConnectionClosed();
/**
* Callback fired once peer connection statistics is ready.
*/
- public void onPeerConnectionStatsReady(final StatsReport[] reports);
+ void onPeerConnectionStatsReady(final StatsReport[] reports);
/**
* Callback fired once peer connection error happened.
*/
- public void onPeerConnectionError(final String description);
+ void onPeerConnectionError(final String description);
}
private PeerConnectionClient() {
@@ -326,11 +326,8 @@ public class PeerConnectionClient {
Log.d(TAG, "Pereferred video codec: " + preferredVideoCodec);
// Check if ISAC is used by default.
- preferIsac = false;
- if (peerConnectionParameters.audioCodec != null
- && peerConnectionParameters.audioCodec.equals(AUDIO_CODEC_ISAC)) {
- preferIsac = true;
- }
+ preferIsac = peerConnectionParameters.audioCodec != null
+ && peerConnectionParameters.audioCodec.equals(AUDIO_CODEC_ISAC);
// Enable/disable OpenSL ES playback.
if (!peerConnectionParameters.useOpenSLES) {
@@ -502,7 +499,8 @@ public class PeerConnectionClient {
if (peerConnectionParameters.aecDump) {
try {
aecDumpFileDescriptor = ParcelFileDescriptor.open(
- new File("/sdcard/Download/audio.aecdump"),
+ new File(Environment.getExternalStorageDirectory().getPath()
+ + "Download/audio.aecdump"),
ParcelFileDescriptor.MODE_READ_WRITE |
ParcelFileDescriptor.MODE_CREATE |
ParcelFileDescriptor.MODE_TRUNCATE);
@@ -563,11 +561,7 @@ public class PeerConnectionClient {
}
}
}
- if (minWidth * minHeight >= 1280 * 720) {
- return true;
- } else {
- return false;
- }
+ return minWidth * minHeight >= 1280 * 720;
}
private void getStats() {
@@ -868,7 +862,6 @@ public class PeerConnectionClient {
Matcher codecMatcher = codecPattern.matcher(lines[i]);
if (codecMatcher.matches()) {
codecRtpMap = codecMatcher.group(1);
- continue;
}
}
if (mLineIndex == -1) {

Powered by Google App Engine
This is Rietveld 408576698