summaryrefslogtreecommitdiff
path: root/platform/android/java/lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/java/lib/src')
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/Godot.java4
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotIO.java8
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java4
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java2
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java4
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java6
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/utils/Crypt.java2
7 files changed, 15 insertions, 15 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.java b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
index 1a17e5b7c8..1fab47e764 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
@@ -513,7 +513,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
String main_pack_md5 = null;
String main_pack_key = null;
- List<String> new_args = new LinkedList<String>();
+ List<String> new_args = new LinkedList<>();
for (int i = 0; i < command_line.length; i++) {
boolean has_extra = i < command_line.length - 1;
@@ -865,7 +865,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
byte[] messageDigest = complete.digest();
// Create Hex String
- StringBuffer hexString = new StringBuffer();
+ StringBuilder hexString = new StringBuilder();
for (int i = 0; i < messageDigest.length; i++) {
String s = Integer.toHexString(0xFF & messageDigest[i]);
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java
index 8407b4570e..66882e8e72 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java
@@ -71,7 +71,7 @@ public class GodotIO {
public int last_file_id = 1;
- class AssetData {
+ static class AssetData {
public boolean eof = false;
public String path;
public InputStream is;
@@ -230,7 +230,7 @@ public class GodotIO {
/// DIRECTORIES
/////////////////////////
- class AssetDir {
+ static class AssetDir {
public String[] files;
public int current;
public String path;
@@ -321,8 +321,8 @@ public class GodotIO {
am = p_activity.getAssets();
activity = p_activity;
//streams = new HashMap<Integer, AssetData>();
- streams = new SparseArray<AssetData>();
- dirs = new SparseArray<AssetDir>();
+ streams = new SparseArray<>();
+ dirs = new SparseArray<>();
}
/////////////////////////
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
index 8cd0038806..4dc9157545 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
@@ -60,7 +60,7 @@ public class GodotInputHandler implements InputDeviceListener {
private final String tag = this.getClass().getSimpleName();
private final SparseIntArray mJoystickIds = new SparseIntArray(4);
- private final SparseArray<Joystick> mJoysticksDevices = new SparseArray<Joystick>(4);
+ private final SparseArray<Joystick> mJoysticksDevices = new SparseArray<>(4);
public GodotInputHandler(GodotRenderView godotView) {
mRenderView = godotView;
@@ -289,7 +289,7 @@ public class GodotInputHandler implements InputDeviceListener {
//Helps with creating new joypad mappings.
Log.i(tag, "=== New Input Device: " + joystick.name);
- Set<Integer> already = new HashSet<Integer>();
+ Set<Integer> already = new HashSet<>();
for (InputDevice.MotionRange range : device.getMotionRanges()) {
boolean isJoystick = range.isFromSource(InputDevice.SOURCE_JOYSTICK);
boolean isGamepad = range.isFromSource(InputDevice.SOURCE_GAMEPAD);
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java b/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java
index 61828dccae..0dbc13c77b 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java
@@ -34,7 +34,7 @@ public class InputManagerV16 implements InputManagerCompat {
public InputManagerV16(Context context) {
mInputManager = (InputManager)context.getSystemService(Context.INPUT_SERVICE);
- mListeners = new HashMap<InputManagerCompat.InputDeviceListener, V16InputDeviceListener>();
+ mListeners = new HashMap<>();
}
@Override
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java b/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java
index 095fa9bd2a..bff90d7ce9 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java
@@ -41,12 +41,12 @@ import java.util.List;
class Joystick {
int device_id;
String name;
- List<Integer> axes = new ArrayList<Integer>();
+ List<Integer> axes = new ArrayList<>();
protected boolean hasAxisHat = false;
/*
* Keep track of values so we can prevent flooding the engine with useless events.
*/
- protected final SparseArray<Float> axesValues = new SparseArray<Float>(4);
+ protected final SparseArray<Float> axesValues = new SparseArray<>(4);
protected int hatX;
protected int hatY;
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
index 6c8a3d4219..2dc8359615 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
@@ -136,7 +136,7 @@ public abstract class GodotPlugin {
nativeRegisterSingleton(pluginName, pluginObject);
Set<Method> filteredMethods = new HashSet<>();
- Class clazz = pluginObject.getClass();
+ Class<?> clazz = pluginObject.getClass();
Method[] methods = clazz.getDeclaredMethods();
for (Method method : methods) {
@@ -157,8 +157,8 @@ public abstract class GodotPlugin {
for (Method method : filteredMethods) {
List<String> ptr = new ArrayList<>();
- Class[] paramTypes = method.getParameterTypes();
- for (Class c : paramTypes) {
+ Class<?>[] paramTypes = method.getParameterTypes();
+ for (Class<?> c : paramTypes) {
ptr.add(c.getName());
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/utils/Crypt.java b/platform/android/java/lib/src/org/godotengine/godot/utils/Crypt.java
index b05da71f8b..2b6e4ad2be 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/utils/Crypt.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/utils/Crypt.java
@@ -42,7 +42,7 @@ public class Crypt {
byte[] messageDigest = digest.digest();
// Create Hex String
- StringBuffer hexString = new StringBuffer();
+ StringBuilder hexString = new StringBuilder();
for (int i = 0; i < messageDigest.length; i++)
hexString.append(Integer.toHexString(0xFF & messageDigest[i]));
return hexString.toString();