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

Unified Diff: webrtc/sdk/android/instrumentationtests/src/org/webrtc/VideoFileRendererTest.java

Issue 2662273004: Remove NewApi lint suppression. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « webrtc/sdk/android/instrumentationtests/src/org/webrtc/FileVideoCapturerTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/android/instrumentationtests/src/org/webrtc/VideoFileRendererTest.java
diff --git a/webrtc/sdk/android/instrumentationtests/src/org/webrtc/VideoFileRendererTest.java b/webrtc/sdk/android/instrumentationtests/src/org/webrtc/VideoFileRendererTest.java
index b68864ab098244f58590578dd8a4dc9d31282ed4..08b8e22a265cc305553435b545ef96ea9e2511a3 100644
--- a/webrtc/sdk/android/instrumentationtests/src/org/webrtc/VideoFileRendererTest.java
+++ b/webrtc/sdk/android/instrumentationtests/src/org/webrtc/VideoFileRendererTest.java
@@ -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"
« no previous file with comments | « webrtc/sdk/android/instrumentationtests/src/org/webrtc/FileVideoCapturerTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698