Re-order and remove unused Java imports.

R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2203723002 .

Cr-Commit-Position: refs/heads/master@{#13608}
This commit is contained in:
Sami Kalliomaki
2016-08-02 15:44:04 +02:00
parent 5a74650522
commit d3235f0cd9
33 changed files with 54 additions and 102 deletions

View File

@ -13,7 +13,6 @@ package org.webrtc;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.webrtc.CameraEnumerationAndroid.getClosestSupportedFramerateRange; import static org.webrtc.CameraEnumerationAndroid.getClosestSupportedFramerateRange;
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
import org.webrtc.CameraEnumerationAndroid.CaptureFormat.FramerateRange; import org.webrtc.CameraEnumerationAndroid.CaptureFormat.FramerateRange;
import org.junit.Test; import org.junit.Test;

View File

@ -11,8 +11,8 @@
package org.webrtc; package org.webrtc;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.SurfaceTexture;
import android.graphics.Rect; import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.view.Surface; import android.view.Surface;
import android.view.SurfaceHolder; import android.view.SurfaceHolder;

View File

@ -20,8 +20,6 @@ import android.opengl.EGLExt;
import android.opengl.EGLSurface; import android.opengl.EGLSurface;
import android.view.Surface; import android.view.Surface;
import org.webrtc.Logging;
/** /**
* Holds EGL state and utility methods for handling an EGL14 EGLContext, an EGLDisplay, * Holds EGL state and utility methods for handling an EGL14 EGLContext, an EGLDisplay,
* and an EGLSurface. * and an EGLSurface.

View File

@ -13,12 +13,7 @@ package org.webrtc;
import android.opengl.GLES11Ext; import android.opengl.GLES11Ext;
import android.opengl.GLES20; import android.opengl.GLES20;
import org.webrtc.GlShader;
import org.webrtc.GlUtil;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
import java.util.Arrays;
import java.util.IdentityHashMap; import java.util.IdentityHashMap;
import java.util.Map; import java.util.Map;

View File

@ -12,8 +12,6 @@ package org.webrtc;
import android.opengl.GLES20; import android.opengl.GLES20;
import org.webrtc.Logging;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
// Helper class for handling OpenGL shaders and shader programs. // Helper class for handling OpenGL shaders and shader programs.

View File

@ -19,16 +19,14 @@ import android.os.Build;
import android.os.SystemClock; import android.os.SystemClock;
import android.view.Surface; import android.view.Surface;
import org.webrtc.Logging;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Queue;
import java.util.Set; import java.util.Set;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.Queue;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
// Java-side of peerconnection_jni.cc:MediaCodecVideoDecoder. // Java-side of peerconnection_jni.cc:MediaCodecVideoDecoder.

View File

@ -12,8 +12,8 @@ package org.webrtc;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.media.MediaCodec; import android.media.MediaCodec;
import android.media.MediaCodecInfo.CodecCapabilities;
import android.media.MediaCodecInfo; import android.media.MediaCodecInfo;
import android.media.MediaCodecInfo.CodecCapabilities;
import android.media.MediaCodecList; import android.media.MediaCodecList;
import android.media.MediaFormat; import android.media.MediaFormat;
import android.opengl.GLES20; import android.opengl.GLES20;
@ -21,8 +21,6 @@ import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.view.Surface; import android.view.Surface;
import org.webrtc.Logging;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;

View File

@ -14,8 +14,6 @@ import static org.webrtc.NetworkMonitorAutoDetect.ConnectionType;
import static org.webrtc.NetworkMonitorAutoDetect.INVALID_NET_ID; import static org.webrtc.NetworkMonitorAutoDetect.INVALID_NET_ID;
import static org.webrtc.NetworkMonitorAutoDetect.NetworkInformation; import static org.webrtc.NetworkMonitorAutoDetect.NetworkInformation;
import org.webrtc.Logging;
import android.content.Context; import android.content.Context;
import android.os.Build; import android.os.Build;

View File

@ -13,16 +13,12 @@ package org.webrtc;
import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET; import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR; import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
import org.webrtc.Logging;
import android.Manifest.permission; import android.Manifest.permission;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
import android.net.ConnectivityManager.NetworkCallback; import android.net.ConnectivityManager.NetworkCallback;
import android.net.LinkAddress; import android.net.LinkAddress;

View File

@ -10,7 +10,6 @@
package org.webrtc; package org.webrtc;
import java.util.List;
import java.util.LinkedList; import java.util.LinkedList;
/** /**

View File

@ -21,7 +21,6 @@ import android.os.SystemClock;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
/** /**

View File

@ -20,8 +20,6 @@ import android.util.AttributeSet;
import android.view.SurfaceHolder; import android.view.SurfaceHolder;
import android.view.SurfaceView; import android.view.SurfaceView;
import org.webrtc.Logging;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import javax.microedition.khronos.egl.EGLContext; import javax.microedition.khronos.egl.EGLContext;

View File

@ -10,13 +10,7 @@
package org.webrtc; package org.webrtc;
import java.util.ArrayList; import org.webrtc.VideoRenderer.I420Frame;
import java.util.concurrent.CountDownLatch;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.opengles.GL10;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.graphics.Point; import android.graphics.Point;
@ -25,8 +19,13 @@ import android.opengl.EGL14;
import android.opengl.GLES20; import android.opengl.GLES20;
import android.opengl.GLSurfaceView; import android.opengl.GLSurfaceView;
import org.webrtc.Logging; import java.util.ArrayList;
import org.webrtc.VideoRenderer.I420Frame; import java.util.concurrent.CountDownLatch;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.opengles.GL10;
/** /**
* Efficiently renders YUV frames using the GPU for CSC. * Efficiently renders YUV frames using the GPU for CSC.

View File

@ -10,8 +10,6 @@
package org.webrtc; package org.webrtc;
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
import android.content.Context; import android.content.Context;
import android.test.InstrumentationTestCase; import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.LargeTest;

View File

@ -10,8 +10,6 @@
package org.webrtc; package org.webrtc;
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
import android.content.Context; import android.content.Context;
import android.test.InstrumentationTestCase; import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.LargeTest;

View File

@ -10,8 +10,6 @@
package org.webrtc; package org.webrtc;
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
import android.content.Context; import android.content.Context;
import android.hardware.camera2.CameraAccessException; import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraDevice; import android.hardware.camera2.CameraDevice;

View File

@ -9,6 +9,8 @@
*/ */
package org.webrtc; package org.webrtc;
import org.webrtc.MediaCodecVideoEncoder.OutputBufferInfo;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.opengl.GLES11Ext; import android.opengl.GLES11Ext;
import android.opengl.GLES20; import android.opengl.GLES20;
@ -17,8 +19,6 @@ import android.test.ActivityTestCase;
import android.test.suitebuilder.annotation.SmallTest; import android.test.suitebuilder.annotation.SmallTest;
import android.util.Log; import android.util.Log;
import org.webrtc.MediaCodecVideoEncoder.OutputBufferInfo;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)

