Skip to content

Commit

Permalink
Android: keep compatibility with older JDK
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Oct 28, 2020
1 parent 97cf314 commit 311ae82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Expand Up @@ -198,7 +198,7 @@ public static void initialize() {
mTextEdit = null;
mLayout = null;
mClipboardHandler = null;
mCursors = new Hashtable<>();
mCursors = new Hashtable<Integer, PointerIcon>();
mLastCursorID = 0;
mSDLThread = null;
mIsResumedCalled = false;
Expand Down Expand Up @@ -1369,7 +1369,7 @@ public void onDismiss(DialogInterface unused) {
int[] buttonIds = args.getIntArray("buttonIds");
String[] buttonTexts = args.getStringArray("buttonTexts");

final SparseArray<Button> mapping = new SparseArray<>();
final SparseArray<Button> mapping = new SparseArray<Button>();

LinearLayout buttons = new LinearLayout(this);
buttons.setOrientation(LinearLayout.HORIZONTAL);
Expand Down
Expand Up @@ -176,7 +176,7 @@ public int compare(InputDevice.MotionRange arg0, InputDevice.MotionRange arg1) {

public SDLJoystickHandler_API16() {

mJoysticks = new ArrayList<>();
mJoysticks = new ArrayList<SDLJoystick>();
}

@Override
Expand All @@ -192,8 +192,8 @@ public void pollInputDevices() {
joystick.device_id = device_id;
joystick.name = joystickDevice.getName();
joystick.desc = getJoystickDescriptor(joystickDevice);
joystick.axes = new ArrayList<>();
joystick.hats = new ArrayList<>();
joystick.axes = new ArrayList<InputDevice.MotionRange>();
joystick.hats = new ArrayList<InputDevice.MotionRange>();

List<InputDevice.MotionRange> ranges = joystickDevice.getMotionRanges();
Collections.sort(ranges, new RangeComparator());
Expand Down Expand Up @@ -225,7 +225,7 @@ public void pollInputDevices() {
}
if (i == deviceIds.length) {
if (removedDevices == null) {
removedDevices = new ArrayList<>();
removedDevices = new ArrayList<Integer>();
}
removedDevices.add(device_id);
}
Expand Down Expand Up @@ -447,7 +447,7 @@ static class SDLHaptic {
private final ArrayList<SDLHaptic> mHaptics;

public SDLHapticHandler() {
mHaptics = new ArrayList<>();
mHaptics = new ArrayList<SDLHaptic>();
}

public void run(int device_id, float intensity, int length) {
Expand Down Expand Up @@ -521,7 +521,7 @@ public void pollHapticDevices() {
if (device_id != deviceId_VIBRATOR_SERVICE || !hasVibratorService) {
if (i == deviceIds.length) {
if (removedDevices == null) {
removedDevices = new ArrayList<>();
removedDevices = new ArrayList<Integer>();
}
removedDevices.add(device_id);
}
Expand Down

0 comments on commit 311ae82

Please sign in to comment.