Tighten up a bunch of declarations to make Lint happier

This commit is contained in:
Cameron Gutman
2015-02-05 13:21:04 -05:00
parent 07277e1a5b
commit d3986080a3
23 changed files with 81 additions and 80 deletions

View File

@@ -30,17 +30,17 @@ public class ControllerHandler implements InputManager.InputDeviceListener {
private static final int EMULATED_SPECIAL_UP_DELAY_MS = 100;
private static final int EMULATED_SELECT_UP_DELAY_MS = 30;
private Vector2d inputVector = new Vector2d();
private final Vector2d inputVector = new Vector2d();
private HashMap<String, ControllerContext> contexts = new HashMap<String, ControllerContext>();
private final HashMap<String, ControllerContext> contexts = new HashMap<String, ControllerContext>();
private NvConnection conn;
private double stickDeadzone;
private final NvConnection conn;
private final double stickDeadzone;
private final ControllerContext defaultContext = new ControllerContext();
private GameGestures gestures;
private final GameGestures gestures;
private boolean hasGameController;
private boolean multiControllerEnabled;
private final boolean multiControllerEnabled;
private short currentControllers;
public ControllerHandler(NvConnection conn, GameGestures gestures, boolean multiControllerEnabled, int deadzonePercentage) {

View File

@@ -15,7 +15,7 @@ public class KeyboardTranslator extends KeycodeTranslator {
/**
* GFE's prefix for every key code
*/
public static final short KEY_PREFIX = (short) 0x80;
private static final short KEY_PREFIX = (short) 0x80;
public static final int VK_0 = 48;
public static final int VK_9 = 57;

View File

@@ -11,9 +11,10 @@ public class TouchContext {
private long originalTouchTime = 0;
private boolean cancelled;
private NvConnection conn;
private int actionIndex;
private double xFactor, yFactor;
private final NvConnection conn;
private final int actionIndex;
private final double xFactor;
private final double yFactor;
private static final int TAP_MOVEMENT_THRESHOLD = 10;
private static final int TAP_TIME_THRESHOLD = 250;

View File

@@ -29,9 +29,9 @@ public class EvdevEvent {
/* Keys */
public static final short KEY_Q = 16;
public short type;
public short code;
public int value;
public final short type;
public final short code;
public final int value;
public EvdevEvent(short type, short code, int value) {
this.type = type;

View File

@@ -7,12 +7,12 @@ import com.limelight.LimeLog;
public class EvdevHandler {
private String absolutePath;
private EvdevListener listener;
private final String absolutePath;
private final EvdevListener listener;
private boolean shutdown = false;
private int fd = -1;
private Thread handlerThread = new Thread() {
private final Thread handlerThread = new Thread() {
@Override
public void run() {
// All the finally blocks here make this code look like a mess

View File

@@ -4,7 +4,7 @@ import android.view.KeyEvent;
public class EvdevTranslator {
public static final short EVDEV_KEY_CODES[] = {
private static final short[] EVDEV_KEY_CODES = {
0, //KeyEvent.VK_RESERVED
KeyEvent.KEYCODE_ESCAPE,
KeyEvent.KEYCODE_1,