Skip to content

Commit

Permalink
Merge branch 'develop' into sticky
Browse files Browse the repository at this point in the history
  • Loading branch information
mzakharo committed Jan 13, 2021
2 parents df54ad8 + 9e5810d commit 834f498
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 21 deletions.
2 changes: 1 addition & 1 deletion doc/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ On macOS::

brew install autoconf automake libtool openssl pkg-config
brew tap homebrew/cask-versions
brew cask install homebrew/cask-versions/adoptopenjdk8
brew install --cask homebrew/cask-versions/adoptopenjdk8

Installing Android SDK
~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import android.os.Bundle;
import android.os.PowerManager;
import android.util.Log;
import android.view.inputmethod.InputMethodManager;
import android.view.SurfaceView;
import android.view.ViewGroup;
import android.view.View;
Expand Down Expand Up @@ -632,4 +633,12 @@ public void requestPermissionsWithRequestCode(String[] permissions, int requestC
public void requestPermissions(String[] permissions) {
requestPermissionsWithRequestCode(permissions, 1);
}

public static void changeKeyboard(int inputType) {
if (SDLActivity.keyboardInputType != inputType){
SDLActivity.keyboardInputType = inputType;
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.restartInput(mTextEdit);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
--- a/src/main/java/org/libsdl/app/SDLActivity.java
+++ b/src/main/java/org/libsdl/app/SDLActivity.java
@@ -196,6 +196,15 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
@@ -94,6 +94,8 @@
// This is what SDL runs in. It invokes SDL_main(), eventually
protected static Thread mSDLThread;

+ public static int keyboardInputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
+
protected static SDLGenericMotionListener_API12 getMotionListener() {
if (mMotionListener == null) {
if (Build.VERSION.SDK_INT >= 26) {
@@ -196,6 +198,15 @@
Log.v(TAG, "onCreate()");
super.onCreate(savedInstanceState);

+ SDLActivity.initialize();
+ // So we can call stuff from static callbacks
+ mSingleton = this;
Expand All @@ -16,19 +25,19 @@
// Load shared libraries
String errorMsgBrokenLib = "";
try {
@@ -639,7 +648,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
@@ -639,7 +650,7 @@
Handler commandHandler = new SDLCommandHandler();

// Send a message from the SDLMain thread
- boolean sendCommand(int command, Object data) {
+ protected boolean sendCommand(int command, Object data) {
Message msg = commandHandler.obtainMessage();
msg.arg1 = command;
msg.obj = data;
@@ -1051,6 +1061,21 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
@@ -1051,6 +1062,21 @@
return Arrays.copyOf(filtered, used);
}

+ /**
+ * Calls turnActive() on singleton to keep loading screen active
+ */
Expand All @@ -45,11 +54,11 @@
+
+
// APK expansion files support

/** com.android.vending.expansion.zipfile.ZipResourceFile object or null. */
@@ -1341,14 +1366,13 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
@@ -1341,14 +1367,13 @@
};

public void onSystemUiVisibilityChange(int visibility) {
- if (SDLActivity.mFullscreenModeActive && (visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0 || (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
-
Expand All @@ -62,13 +71,21 @@
}
-
}
}
@@ -1475,6 +1499,7 @@ class SDLMain implements Runnable {
}

@@ -1475,6 +1500,7 @@
String[] arguments = SDLActivity.mSingleton.getArguments();

Log.v("SDL", "Running main function " + function + " from library " + library);
+ SDLActivity.mSingleton.appConfirmedActive();
SDLActivity.nativeRunMain(library, function, arguments);

Log.v("SDL", "Finished main function");
@@ -2002,7 +2028,7 @@
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
ic = new SDLInputConnection(this, true);

- outAttrs.inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
+ outAttrs.inputType = SDLActivity.keyboardInputType;
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI
| EditorInfo.IME_FLAG_NO_FULLSCREEN /* API 11 */;
7 changes: 4 additions & 3 deletions pythonforandroid/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,18 @@ def printtail(out, name, forecolor, tail_n=0,
re.compile(filter_in) if filter_in else None,
re.compile(filter_out) if filter_out else None)
printtail(err.stderr.decode('utf-8'), 'STDERR', Err_Fore.RED)
if is_critical:
env = kwargs.get("env")
if is_critical or full_debug:
env = kwargs.get("_env")
if env is not None:
info("{}ENV:{}\n{}\n".format(
Err_Fore.YELLOW, Err_Fore.RESET, "\n".join(
"set {}={}".format(n, v) for n, v in env.items())))
"export {}='{}'".format(n, v) for n, v in env.items())))
info("{}COMMAND:{}\ncd {} && {} {}\n".format(
Err_Fore.YELLOW, Err_Fore.RESET, os.getcwd(), command,
' '.join(args)))
warning("{}ERROR: {} failed!{}".format(
Err_Fore.RED, command, Err_Fore.RESET))
if is_critical:
exit(1)
else:
raise
Expand Down
6 changes: 3 additions & 3 deletions pythonforandroid/recipes/pyzmq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

class PyZMQRecipe(CythonRecipe):
name = 'pyzmq'
version = 'master'
url = 'https://github.com/zeromq/pyzmq/archive/{version}.zip'
version = '20.0.0'
url = 'https://github.com/zeromq/pyzmq/archive/v{version}.zip'
site_packages_name = 'zmq'
depends = ['libzmq']
depends = ['setuptools', 'libzmq']
cython_args = ['-Izmq/utils',
'-Izmq/backend/cython',
'-Izmq/devices']
Expand Down

0 comments on commit 834f498

Please sign in to comment.