Squelch excessive kivy/jnius logging on Android. Live toggle debug logging for RNS and Sideband.

This commit is contained in:
Mark Qvist 2023-10-26 13:21:49 +02:00
parent f531b2ecaa
commit d87a58a51b
3 changed files with 78 additions and 24 deletions

View file

@ -13,6 +13,20 @@ else:
if RNS.vendor.platformutils.get_platform() == "android":
from jnius import autoclass, cast
# Squelch excessive method signature logging
import jnius.reflect
class redirect_log():
def isEnabledFor(self, arg):
return False
def debug(self, arg):
pass
def mod(method, name, signature):
pass
jnius.reflect.log_method = mod
jnius.reflect.log = redirect_log()
############################################
from android import python_act
android_api_version = autoclass('android.os.Build$VERSION').SDK_INT