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:
@ -13,7 +13,6 @@ package org.webrtc;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.webrtc.CameraEnumerationAndroid.getClosestSupportedFramerateRange;
|
||||
|
||||
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
|
||||
import org.webrtc.CameraEnumerationAndroid.CaptureFormat.FramerateRange;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
package org.webrtc;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.SurfaceTexture;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.SurfaceTexture;
|
||||
import android.view.Surface;
|
||||
import android.view.SurfaceHolder;
|
||||
|
||||
|
||||
@ -20,8 +20,6 @@ import android.opengl.EGLExt;
|
||||
import android.opengl.EGLSurface;
|
||||
import android.view.Surface;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
/**
|
||||
* Holds EGL state and utility methods for handling an EGL14 EGLContext, an EGLDisplay,
|
||||
* and an EGLSurface.
|
||||
|
||||
@ -13,12 +13,7 @@ package org.webrtc;
|
||||
import android.opengl.GLES11Ext;
|
||||
import android.opengl.GLES20;
|
||||
|
||||
import org.webrtc.GlShader;
|
||||
import org.webrtc.GlUtil;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.Arrays;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@ -12,8 +12,6 @@ package org.webrtc;
|
||||
|
||||
import android.opengl.GLES20;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
// Helper class for handling OpenGL shaders and shader programs.
|
||||
|
||||
@ -19,16 +19,14 @@ import android.os.Build;
|
||||
import android.os.SystemClock;
|
||||
import android.view.Surface;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
// Java-side of peerconnection_jni.cc:MediaCodecVideoDecoder.
|
||||
|
||||
@ -12,8 +12,8 @@ package org.webrtc;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.media.MediaCodec;
|
||||
import android.media.MediaCodecInfo.CodecCapabilities;
|
||||
import android.media.MediaCodecInfo;
|
||||
import android.media.MediaCodecInfo.CodecCapabilities;
|
||||
import android.media.MediaCodecList;
|
||||
import android.media.MediaFormat;
|
||||
import android.opengl.GLES20;
|
||||
@ -21,8 +21,6 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.Surface;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
@ -14,8 +14,6 @@ import static org.webrtc.NetworkMonitorAutoDetect.ConnectionType;
|
||||
import static org.webrtc.NetworkMonitorAutoDetect.INVALID_NET_ID;
|
||||
import static org.webrtc.NetworkMonitorAutoDetect.NetworkInformation;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
|
||||
|
||||
@ -13,16 +13,12 @@ package org.webrtc;
|
||||
import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
|
||||
import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
|
||||
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import android.Manifest.permission;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.ConnectivityManager.NetworkCallback;
|
||||
import android.net.LinkAddress;
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
|
||||
@ -21,7 +21,6 @@ import android.os.SystemClock;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
|
||||
@ -20,8 +20,6 @@ import android.util.AttributeSet;
|
||||
import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
import javax.microedition.khronos.egl.EGLContext;
|
||||
|
||||
@ -10,13 +10,7 @@
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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 org.webrtc.VideoRenderer.I420Frame;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Point;
|
||||
@ -25,8 +19,13 @@ import android.opengl.EGL14;
|
||||
import android.opengl.GLES20;
|
||||
import android.opengl.GLSurfaceView;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
import org.webrtc.VideoRenderer.I420Frame;
|
||||
import java.util.ArrayList;
|
||||
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.
|
||||
|
||||
@ -10,8 +10,6 @@
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
|
||||
|
||||
import android.content.Context;
|
||||
import android.test.InstrumentationTestCase;
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
|
||||
@ -10,8 +10,6 @@
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
|
||||
|
||||
import android.content.Context;
|
||||
import android.test.InstrumentationTestCase;
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
|
||||
@ -10,8 +10,6 @@
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.camera2.CameraAccessException;
|
||||
import android.hardware.camera2.CameraDevice;
|
||||
|
||||
@ -9,6 +9,8 @@
|
||||
*/
|
||||
package org.webrtc;
|
||||
|
||||
import org.webrtc.MediaCodecVideoEncoder.OutputBufferInfo;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.opengl.GLES11Ext;
|
||||
import android.opengl.GLES20;
|
||||
@ -17,8 +19,6 @@ import android.test.ActivityTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
import android.util.Log;
|
||||
|
||||
import org.webrtc.MediaCodecVideoEncoder.OutputBufferInfo;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)
|
||||
|
||||
@ -24,7 +24,6 @@ import android.net.wifi.WifiManager;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.test.ActivityTestCase;
|
||||
import android.test.UiThreadTest;
|
||||
import android.test.suitebuilder.annotation.MediumTest;
|
||||
|
||||
@ -10,12 +10,12 @@
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
import org.webrtc.Metrics;
|
||||
import org.webrtc.Metrics.HistogramInfo;
|
||||
import org.webrtc.PeerConnection.IceConnectionState;
|
||||
import org.webrtc.PeerConnection.IceGatheringState;
|
||||
import org.webrtc.PeerConnection.SignalingState;
|
||||
|
||||
import android.test.ActivityTestCase;
|
||||
import android.test.suitebuilder.annotation.MediumTest;
|
||||
|
||||
import java.io.File;
|
||||
@ -23,18 +23,16 @@ import java.lang.ref.WeakReference;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.TreeSet;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/** End-to-end tests for PeerConnection.java. */
|
||||
import android.test.ActivityTestCase;
|
||||
|
||||
public class PeerConnectionTest extends ActivityTestCase {
|
||||
private static final int TIMEOUT_SECONDS = 20;
|
||||
private TreeSet<String> threadsBeforeTest = null;
|
||||
|
||||
@ -10,17 +10,16 @@
|
||||
|
||||
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.getDisplaySize;
|
||||
import static org.webrtc.RendererCommon.getLayoutMatrix;
|
||||
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 {
|
||||
@SmallTest
|
||||
static public void testDisplaySizeNoFrame() {
|
||||
|
||||
@ -13,8 +13,8 @@ package org.webrtc;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.EnumSet;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/** Java wrapper for WebRTC logging. */
|
||||
public class Logging {
|
||||
|
||||
@ -10,6 +10,8 @@
|
||||
|
||||
package org.appspot.apprtc;
|
||||
|
||||
import org.appspot.apprtc.util.AppRTCUtils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.Sensor;
|
||||
import android.hardware.SensorEvent;
|
||||
@ -18,7 +20,6 @@ import android.hardware.SensorManager;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import org.appspot.apprtc.util.AppRTCUtils;
|
||||
import org.webrtc.ThreadUtils;
|
||||
|
||||
/**
|
||||
|
||||
@ -28,7 +28,6 @@ import org.webrtc.DataChannel;
|
||||
import org.webrtc.EglBase;
|
||||
import org.webrtc.IceCandidate;
|
||||
import org.webrtc.Logging;
|
||||
import org.webrtc.MediaCodecVideoEncoder;
|
||||
import org.webrtc.MediaConstraints;
|
||||
import org.webrtc.MediaConstraints.KeyValuePair;
|
||||
import org.webrtc.MediaStream;
|
||||
|
||||
@ -10,16 +10,6 @@
|
||||
|
||||
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.assertTrue;
|
||||
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.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
|
||||
* behaviour.
|
||||
|
||||
@ -10,6 +10,10 @@
|
||||
|
||||
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.Before;
|
||||
@ -21,16 +25,10 @@ import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.annotation.Config;
|
||||
import org.robolectric.shadows.ShadowLog;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
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)
|
||||
@Config(manifest = Config.NONE)
|
||||
public class TCPChannelClientTest {
|
||||
|
||||
@ -10,6 +10,11 @@
|
||||
|
||||
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.Before;
|
||||
import org.junit.Test;
|
||||
@ -20,11 +25,6 @@ import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.annotation.Config;
|
||||
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)
|
||||
@Config(manifest = Config.NONE)
|
||||
public class LooperExecutorTest {
|
||||
|
||||
@ -33,7 +33,6 @@ import org.webrtc.VideoRenderer;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
package org.webrtc.voiceengine;
|
||||
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
public final class BuildInfo {
|
||||
public static String getDevice() {
|
||||
|
||||
@ -10,6 +10,8 @@
|
||||
|
||||
package org.webrtc.voiceengine;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.media.audiofx.AcousticEchoCanceler;
|
||||
import android.media.audiofx.AudioEffect;
|
||||
@ -18,10 +20,7 @@ import android.media.audiofx.AutomaticGainControl;
|
||||
import android.media.audiofx.NoiseSuppressor;
|
||||
import android.os.Build;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
// This class wraps control of three different platform effects. Supported
|
||||
|
||||
@ -10,6 +10,8 @@
|
||||
|
||||
package org.webrtc.voiceengine;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
@ -19,9 +21,6 @@ import android.media.AudioRecord;
|
||||
import android.media.AudioTrack;
|
||||
import android.os.Build;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import java.lang.Math;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
|
||||
@ -10,9 +10,8 @@
|
||||
|
||||
package org.webrtc.voiceengine;
|
||||
|
||||
import java.lang.System;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.webrtc.Logging;
|
||||
import org.webrtc.ThreadUtils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.media.AudioFormat;
|
||||
@ -20,8 +19,9 @@ import android.media.AudioRecord;
|
||||
import android.media.MediaRecorder.AudioSource;
|
||||
import android.os.Process;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
import org.webrtc.ThreadUtils;
|
||||
import java.lang.System;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class WebRtcAudioRecord {
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
@ -10,8 +10,7 @@
|
||||
|
||||
package org.webrtc.voiceengine;
|
||||
|
||||
import java.lang.Thread;
|
||||
import java.nio.ByteBuffer;
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
@ -20,7 +19,8 @@ import android.media.AudioManager;
|
||||
import android.media.AudioTrack;
|
||||
import android.os.Process;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
import java.lang.Thread;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class WebRtcAudioTrack {
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
@ -10,19 +10,14 @@
|
||||
|
||||
package org.webrtc.voiceengine;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import android.content.Context;
|
||||
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.Process;
|
||||
|
||||
import org.webrtc.Logging;
|
||||
|
||||
import java.lang.Thread;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user