View File

@ -24,7 +24,6 @@ import android.net.wifi.WifiManager;
import android.os.Build; import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.telephony.TelephonyManager;
import android.test.ActivityTestCase; import android.test.ActivityTestCase;
import android.test.UiThreadTest; import android.test.UiThreadTest;
import android.test.suitebuilder.annotation.MediumTest; import android.test.suitebuilder.annotation.MediumTest;

View File

@ -10,12 +10,12 @@
package org.webrtc; package org.webrtc;
import org.webrtc.Metrics;
import org.webrtc.Metrics.HistogramInfo; import org.webrtc.Metrics.HistogramInfo;
import org.webrtc.PeerConnection.IceConnectionState; import org.webrtc.PeerConnection.IceConnectionState;
import org.webrtc.PeerConnection.IceGatheringState; import org.webrtc.PeerConnection.IceGatheringState;
import org.webrtc.PeerConnection.SignalingState; import org.webrtc.PeerConnection.SignalingState;
import android.test.ActivityTestCase;
import android.test.suitebuilder.annotation.MediumTest; import android.test.suitebuilder.annotation.MediumTest;
import java.io.File; import java.io.File;
@ -23,18 +23,16 @@ import java.lang.ref.WeakReference;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashSet;
import java.util.IdentityHashMap; import java.util.IdentityHashMap;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
/** End-to-end tests for PeerConnection.java. */ /** End-to-end tests for PeerConnection.java. */
import android.test.ActivityTestCase;
public class PeerConnectionTest extends ActivityTestCase { public class PeerConnectionTest extends ActivityTestCase {
private static final int TIMEOUT_SECONDS = 20; private static final int TIMEOUT_SECONDS = 20;
private TreeSet<String> threadsBeforeTest = null; private TreeSet<String> threadsBeforeTest = null;

View File

@ -10,17 +10,16 @@
package org.webrtc; package org.webrtc;
import android.test.ActivityTestCase;
import android.test.MoreAsserts;
import android.test.suitebuilder.annotation.SmallTest;
import android.graphics.Point;
import static org.webrtc.RendererCommon.ScalingType.*; import static org.webrtc.RendererCommon.ScalingType.*;
import static org.webrtc.RendererCommon.getDisplaySize; import static org.webrtc.RendererCommon.getDisplaySize;
import static org.webrtc.RendererCommon.getLayoutMatrix; import static org.webrtc.RendererCommon.getLayoutMatrix;
import static org.webrtc.RendererCommon.rotateTextureMatrix; import static org.webrtc.RendererCommon.rotateTextureMatrix;
import android.graphics.Point;
import android.test.ActivityTestCase;
import android.test.MoreAsserts;
import android.test.suitebuilder.annotation.SmallTest;
public final class RendererCommonTest extends ActivityTestCase { public final class RendererCommonTest extends ActivityTestCase {
@SmallTest @SmallTest
static public void testDisplaySizeNoFrame() { static public void testDisplaySizeNoFrame() {

View File

@ -13,8 +13,8 @@ package org.webrtc;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.logging.Logger;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger;
/** Java wrapper for WebRTC logging. */ /** Java wrapper for WebRTC logging. */
public class Logging { public class Logging {

View File

@ -10,6 +10,8 @@
package org.appspot.apprtc; package org.appspot.apprtc;
import org.appspot.apprtc.util.AppRTCUtils;
import android.content.Context; import android.content.Context;
import android.hardware.Sensor; import android.hardware.Sensor;
import android.hardware.SensorEvent; import android.hardware.SensorEvent;
@ -18,7 +20,6 @@ import android.hardware.SensorManager;
import android.os.Build; import android.os.Build;
import android.util.Log; import android.util.Log;
import org.appspot.apprtc.util.AppRTCUtils;
import org.webrtc.ThreadUtils; import org.webrtc.ThreadUtils;
/** /**

View File

@ -28,7 +28,6 @@ import org.webrtc.DataChannel;
import org.webrtc.EglBase; import org.webrtc.EglBase;
import org.webrtc.IceCandidate; import org.webrtc.IceCandidate;
import org.webrtc.Logging; import org.webrtc.Logging;
import org.webrtc.MediaCodecVideoEncoder;
import org.webrtc.MediaConstraints; import org.webrtc.MediaConstraints;
import org.webrtc.MediaConstraints.KeyValuePair; import org.webrtc.MediaConstraints.KeyValuePair;
import org.webrtc.MediaStream; import org.webrtc.MediaStream;

View File

@ -10,16 +10,6 @@
package org.appspot.apprtc; package org.appspot.apprtc;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import org.webrtc.IceCandidate;
import org.webrtc.SessionDescription;
import java.util.regex.Matcher;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
@ -30,6 +20,14 @@ import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import org.webrtc.IceCandidate;
import org.webrtc.SessionDescription;
/** /**
* Test for DirectRTCClient. Test is very simple and only tests the overall sanity of the class * Test for DirectRTCClient. Test is very simple and only tests the overall sanity of the class
* behaviour. * behaviour.

View File

@ -10,6 +10,10 @@
package org.appspot.apprtc; package org.appspot.apprtc;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
@ -21,16 +25,10 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config; import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowLog; import org.robolectric.shadows.ShadowLog;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
@RunWith(RobolectricTestRunner.class) @RunWith(RobolectricTestRunner.class)
@Config(manifest = Config.NONE) @Config(manifest = Config.NONE)
public class TCPChannelClientTest { public class TCPChannelClientTest {

View File

@ -10,6 +10,11 @@
package org.appspot.apprtc.util; package org.appspot.apprtc.util;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.robolectric.Robolectric.shadowOf;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -20,11 +25,6 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config; import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowLooper; import org.robolectric.shadows.ShadowLooper;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.robolectric.Robolectric.shadowOf;
@RunWith(RobolectricTestRunner.class) @RunWith(RobolectricTestRunner.class)
@Config(manifest = Config.NONE) @Config(manifest = Config.NONE)
public class LooperExecutorTest { public class LooperExecutorTest {

View File

@ -33,7 +33,6 @@ import org.webrtc.VideoRenderer;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;

View File

@ -11,7 +11,6 @@
package org.webrtc.voiceengine; package org.webrtc.voiceengine;
import android.os.Build; import android.os.Build;
import android.util.Log;
public final class BuildInfo { public final class BuildInfo {
public static String getDevice() { public static String getDevice() {

View File

@ -10,6 +10,8 @@
package org.webrtc.voiceengine; package org.webrtc.voiceengine;
import org.webrtc.Logging;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.media.audiofx.AcousticEchoCanceler; import android.media.audiofx.AcousticEchoCanceler;
import android.media.audiofx.AudioEffect; import android.media.audiofx.AudioEffect;
@ -18,10 +20,7 @@ import android.media.audiofx.AutomaticGainControl;
import android.media.audiofx.NoiseSuppressor; import android.media.audiofx.NoiseSuppressor;
import android.os.Build; import android.os.Build;
import org.webrtc.Logging;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
// This class wraps control of three different platform effects. Supported // This class wraps control of three different platform effects. Supported

View File

@ -10,6 +10,8 @@
package org.webrtc.voiceengine; package org.webrtc.voiceengine;
import org.webrtc.Logging;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.content.Context; import android.content.Context;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
@ -19,9 +21,6 @@ import android.media.AudioRecord;
import android.media.AudioTrack; import android.media.AudioTrack;
import android.os.Build; import android.os.Build;
import org.webrtc.Logging;
import java.lang.Math;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;

View File

@ -10,9 +10,8 @@
package org.webrtc.voiceengine; package org.webrtc.voiceengine;
import java.lang.System; import org.webrtc.Logging;
import java.nio.ByteBuffer; import org.webrtc.ThreadUtils;
import java.util.concurrent.TimeUnit;
import android.content.Context; import android.content.Context;
import android.media.AudioFormat; import android.media.AudioFormat;
@ -20,8 +19,9 @@ import android.media.AudioRecord;
import android.media.MediaRecorder.AudioSource; import android.media.MediaRecorder.AudioSource;
import android.os.Process; import android.os.Process;
import org.webrtc.Logging; import java.lang.System;
import org.webrtc.ThreadUtils; import java.nio.ByteBuffer;
import java.util.concurrent.TimeUnit;
public class WebRtcAudioRecord { public class WebRtcAudioRecord {
private static final boolean DEBUG = false; private static final boolean DEBUG = false;

View File

@ -10,8 +10,7 @@
package org.webrtc.voiceengine; package org.webrtc.voiceengine;
import java.lang.Thread; import org.webrtc.Logging;
import java.nio.ByteBuffer;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.content.Context; import android.content.Context;
@ -20,7 +19,8 @@ import android.media.AudioManager;
import android.media.AudioTrack; import android.media.AudioTrack;
import android.os.Process; import android.os.Process;
import org.webrtc.Logging; import java.lang.Thread;
import java.nio.ByteBuffer;
public class WebRtcAudioTrack { public class WebRtcAudioTrack {
private static final boolean DEBUG = false; private static final boolean DEBUG = false;

View File

@ -10,19 +10,14 @@
package org.webrtc.voiceengine; package org.webrtc.voiceengine;
import org.webrtc.Logging;
import android.content.Context; import android.content.Context;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.media.audiofx.AcousticEchoCanceler;
import android.media.audiofx.AudioEffect;
import android.media.audiofx.AudioEffect.Descriptor;
import android.media.AudioManager;
import android.os.Build; import android.os.Build;
import android.os.Process; import android.os.Process;
import org.webrtc.Logging;
import java.lang.Thread; import java.lang.Thread;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;