Address UnnecessaryParentheses errorprone warnings
These prevent the roll of Chromium, see [1]. This CL is a follow-up of https://webrtc-review.googlesource.com/c/src/+/363944 which didn't fix all of the issues. [1] - https://ci.chromium.org/ui/p/webrtc/builders/try/android_arm64_rel/78025/overview Bug: None Change-Id: I68c5ea605ed621dae2494378e74313ba0652c6a2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363945 Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43101}
This commit is contained in:
parent
f0a57db2e4
commit
4ab100d4a6
@ -360,7 +360,7 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
|
||||
|
||||
// For command line execution run connection for <runTimeMs> and exit.
|
||||
if (commandLineRun && runTimeMs > 0) {
|
||||
(new Handler()).postDelayed(new Runnable() {
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
disconnect();
|
||||
|
||||
@ -360,7 +360,7 @@ public class ConnectActivity extends Activity {
|
||||
|
||||
// roomId is random for loopback.
|
||||
if (loopback) {
|
||||
roomId = Integer.toString((new Random()).nextInt(100000000));
|
||||
roomId = Integer.toString(new Random().nextInt(100000000));
|
||||
}
|
||||
|
||||
String roomUrl = sharedPref.getString(
|
||||
|
||||
@ -98,7 +98,7 @@ public class RoomParametersFetcher {
|
||||
String clientId = roomJson.getString("client_id");
|
||||
String wssUrl = roomJson.getString("wss_url");
|
||||
String wssPostUrl = roomJson.getString("wss_post_url");
|
||||
boolean initiator = (roomJson.getBoolean("is_initiator"));
|
||||
boolean initiator = roomJson.getBoolean("is_initiator");
|
||||
if (!initiator) {
|
||||
iceCandidates = new ArrayList<>();
|
||||
String messagesString = roomJson.getString("messages");
|
||||
|
||||
@ -51,8 +51,8 @@ public class GlRectDrawerTest {
|
||||
int width, int height, ByteBuffer actual, ByteBuffer expected) {
|
||||
actual.rewind();
|
||||
expected.rewind();
|
||||
assertEquals(actual.remaining(), width * height * 3);
|
||||
assertEquals(expected.remaining(), width * height * 3);
|
||||
assertEquals(actual.remaining(), width * ((long) height) * 3L);
|
||||
assertEquals(expected.remaining(), width * ((long) height) * 3L);
|
||||
for (int y = 0; y < height; ++y) {
|
||||
for (int x = 0; x < width; ++x) {
|
||||
final int actualR = actual.get() & 0xFF;
|
||||
|
||||
@ -518,13 +518,13 @@ public class PeerConnectionEndToEndTest {
|
||||
// stall a wait). Use callbacks to fire off dependent steps instead of
|
||||
// explicitly waiting, so there can be just a single wait at the end of
|
||||
// the test.
|
||||
long endTime = System.currentTimeMillis() + 1000 * timeoutSeconds;
|
||||
long endTime = System.currentTimeMillis() + 1000L * timeoutSeconds;
|
||||
TreeSet<String> prev = null;
|
||||
TreeSet<String> stillWaitingForExpectations = unsatisfiedExpectations();
|
||||
while (!stillWaitingForExpectations.isEmpty()) {
|
||||
if (!stillWaitingForExpectations.equals(prev)) {
|
||||
Logging.d(TAG,
|
||||
name + " still waiting at\n " + (new Throwable()).getStackTrace()[1]
|
||||
name + " still waiting at\n " + new Throwable().getStackTrace()[1]
|
||||
+ "\n for: " + Arrays.toString(stillWaitingForExpectations.toArray()));
|
||||
}
|
||||
if (endTime < System.currentTimeMillis()) {
|
||||
@ -543,7 +543,7 @@ public class PeerConnectionEndToEndTest {
|
||||
}
|
||||
if (prev == null) {
|
||||
Logging.d(
|
||||
TAG, name + " didn't need to wait at\n " + (new Throwable()).getStackTrace()[1]);
|
||||
TAG, name + " didn't need to wait at\n " + new Throwable().getStackTrace()[1]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -1645,7 +1645,7 @@ public class PeerConnectionEndToEndTest {
|
||||
Logging.d(TAG, "FYI stats: ");
|
||||
int reportIndex = -1;
|
||||
for (StatsReport[] reports : expectations.takeStatsReports()) {
|
||||
Logging.d(TAG, " Report #" + (++reportIndex));
|
||||
Logging.d(TAG, " Report #" + ++reportIndex);
|
||||
for (int i = 0; i < reports.length; ++i) {
|
||||
Logging.d(TAG, " " + reports[i].toString());
|
||||
}
|
||||
|
||||
@ -391,7 +391,7 @@ public class VideoFrameBufferTest {
|
||||
final List<Integer> pixelDiffs = getPixelDiffs(bufferA, bufferB);
|
||||
long sse = 0;
|
||||
for (int pixelDiff : pixelDiffs) {
|
||||
sse += pixelDiff * pixelDiff;
|
||||
sse += pixelDiff * ((long) pixelDiff);
|
||||
}
|
||||
return sseToPsnr(sse, pixelDiffs.size());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user