From f7862b87e3cc8f0f630bf74438560051f4cd26de Mon Sep 17 00:00:00 2001 From: Sadrul Chowdhury Date: Wed, 12 Oct 2022 16:01:52 +0000 Subject: [PATCH] [lint] Fix a few lint errors. Fix a few lint errors encountered during backporting for wear. Test: build + upload Change-Id: I70b5c2d4408d33572519285cd94a1871e471bca6 --- .../companion/SystemDataTransportTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/tests/companiontests/src/android/companion/SystemDataTransportTest.java b/core/tests/companiontests/src/android/companion/SystemDataTransportTest.java index 6bd498c583db9..d633843324006 100644 --- a/core/tests/companiontests/src/android/companion/SystemDataTransportTest.java +++ b/core/tests/companiontests/src/android/companion/SystemDataTransportTest.java @@ -124,7 +124,7 @@ public class SystemDataTransportTest extends InstrumentationTestCase { assertTransportBehavior(input, expected); } - public void testMutiplePingPing() { + public void testMultiplePingPing() { final byte[] input = concat( generatePacket(MESSAGE_REQUEST_PING, /* sequence */ 1, "red"), generatePacket(MESSAGE_REQUEST_PING, /* sequence */ 2, "green")); @@ -248,7 +248,7 @@ public class SystemDataTransportTest extends InstrumentationTestCase { } @Override - public int read(byte b[], int off, int len) throws IOException { + public int read(byte[] b, int off, int len) throws IOException { // Instead of hanging indefinitely, wait a bit and claim that // nothing was read, without hitting EOF SystemClock.sleep(100); @@ -259,13 +259,13 @@ public class SystemDataTransportTest extends InstrumentationTestCase { private static class DelayingInputStream extends FilterInputStream { private final long mDelay; - public DelayingInputStream(InputStream in, long delay) { + DelayingInputStream(InputStream in, long delay) { super(in); mDelay = delay; } @Override - public int read(byte b[], int off, int len) throws IOException { + public int read(byte[] b, int off, int len) throws IOException { SystemClock.sleep(mDelay); return super.read(b, off, len); } @@ -274,25 +274,25 @@ public class SystemDataTransportTest extends InstrumentationTestCase { private static class DelayingOutputStream extends FilterOutputStream { private final long mDelay; - public DelayingOutputStream(OutputStream out, long delay) { + DelayingOutputStream(OutputStream out, long delay) { super(out); mDelay = delay; } @Override - public void write(byte b[], int off, int len) throws IOException { + public void write(byte[] b, int off, int len) throws IOException { SystemClock.sleep(mDelay); super.write(b, off, len); } } private static class TrickleInputStream extends FilterInputStream { - public TrickleInputStream(InputStream in) { + TrickleInputStream(InputStream in) { super(in); } @Override - public int read(byte b[], int off, int len) throws IOException { + public int read(byte[] b, int off, int len) throws IOException { return super.read(b, off, 1); } }