From a86754167c5f67d1454819612c97936a4a6bcd21 Mon Sep 17 00:00:00 2001 From: Sylvain Becker Date: Wed, 16 Jan 2019 09:12:31 +0100 Subject: [PATCH] Android: remove trailing spaces --- .../main/java/org/libsdl/app/SDLActivity.java | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) 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 4ac9fb1e305a9..21a79f6853198 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 @@ -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 { @@ -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; @@ -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; @@ -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) { @@ -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. // @@ -760,7 +760,7 @@ 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) { @@ -768,11 +768,11 @@ public static void setOrientation(int w, int h, boolean resizable, String hint) 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; @@ -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; @@ -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 @@ -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. @@ -965,7 +965,7 @@ public static boolean getManifestEnvironmentVariables() { } } /* environment variables set! */ - return true; + return true; } catch (Exception e) { Log.v("SDL", "exception " + e.toString()); } @@ -973,7 +973,7 @@ public static boolean getManifestEnvironmentVariables() { } // This method is called by SDLControllerManager's API 26 Generic Motion Handler. - public static View getContentView() + public static View getContentView() { return mSingleton.mLayout; } @@ -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; @@ -1370,7 +1370,7 @@ public void onSystemUiVisibilityChange(int visibility) { } } - } + } /** * This method is called by SDL using JNI. @@ -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: @@ -1904,7 +1904,7 @@ public void onSensorChanged(SensorEvent event) { y / SensorManager.GRAVITY_EARTH, event.values[2] / SensorManager.GRAVITY_EARTH); - + } } @@ -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) { @@ -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; } @@ -2111,7 +2111,7 @@ interface SDLClipboardHandler { class SDLClipboardHandler_API11 implements - SDLClipboardHandler, + SDLClipboardHandler, android.content.ClipboardManager.OnPrimaryClipChangedListener { protected android.content.ClipboardManager mClipMgr; @@ -2142,7 +2142,7 @@ public void clipboardSetText(String string) { mClipMgr.setText(string); mClipMgr.addPrimaryClipChangedListener(this); } - + @Override public void onPrimaryClipChanged() { SDLActivity.onNativeClipboardChanged();