Remove NewApi lint suppression.

BUG=webrtc:6597

Review-Url: https://codereview.webrtc.org/2662273004
Cr-Commit-Position: refs/heads/master@{#16448}
This commit is contained in:
sakal
2017-02-06 05:34:26 -08:00
committed by Commit bot
parent 93e1e23537
commit cb789bb510
6 changed files with 37 additions and 26 deletions

View File

@ -19,7 +19,7 @@ import android.support.test.filters.MediumTest;
import android.support.test.filters.SmallTest;
import java.io.IOException;
import java.lang.Thread;
import java.nio.charset.StandardCharsets;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import org.chromium.base.test.BaseJUnit4ClassRunner;
@ -106,7 +106,7 @@ public class FileVideoCapturerTest {
assertEquals(FRAME_WIDTH * FRAME_HEIGHT * 3 / 2, frame.data.length);
byte[] expectedNV12Bytes = new byte[frame.data.length];
FileVideoCapturer.nativeI420ToNV21(expectedFrames[i].getBytes(StandardCharsets.US_ASCII),
FileVideoCapturer.nativeI420ToNV21(expectedFrames[i].getBytes(Charset.forName("US-ASCII")),
FRAME_WIDTH, FRAME_HEIGHT, expectedNV12Bytes);
assertTrue(Arrays.equals(expectedNV12Bytes, frame.data));

View File

@ -19,7 +19,7 @@ import java.io.IOException;
import java.io.RandomAccessFile;
import java.lang.Thread;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Random;
import org.chromium.base.test.BaseJUnit4ClassRunner;
@ -46,7 +46,7 @@ public class VideoFileRendererTest {
int[] planeSizes = {
frameWidth * frameWidth, frameWidth * frameHeight / 4, frameWidth * frameHeight / 4};
byte[] frameBytes = frameStr.getBytes(StandardCharsets.US_ASCII);
byte[] frameBytes = frameStr.getBytes(Charset.forName("US-ASCII"));
ByteBuffer[] yuvPlanes = new ByteBuffer[3];
int pos = 0;
for (int i = 0; i < 3; i++) {
@ -69,7 +69,7 @@ public class VideoFileRendererTest {
int length = (int) writtenFile.length();
byte[] data = new byte[length];
writtenFile.readFully(data);
String fileContent = new String(data, StandardCharsets.US_ASCII);
String fileContent = new String(data, Charset.forName("US-ASCII"));
String expected = "YUV4MPEG2 C420 W4 H4 Ip F30:1 A1:1\n"
+ "FRAME\n"
+ "THIS IS JUST SOME TEXT xFRAME\n"