mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 01:05:28 +00:00
Android Studio code analyzer fixes
This commit is contained in:
parent
a223560a7f
commit
dff56c3497
|
@ -2,12 +2,9 @@ package org.libsdl.app;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Objects;
|
||||
|
||||
import android.app.*;
|
||||
import android.content.*;
|
||||
|
@ -26,7 +23,6 @@ import android.util.Log;
|
|||
import android.util.SparseArray;
|
||||
import android.graphics.*;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.media.*;
|
||||
import android.hardware.*;
|
||||
import android.content.pm.ActivityInfo;
|
||||
|
||||
|
@ -400,7 +396,6 @@ public class SDLActivity extends Activity {
|
|||
mSurface.handleResume();
|
||||
mCurrentNativeState = mNextNativeState;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -547,7 +542,7 @@ public class SDLActivity extends Activity {
|
|||
{
|
||||
int orientation = -1;
|
||||
|
||||
if (hint != "") {
|
||||
if (!Objects.equals(hint, "")) {
|
||||
if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
} else if (hint.contains("LandscapeRight")) {
|
||||
|
@ -580,8 +575,6 @@ public class SDLActivity extends Activity {
|
|||
if (orientation != -1) {
|
||||
mSingleton.setRequestedOrientation(orientation);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
@ -590,20 +583,17 @@ public class SDLActivity extends Activity {
|
|||
*/
|
||||
public static boolean isScreenKeyboardShown()
|
||||
{
|
||||
if (mTextEdit == null) {
|
||||
return false;
|
||||
}
|
||||
if (mTextEdit == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mScreenKeyboardShown == false) {
|
||||
return false;
|
||||
}
|
||||
if (!mScreenKeyboardShown) {
|
||||
return false;
|
||||
}
|
||||
|
||||
InputMethodManager imm = (InputMethodManager) SDL.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (imm.isAcceptingText()) {
|
||||
return true;
|
||||
}
|
||||
InputMethodManager imm = (InputMethodManager) SDL.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
return imm.isAcceptingText();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -681,10 +671,7 @@ public class SDLActivity extends Activity {
|
|||
}
|
||||
}
|
||||
|
||||
if (event.isPrintingKey() || event.getKeyCode() == KeyEvent.KEYCODE_SPACE) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return event.isPrintingKey() || event.getKeyCode() == KeyEvent.KEYCODE_SPACE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1010,7 +997,6 @@ public class SDLActivity extends Activity {
|
|||
*/
|
||||
public static void clipboardSetText(String string) {
|
||||
mClipboardHandler.clipboardSetText(string);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1604,7 +1590,6 @@ class SDLClipboardHandler_Old implements
|
|||
@Override
|
||||
public void clipboardSetText(String string) {
|
||||
mClipMgrOld.setText(string);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.libsdl.app;
|
||||
|
||||
import android.media.*;
|
||||
import android.hardware.*;
|
||||
import android.util.Log;
|
||||
|
||||
public class SDLAudioManager
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package org.libsdl.app;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import android.app.*;
|
||||
import android.content.Context;
|
||||
import android.hardware.*;
|
||||
import android.os.*;
|
||||
import android.view.*;
|
||||
import android.util.Log;
|
||||
|
@ -268,7 +266,7 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler_API12 {
|
|||
public String getJoystickDescriptor(InputDevice joystickDevice) {
|
||||
String desc = joystickDevice.getDescriptor();
|
||||
|
||||
if (desc != null && desc != "") {
|
||||
if (desc != null && !Objects.equals(desc, "")) {
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue