Merge "Fix errorprone warnings that should be errors"
This commit is contained in:
@@ -245,7 +245,7 @@ public class MonkeySourceScript implements MonkeyEventSource {
|
|||||||
if (line == null) {
|
if (line == null) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
line.trim();
|
line = line.trim();
|
||||||
processLine(line);
|
processLine(line);
|
||||||
}
|
}
|
||||||
return MAX_ONE_TIME_READS;
|
return MAX_ONE_TIME_READS;
|
||||||
@@ -262,7 +262,7 @@ public class MonkeySourceScript implements MonkeyEventSource {
|
|||||||
if (line == null) {
|
if (line == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
line.trim();
|
line = line.trim();
|
||||||
processLine(line);
|
processLine(line);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,18 +40,17 @@ import android.widget.Spinner;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import android.widget.ToggleButton;
|
import android.widget.ToggleButton;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class MediaProjectionDemo extends Activity {
|
public class MediaProjectionDemo extends Activity {
|
||||||
private static final String TAG = "MediaProjectionDemo";
|
private static final String TAG = "MediaProjectionDemo";
|
||||||
private static final int PERMISSION_CODE = 1;
|
private static final int PERMISSION_CODE = 1;
|
||||||
private static final List<Resolution> RESOLUTIONS = new ArrayList<Resolution>() {{
|
private static final List<Resolution> RESOLUTIONS = Arrays.asList(
|
||||||
add(new Resolution(640,360));
|
new Resolution(640,360),
|
||||||
add(new Resolution(960,540));
|
new Resolution(960,540),
|
||||||
add(new Resolution(1366,768));
|
new Resolution(1366,768),
|
||||||
add(new Resolution(1600,900));
|
new Resolution(1600,900));
|
||||||
}};
|
|
||||||
|
|
||||||
private int mScreenDensity;
|
private int mScreenDensity;
|
||||||
private MediaProjectionManager mProjectionManager;
|
private MediaProjectionManager mProjectionManager;
|
||||||
|
|||||||
@@ -188,7 +188,6 @@ public class EncodedStringValue implements Cloneable {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object clone() throws CloneNotSupportedException {
|
public Object clone() throws CloneNotSupportedException {
|
||||||
super.clone();
|
|
||||||
int len = mData.length;
|
int len = mData.length;
|
||||||
byte[] dstBytes = new byte[len];
|
byte[] dstBytes = new byte[len];
|
||||||
System.arraycopy(mData, 0, dstBytes, 0, len);
|
System.arraycopy(mData, 0, dstBytes, 0, len);
|
||||||
|
|||||||
Reference in New Issue
Block a user