Navigation Menu

Skip to content

Commit

Permalink
Android: remove trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Jan 16, 2019
1 parent d86de28 commit a867541
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
Expand Up @@ -500,7 +500,7 @@ public static void handleNativeState() {
mSDLThread = new Thread(new SDLMain(), "SDLThread");
mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true);
mSDLThread.start();

// No nativeResume(), don't signal Android_ResumeSem
mSurface.handleResume();
} else {
Expand Down Expand Up @@ -572,7 +572,7 @@ public void handleMessage(Message msg) {
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.INVISIBLE;
window.getDecorView().setSystemUiVisibility(flags);
window.getDecorView().setSystemUiVisibility(flags);
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
SDLActivity.mFullscreenModeActive = true;
Expand All @@ -597,7 +597,7 @@ public void handleMessage(Message msg) {

InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);

mScreenKeyboardShown = false;
}
break;
Expand Down Expand Up @@ -664,14 +664,14 @@ boolean sendCommand(int command, Object data) {
// or 500ms have passed.

boolean bShouldWait = false;

if (data instanceof Integer) {
// Let's figure out if we're already laid out fullscreen or not.
Display display = ((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics();
display.getRealMetrics( realMetrics );
boolean bFullscreenLayout = ((realMetrics.widthPixels == mSurface.getWidth()) &&

boolean bFullscreenLayout = ((realMetrics.widthPixels == mSurface.getWidth()) &&
(realMetrics.heightPixels == mSurface.getHeight()));

if (((Integer)data).intValue() == 1) {
Expand All @@ -696,7 +696,7 @@ boolean sendCommand(int command, Object data) {
// size we need, instead of grabbing a size that's still got
// the navigation and/or status bars before they're hidden.
//
// We'll wait for up to half a second, because some devices
// We'll wait for up to half a second, because some devices
// take a surprisingly long time for the surface resize, but
// then we'll just give up and return.
//
Expand Down Expand Up @@ -760,19 +760,19 @@ public static void setWindowStyle(boolean fullscreen) {
/**
* This method is called by SDL using JNI.
* This is a static method for JNI convenience, it calls a non-static method
* so that is can be overridden
* so that is can be overridden
*/
public static void setOrientation(int w, int h, boolean resizable, String hint)
{
if (mSingleton != null) {
mSingleton.setOrientationBis(w, h, resizable, hint);
}
}

/**
* This can be overridden
*/
public void setOrientationBis(int w, int h, boolean resizable, String hint)
public void setOrientationBis(int w, int h, boolean resizable, String hint)
{
int orientation = -1;

Expand Down Expand Up @@ -812,7 +812,7 @@ public void setOrientationBis(int w, int h, boolean resizable, String hint)
/**
* This method is called by SDL using JNI.
*/
public static boolean isScreenKeyboardShown()
public static boolean isScreenKeyboardShown()
{
if (mTextEdit == null) {
return false;
Expand All @@ -837,7 +837,7 @@ public static boolean supportsRelativeMouse()
return false;
}

// DeX mode in Samsung Experience 9.0 and earlier doesn't support relative mice properly under
// DeX mode in Samsung Experience 9.0 and earlier doesn't support relative mice properly under
// Android 7 APIs, and simply returns no data under Android 8 APIs.
//
// This is fixed in Samsung Experience 9.5, which corresponds to Android 8.1.0, and
Expand Down Expand Up @@ -919,7 +919,7 @@ public static boolean isTablet() {
*/
public static boolean isChromebook() {
return getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
}
}

/**
* This method is called by SDL using JNI.
Expand Down Expand Up @@ -965,15 +965,15 @@ public static boolean getManifestEnvironmentVariables() {
}
}
/* environment variables set! */
return true;
return true;
} catch (Exception e) {
Log.v("SDL", "exception " + e.toString());
}
return false;
}

// This method is called by SDLControllerManager's API 26 Generic Motion Handler.
public static View getContentView()
public static View getContentView()
{
return mSingleton.mLayout;
}
Expand Down Expand Up @@ -1028,7 +1028,7 @@ public static boolean showTextInput(int x, int y, int w, int h) {
}

public static boolean isTextInputEvent(KeyEvent event) {

// Key pressed with Ctrl should be sent as SDL_KEYDOWN/SDL_KEYUP and not SDL_TEXTINPUT
if (event.isCtrlPressed()) {
return false;
Expand Down Expand Up @@ -1370,7 +1370,7 @@ public void onSystemUiVisibilityChange(int visibility) {
}

}
}
}

/**
* This method is called by SDL using JNI.
Expand Down Expand Up @@ -1870,7 +1870,7 @@ public void onSensorChanged(SensorEvent event) {
// Since we may have an orientation set, we won't receive onConfigurationChanged events.
// We thus should check here.
int newOrientation = SDLActivity.SDL_ORIENTATION_UNKNOWN;

float x, y;
switch (mDisplay.getRotation()) {
case Surface.ROTATION_90:
Expand Down Expand Up @@ -1904,7 +1904,7 @@ public void onSensorChanged(SensorEvent event) {
y / SensorManager.GRAVITY_EARTH,
event.values[2] / SensorManager.GRAVITY_EARTH);


}
}

Expand Down Expand Up @@ -1972,7 +1972,7 @@ public boolean onCheckIsTextEditor() {

@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
/*
/*
* This handles the hardware keyboard input
*/
if (event.getAction() == KeyEvent.ACTION_DOWN) {
Expand Down Expand Up @@ -2092,7 +2092,7 @@ public boolean deleteSurroundingText(int beforeLength, int afterLength) {
while (beforeLength-- > 0) {
boolean ret_key = sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL))
&& sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL));
ret = ret && ret_key;
ret = ret && ret_key;
}
return ret;
}
Expand All @@ -2111,7 +2111,7 @@ interface SDLClipboardHandler {


class SDLClipboardHandler_API11 implements
SDLClipboardHandler,
SDLClipboardHandler,
android.content.ClipboardManager.OnPrimaryClipChangedListener {

protected android.content.ClipboardManager mClipMgr;
Expand Down Expand Up @@ -2142,7 +2142,7 @@ public void clipboardSetText(String string) {
mClipMgr.setText(string);
mClipMgr.addPrimaryClipChangedListener(this);
}

@Override
public void onPrimaryClipChanged() {
SDLActivity.onNativeClipboardChanged();
Expand Down

0 comments on commit a867541

Please sign in to comment.