6.6.1 - Alpha2 - 修复 README.md 中 CHANGELOG.md 链接指向错误
This commit is contained in:
@@ -14,6 +14,7 @@ import org.autojs.autojs.core.accessibility.AccessibilityService
|
||||
import org.autojs.autojs.core.accessibility.LayoutInspector
|
||||
import org.autojs.autojs.core.activity.ActivityInfoProvider
|
||||
import org.autojs.autojs.core.console.GlobalConsole
|
||||
import org.autojs.autojs.core.pref.Pref.registerOnSharedPreferenceChangeListener
|
||||
import org.autojs.autojs.core.record.accessibility.AccessibilityActionRecorder
|
||||
import org.autojs.autojs.engine.LoopBasedJavaScriptEngine
|
||||
import org.autojs.autojs.engine.RootAutomatorEngine
|
||||
@@ -21,12 +22,12 @@ import org.autojs.autojs.engine.ScriptEngineManager
|
||||
import org.autojs.autojs.engine.ScriptEngineService
|
||||
import org.autojs.autojs.engine.ScriptEngineServiceBuilder
|
||||
import org.autojs.autojs.inrt.autojs.LoopBasedJavaScriptEngineWithDecryption
|
||||
import org.autojs.autojs.core.pref.Pref.registerOnSharedPreferenceChangeListener
|
||||
import org.autojs.autojs.rhino.InterruptibleAndroidContextFactory
|
||||
import org.autojs.autojs.runtime.ScriptRuntime
|
||||
import org.autojs.autojs.runtime.api.AppUtils
|
||||
import org.autojs.autojs.runtime.api.ScreenMetrics
|
||||
import org.autojs.autojs.runtime.api.Shell
|
||||
import org.autojs.autojs.runtime.api.WrappedShizuku
|
||||
import org.autojs.autojs.script.AutoFileSource
|
||||
import org.autojs.autojs.script.JavaScriptSource
|
||||
import org.autojs.autojs.tool.UiHandler
|
||||
@@ -80,6 +81,7 @@ abstract class AbstractAutoJs protected constructor(val application: Application
|
||||
init {
|
||||
addAccessibilityServiceDelegates()
|
||||
registerActivityLifecycleCallbacks()
|
||||
WrappedShizuku.onCreate()
|
||||
}
|
||||
|
||||
private fun initContextFactory() {
|
||||
|
||||
@@ -73,7 +73,6 @@ class App : MultiDexApplication() {
|
||||
Toaster.init(this)
|
||||
|
||||
setUpDefaultNightMode()
|
||||
WrappedShizuku.onCreate()
|
||||
}
|
||||
|
||||
override fun attachBaseContext(base: Context) {
|
||||
|
||||
@@ -417,14 +417,20 @@ public class Images {
|
||||
mPreCaptureImage.recycleInternal();
|
||||
mPreCaptureImage = null;
|
||||
}
|
||||
releaseScreenCaptureRequester();
|
||||
}
|
||||
}
|
||||
|
||||
public void stopScreenCapturerForegroundService() {
|
||||
var applicationContext = AutoJs.getInstance().getApplication().getApplicationContext();
|
||||
applicationContext.stopService(new Intent(applicationContext, ScreenCapturerForegroundService.class));
|
||||
releaseScreenCaptureRequester();
|
||||
}
|
||||
|
||||
private void releaseScreenCaptureRequester() {
|
||||
if (mScreenCaptureRequester != null) {
|
||||
mScreenCaptureRequester.unbindService();
|
||||
mScreenCaptureRequester = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,10 @@ object WrappedShizuku {
|
||||
|
||||
private val TAG: String = WrappedShizuku::class.java.simpleName
|
||||
|
||||
private val mRequestCode = "shizuku-request-code".hashCode()
|
||||
private val mRequestCode = when {
|
||||
BuildConfig.isInrt -> "shizuku-request-code-inrt".hashCode()
|
||||
else -> "shizuku-request-code".hashCode()
|
||||
}
|
||||
private var mHasBinder = false
|
||||
|
||||
private val mUserServiceConnection: ServiceConnection = object : ServiceConnection {
|
||||
|
||||
@@ -29,7 +29,7 @@ class ToastParser(private val msg: Any?, long: Any? = null, forcible: Any? = nul
|
||||
val niceMsg = when {
|
||||
Undefined.isUndefined(msg) || msg == NOT_FOUND -> "undefined"
|
||||
msg == null -> "null"
|
||||
else -> coerceString(msg, msg.toString())
|
||||
else -> Context.toString(msg)
|
||||
}
|
||||
AutoJs.instance.uiHandler.toast(scriptRuntime, niceMsg, isLong)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user