4.1.0 Alpha3
This commit is contained in:
@@ -5,10 +5,13 @@ import android.app.Activity;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import android.util.AttributeSet;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
@@ -19,6 +22,7 @@ import android.webkit.WebViewClient;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.stardust.app.OnActivityResultDelegate;
|
||||
|
||||
import org.autojs.autojs.R;
|
||||
@@ -205,8 +209,13 @@ public class EWebView extends FrameLayout implements SwipeRefreshLayout.OnRefres
|
||||
if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("file://")) {
|
||||
view.loadUrl(url);
|
||||
} else {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
List<ResolveInfo> intentActivities = getContext().getPackageManager().queryIntentActivities(intent, 0);
|
||||
if (intentActivities.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
|
||||
getContext().startActivity(Intent.createChooser(intent, getResources().getString(R.string.text_open_with)));
|
||||
} catch (ActivityNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
|
||||
BIN
app/src/main/res/drawable-xhdpi/ic_build_apk.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_build_apk.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
@@ -43,7 +43,7 @@
|
||||
android:layout_marginRight="2dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="6dp"
|
||||
android:src="@drawable/ic_build_black_48dp"
|
||||
android:src="@drawable/ic_build_apk"
|
||||
android:tint="#606366"/>
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -433,6 +433,7 @@
|
||||
<string name="description_usage_stats_permission">通过\"查看使用统计\"权限可以获取本设备过去使用应用的情况,从而使获取当前应用(currentPackage)时更准确。</string>
|
||||
<string name="text_gesture_observing">手势监听</string>
|
||||
<string name="summary_gesture_observing">开启后将支持events手势事件,但Auto.js崩溃时可能会导致屏幕失灵</string>
|
||||
<string name="text_open_with">打开方式</string>
|
||||
<plurals name="air_error_short_description" key="air_error_short_description">
|
||||
<item quantity="one">描述至少要 %d 个字.</item>
|
||||
<item quantity="other">描述至少要 %d 个字.</item>
|
||||
|
||||
@@ -62,11 +62,16 @@ module.exports = function (runtime, global) {
|
||||
throw new Error("class " + i + " not found");
|
||||
}
|
||||
}
|
||||
if(i instanceof android.content.Intent){
|
||||
context.startActivity(i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
||||
return;
|
||||
}
|
||||
if(i && i.root) {
|
||||
shell("am start " + app.intentToShell(i), true);
|
||||
}else{
|
||||
context.startActivity(app.intent(i).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
app.sendBroadcast = function (i) {
|
||||
|
||||
@@ -10,12 +10,12 @@ module.exports = function (__runtime__, scope) {
|
||||
|
||||
global.Promise.prototype.wait = function () {
|
||||
var disposable = threads.disposable();
|
||||
promise.then(result => {
|
||||
this.then(result => {
|
||||
disposable.setAndNotify({ result: result });
|
||||
}).catch(error => {
|
||||
cont.resumeError({ error: error });
|
||||
disposable.setAndNotify({ error: error });
|
||||
});
|
||||
var r = cont.blockedGet();
|
||||
var r = disposable.blockedGet();
|
||||
if (r.error) {
|
||||
throw r.error;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ScreenCapturer {
|
||||
private Handler mHandler;
|
||||
private Intent mData;
|
||||
private Context mContext;
|
||||
private int mOrientation = Configuration.ORIENTATION_UNDEFINED;
|
||||
private int mOrientation = -1;
|
||||
private int mDetectedOrientation;
|
||||
private OrientationEventListener mOrientationEventListener;
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ package com.stardust.autojs.engine
|
||||
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
|
||||
import com.stardust.autojs.BuildConfig
|
||||
import com.stardust.autojs.core.ui.ViewExtras
|
||||
import com.stardust.autojs.engine.module.AssetAndUrlModuleSourceProvider
|
||||
import com.stardust.autojs.execution.ExecutionConfig
|
||||
@@ -14,20 +12,18 @@ import com.stardust.autojs.runtime.ScriptRuntime
|
||||
import com.stardust.autojs.script.JavaScriptSource
|
||||
import com.stardust.automator.UiObjectCollection
|
||||
import com.stardust.pio.UncheckedIOException
|
||||
|
||||
import org.mozilla.javascript.Context
|
||||
import org.mozilla.javascript.Script
|
||||
import org.mozilla.javascript.Scriptable
|
||||
import org.mozilla.javascript.ScriptableObject
|
||||
import org.mozilla.javascript.commonjs.module.RequireBuilder
|
||||
import org.mozilla.javascript.commonjs.module.provider.SoftCachingModuleScriptProvider
|
||||
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.io.InputStreamReader
|
||||
import java.io.Reader
|
||||
import java.net.URI
|
||||
import java.util.Locale
|
||||
import java.util.*
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
android:accessibilityEventTypes="typeAllMask"
|
||||
android:accessibilityFeedbackType="feedbackAllMask"
|
||||
android:accessibilityFlags="flagIncludeNotImportantViews|flagReportViewIds|flagRetrieveInteractiveWindows|flagRequestEnhancedWebAccessibility|flagRequestFilterKeyEvents"
|
||||
android:canPerformGestures="true"
|
||||
android:canRequestEnhancedWebAccessibility="true"
|
||||
android:canRequestFilterKeyEvents="true"
|
||||
android:canRetrieveWindowContent="true"
|
||||
|
||||
@@ -95,6 +95,7 @@ open class AccessibilityService : android.accessibilityservice.AccessibilityServ
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
Log.v(TAG, "onDestroy: $instance")
|
||||
instance = null
|
||||
mEventExecutor?.shutdownNow()
|
||||
super.onDestroy()
|
||||
|
||||
@@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":452,"versionName":"4.1.0 Alpha2","enabled":true,"outputFile":"commonRelease-4.1.0 Alpha2.apk","fullName":"commonRelease","baseName":"common-release"},"path":"commonRelease-4.1.0 Alpha2.apk","properties":{}}]
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":453,"versionName":"4.1.0 Alpha3","enabled":true,"outputFile":"commonRelease-4.1.0 Alpha3.apk","fullName":"commonRelease","baseName":"common-release"},"path":"commonRelease-4.1.0 Alpha3.apk","properties":{}}]
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"appVersionCode": 452,
|
||||
"appVersionName": "4.1.0 Alpha2",
|
||||
"appVersionCode": 453,
|
||||
"appVersionName": "4.1.0 Alpha3",
|
||||
"target": 28,
|
||||
"mini": 17,
|
||||
"compile": 28,
|
||||
|
||||
Reference in New Issue
Block a user