Android: keep compatibility with older JDK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
index 3e7af8c..e7e5a2a 100644
--- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
+++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
@@ -198,7 +198,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
mTextEdit = null;
mLayout = null;
mClipboardHandler = null;
- mCursors = new Hashtable<>();
+ mCursors = new Hashtable<Integer, PointerIcon>();
mLastCursorID = 0;
mSDLThread = null;
mIsResumedCalled = false;
@@ -1369,7 +1369,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
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);
diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java b/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java
index 5ad172c..05e0f0c 100644
--- a/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java
+++ b/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java
@@ -176,7 +176,7 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
public SDLJoystickHandler_API16() {
- mJoysticks = new ArrayList<>();
+ mJoysticks = new ArrayList<SDLJoystick>();
}
@Override
@@ -192,8 +192,8 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
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());
@@ -225,7 +225,7 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
}
if (i == deviceIds.length) {
if (removedDevices == null) {
- removedDevices = new ArrayList<>();
+ removedDevices = new ArrayList<Integer>();
}
removedDevices.add(device_id);
}
@@ -447,7 +447,7 @@ class SDLHapticHandler {
private final ArrayList<SDLHaptic> mHaptics;
public SDLHapticHandler() {
- mHaptics = new ArrayList<>();
+ mHaptics = new ArrayList<SDLHaptic>();
}
public void run(int device_id, float intensity, int length) {
@@ -521,7 +521,7 @@ class SDLHapticHandler {
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);
}