Fix/suppress new warnings introduced in Chromium roll.

TBR=henrika@webrtc.org

Bug: webrtc:6597
Change-Id: Id26945a7be05250673b58de8220f78bc62886688
Reviewed-on: https://webrtc-review.googlesource.com/16860
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20477}
This commit is contained in:
Sami Kalliomäki
2017-10-30 13:34:41 +01:00
committed by Commit Bot
parent 1d4c152a38
commit bde473e4fa
26 changed files with 67 additions and 42 deletions

View File

@ -17,6 +17,7 @@ import android.util.Log;
import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@ -1261,6 +1262,7 @@ public class PeerConnectionClient {
return;
dc.registerObserver(new DataChannel.Observer() {
@Override
public void onBufferedAmountChange(long previousAmount) {
Log.d(TAG, "Data channel buffered amount changed: " + dc.label() + ": " + dc.state());
}
@ -1279,7 +1281,7 @@ public class PeerConnectionClient {
ByteBuffer data = buffer.data;
final byte[] bytes = new byte[data.capacity()];
data.get(bytes);
String strData = new String(bytes);
String strData = new String(bytes, Charset.forName("UTF-8"));
Log.d(TAG, "Got msg: " + strData + " over " + dc);
}
});