6.7.0 - Alpha19 - Fine tuning

This commit is contained in:
SuperMonster003
2026-02-12 21:06:47 +08:00
parent 8b0c4b3eea
commit 994688bf42
12 changed files with 98 additions and 48 deletions

View File

@@ -1,15 +1,15 @@
{ {
"android_studio_latest_recommended_version_name": "Android Studio Otter 3 Feature Drop | 2025.2.3", "android_studio_latest_recommended_version_name": "Android Studio Panda 1 | 2025.3.1",
"var_date_android_studio_latest_recommended_version_name": "2026/01/15", "var_date_android_studio_latest_recommended_version_name": "2026/02/10",
"android_studio_latest_recommended_file_name_of_exe": "android-studio-2025.2.3.9-windows.exe", "android_studio_latest_recommended_file_name_of_exe": "android-studio-panda1-windows.exe",
"android_studio_latest_recommended_download_address_of_exe": "https://edgedl.me.gvt1.com/android/studio/install/2025.2.3.9/android-studio-2025.2.3.9-windows.exe", "android_studio_latest_recommended_download_address_of_exe": "https://edgedl.me.gvt1.com/android/studio/install/2025.3.1.7/android-studio-panda1-windows.exe",
"android_studio_latest_recommended_file_size_of_exe": "1.35 GiB", "android_studio_latest_recommended_file_size_of_exe": "1.28 GiB",
"android_studio_latest_recommended_file_name_of_zip": "android-studio-2025.2.3.9-windows.zip", "android_studio_latest_recommended_file_name_of_zip": "android-studio-panda1-windows.zip",
"android_studio_latest_recommended_download_address_of_zip": "https://edgedl.me.gvt1.com/android/studio/ide-zips/2025.2.3.9/android-studio-2025.2.3.9-windows.zip", "android_studio_latest_recommended_download_address_of_zip": "https://edgedl.me.gvt1.com/android/studio/ide-zips/2025.3.1.7/android-studio-panda1-windows.zip",
"android_studio_latest_recommended_file_size_of_zip": "1.36 GiB", "android_studio_latest_recommended_file_size_of_zip": "1.29 GiB",
"android_studio_latest_recommended_file_name_of_tar": "android-studio-2025.2.3.9-linux.tar.gz", "android_studio_latest_recommended_file_name_of_tar": "android-studio-panda1-linux.tar.gz",
"android_studio_latest_recommended_download_address_of_tar": "https://edgedl.me.gvt1.com/android/studio/ide-zips/2025.2.3.9/android-studio-2025.2.3.9-linux.tar.gz", "android_studio_latest_recommended_download_address_of_tar": "https://edgedl.me.gvt1.com/android/studio/ide-zips/2025.3.1.7/android-studio-panda1-linux.tar.gz",
"android_studio_latest_recommended_file_size_of_tar": "1.39 GiB", "android_studio_latest_recommended_file_size_of_tar": "1.32 GiB",
"var_date_contribution_table_data_updated": "2026/01/17", "var_date_contribution_table_data_updated": "2026/01/17",
"latest_rhino_engine_name_with_github_lineno_address": "[v2.0.0-SNAPSHOT](http://rhino.autojs6.com/blob/master/gradle.properties#L3)", "latest_rhino_engine_name_with_github_lineno_address": "[v2.0.0-SNAPSHOT](http://rhino.autojs6.com/blob/master/gradle.properties#L3)",
"var_date_rhino_engine_latest_committed": "2025/12/25", "var_date_rhino_engine_latest_committed": "2025/12/25",

View File

@@ -6,14 +6,15 @@ import android.net.Uri
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import org.autojs.autojs.util.DialogUtils
import org.autojs.autojs.model.explorer.ExplorerDirPage import org.autojs.autojs.model.explorer.ExplorerDirPage
import org.autojs.autojs.model.explorer.Explorers import org.autojs.autojs.model.explorer.Explorers
import org.autojs.autojs.model.script.ScriptFile import org.autojs.autojs.model.script.ScriptFile
import org.autojs.autojs.model.script.Scripts import org.autojs.autojs.model.script.Scripts
import org.autojs.autojs.pio.PFiles import org.autojs.autojs.pio.PFiles
import org.autojs.autojs.storage.file.TmpScriptFiles
import org.autojs.autojs.ui.common.NotAskAgainDialog import org.autojs.autojs.ui.common.NotAskAgainDialog
import org.autojs.autojs.ui.edit.EditActivity import org.autojs.autojs.ui.edit.EditActivity
import org.autojs.autojs.util.DialogUtils
import org.autojs.autojs.util.DialogUtils.choiceWidgetThemeColor import org.autojs.autojs.util.DialogUtils.choiceWidgetThemeColor
import org.autojs.autojs.util.DialogUtils.widgetThemeColor import org.autojs.autojs.util.DialogUtils.widgetThemeColor
import org.autojs.autojs.util.StringUtils import org.autojs.autojs.util.StringUtils
@@ -225,7 +226,6 @@ class VersionHistoryController(private val context: Context) {
Schedulers.io().scheduleDirect { Schedulers.io().scheduleDirect {
runCatching { runCatching {
val bytes = HistoryRepository(appCtx).readRevisionBytes(rev) val bytes = HistoryRepository(appCtx).readRevisionBytes(rev)
val restored = decodeRevisionBytes(bytes, rev.encoding, rev.hadBom)
val fmt = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()) val fmt = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault())
val timeText = fmt.format(Date(rev.createdAt)) val timeText = fmt.format(Date(rev.createdAt))
@@ -234,6 +234,25 @@ class VersionHistoryController(private val context: Context) {
AndroidSchedulers.mainThread().scheduleDirect { AndroidSchedulers.mainThread().scheduleDirect {
val newTask = context !is Activity val newTask = context !is Activity
// Avoid putting large content into Intent extras to prevent FAILED BINDER TRANSACTION.
// zh-CN: 避免将大文本放入 Intent extras, 防止 FAILED BINDER TRANSACTION.
if (bytes.size >= PREVIEW_INTENT_MAX_BYTES) {
val tmp = runCatching {
TmpScriptFiles.create(appCtx).also { f ->
f.outputStream().use { it.write(bytes) }
}
}.getOrElse {
it.printStackTrace()
ViewUtils.showToast(context, it.message, true)
return@scheduleDirect
}
EditActivity.viewPath(context, name, tmp.absolutePath, newTask)
return@scheduleDirect
}
val restored = decodeRevisionBytes(bytes, rev.encoding, rev.hadBom)
EditActivity.viewContent(context, name, restored, newTask) EditActivity.viewContent(context, name, restored, newTask)
} }
}.onFailure { }.onFailure {
@@ -455,5 +474,9 @@ class VersionHistoryController(private val context: Context) {
private val DEFAULT_CHARSET: Charset = StandardCharsets.UTF_8 private val DEFAULT_CHARSET: Charset = StandardCharsets.UTF_8
private const val HISTORY_DIALOG_MAX_ITEMS: Int = 20 private const val HISTORY_DIALOG_MAX_ITEMS: Int = 20
private const val INTERNAL_STORAGE_ROOT: String = "/storage/emulated/0" private const val INTERNAL_STORAGE_ROOT: String = "/storage/emulated/0"
// Keep Intent extras payload under a conservative threshold.
// zh-CN: 将 Intent extras 的载荷控制在一个保守阈值以内.
private const val PREVIEW_INTENT_MAX_BYTES: Int = 64 * 1024
} }
} }

View File

@@ -495,6 +495,22 @@ open class EditActivity : BaseActivity(), DelegateHost, PermissionRequestProxyAc
else -> false else -> false
} }
@JvmStatic
fun viewPath(context: Context, name: String?, path: String?, newTask: Boolean) =
when {
newIntent(context).apply {
putExtra(EditorView.EXTRA_PATH, path)
putExtra(EditorView.EXTRA_NAME, name)
putExtra(EditorView.EXTRA_READ_ONLY, true)
}.startSafely(context) -> true
newIntentFallback(context, newTask).apply {
putExtra(EditorView.EXTRA_PATH, path)
putExtra(EditorView.EXTRA_NAME, name)
putExtra(EditorView.EXTRA_READ_ONLY, true)
}.startSafely(context) -> true
else -> false
}
private fun newIntent(context: Context): Intent { private fun newIntent(context: Context): Intent {
// @Caution by SuperMonster003 on Sep 11, 2022. // @Caution by SuperMonster003 on Sep 11, 2022.
// ! FLAG_ACTIVITY_NEW_TASK makes screen flash when Activity started. // ! FLAG_ACTIVITY_NEW_TASK makes screen flash when Activity started.

View File

@@ -146,7 +146,7 @@ class CodeEditText : AppCompatEditText {
applyFixedGutterPaddingForLoading() applyFixedGutterPaddingForLoading()
} else { } else {
// Recompute gutter once after loading. // Recompute gutter once after loading.
// zh-CN: 加载结束后重新计算 gutter(仅一次). // zh-CN: 加载结束后重新计算 gutter (仅一次).
requestLayout() requestLayout()
invalidate() invalidate()
} }

View File

@@ -1,28 +1,32 @@
package org.autojs.autojs.ui.fragment; package org.autojs.autojs.ui.fragment
import android.os.Bundle; import android.os.Bundle
import android.view.LayoutInflater; import android.view.LayoutInflater
import android.view.View; import android.view.View
import android.view.ViewGroup; import android.view.ViewGroup
import androidx.annotation.NonNull; import androidx.fragment.app.Fragment
import androidx.annotation.Nullable; import androidx.viewbinding.ViewBinding
import androidx.fragment.app.Fragment;
public abstract class BaseViewBindingFragment<T extends androidx.viewbinding.ViewBinding> extends Fragment { abstract class BaseViewBindingFragment<T : ViewBinding?> : Fragment() {
protected T binding; @JvmField
protected var binding: T? = null
@Nullable override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
@Override val binding = createBinding(inflater, container).also {
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { this.binding = it
binding = createBinding(inflater, container); }
return getRootView(binding); return getRootView(binding)
} }
protected abstract T createBinding(@NonNull LayoutInflater inflater, @Nullable ViewGroup container); override fun onDestroyView() {
super.onDestroyView()
protected View getRootView(@NonNull T binding) { binding = null
return binding.getRoot();
} }
protected abstract fun createBinding(inflater: LayoutInflater, container: ViewGroup?): T
protected fun getRootView(binding: T): View {
return binding!!.root
}
} }

View File

@@ -357,7 +357,7 @@ class VersionHistoryActivity : BaseSearchSortListActivity<ActivityVersionHistory
DialogUtils.buildAndShowAdaptive { DialogUtils.buildAndShowAdaptive {
MaterialDialog.Builder(this) MaterialDialog.Builder(this)
.title(R.string.text_prompt) .title(R.string.text_prompt)
.content(getString(R.string.text_confirm_to_clear_the_history_of, entry.canonicalPath)) .content(getString(R.string.text_confirm_to_clear_the_history_of, entry.displayPath))
.negativeText(R.string.dialog_button_cancel) .negativeText(R.string.dialog_button_cancel)
.negativeColorRes(R.color.dialog_button_default) .negativeColorRes(R.color.dialog_button_default)
.positiveText(R.string.dialog_button_confirm) .positiveText(R.string.dialog_button_confirm)

View File

@@ -1,5 +1,6 @@
package org.autojs.autojs.ui.storage package org.autojs.autojs.ui.storage
import android.text.TextUtils.TruncateAt
import android.util.TypedValue import android.util.TypedValue
import android.view.Gravity import android.view.Gravity
import android.view.View import android.view.View
@@ -107,10 +108,16 @@ internal class VersionHistoryFileViewHolder(
val title = TextView(ctx).apply { val title = TextView(ctx).apply {
textSize = 16f textSize = 16f
setTextColor(context.getColor(R.color.day_night))
maxLines = 1
ellipsize = TruncateAt.MIDDLE
} }
val subtitle = TextView(ctx).apply { val subtitle = TextView(ctx).apply {
textSize = 12f textSize = 12f
setTextColor(context.getColor(R.color.day_night_alpha_70))
maxLines = 3
ellipsize = TruncateAt.END
alpha = 0.75f alpha = 0.75f
} }

View File

@@ -103,8 +103,7 @@
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1">
android:paddingHorizontal="4dp">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler" android:id="@+id/recycler"

View File

@@ -20,7 +20,6 @@
android:scrollbarDefaultDelayBeforeFade="600" android:scrollbarDefaultDelayBeforeFade="600"
android:scrollbarFadeDuration="500" android:scrollbarFadeDuration="500"
android:scrollbars="vertical" /> android:scrollbars="vertical" />
</org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout> </org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout>
<TextView <TextView
@@ -36,5 +35,4 @@
android:visibility="gone" android:visibility="gone"
tools:visibility="visible" tools:visibility="visible"
tools:text="@string/text_retrieving_plugin_list_data" /> tools:text="@string/text_retrieving_plugin_list_data" />
</FrameLayout> </FrameLayout>

View File

@@ -18,7 +18,7 @@
android:padding="2dp" android:padding="2dp"
android:layout_gravity="start|center_vertical" android:layout_gravity="start|center_vertical"
tools:src="@drawable/ic_simple_file" tools:src="@drawable/ic_simple_file"
app:tint="?android:attr/textColorSecondary" /> app:tint="@color/day_night_alpha_60" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -30,19 +30,21 @@
android:id="@+id/title" android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1"
android:ellipsize="middle" android:ellipsize="middle"
tools:text="test-116_v1.0.5.apk" android:maxLines="1"
android:textSize="16sp" /> android:textColor="@color/day_night"
android:textSize="16sp"
tools:text="test-116_v1.0.5.apk" />
<TextView <TextView
android:id="@+id/subtitle" android:id="@+id/subtitle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="3" android:alpha="0.75"
android:ellipsize="end" android:ellipsize="end"
tools:text="2026-02-06 21:45:55 | 21.93 MiB\n/storage/emulated/0/Scripts/test-116_v1.0.5.apk" android:maxLines="3"
android:textColor="@color/day_night_alpha_70"
android:textSize="12sp" android:textSize="12sp"
android:alpha="0.75" /> tools:text="2026-02-06 21:45:55 | 21.93 MiB\n/storage/emulated/0/Scripts/test-116_v1.0.5.apk" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -1,4 +1,5 @@
#Fri Jan 16 15:48:25 GMT+8 2026 #Thu Feb 12 11:04:59 GMT+8 2026
2025.3.1=9.0
2025.2.3=9.0 2025.2.3=9.0
2025.2.2=8.13 2025.2.2=8.13
2025.2.1=8.13 2025.2.1=8.13

View File

@@ -1,5 +1,5 @@
#Thu Feb 12 19:57:00 CST 2026 #Thu Feb 12 21:05:03 CST 2026
BUILD_TIME=1770897420318 BUILD_TIME=1770901503083
COMPILE_SDK_VERSION=36 COMPILE_SDK_VERSION=36
IMAGE_QUANT_CMAKE_VERSION=3.22.1 IMAGE_QUANT_CMAKE_VERSION=3.22.1
IMAGE_QUANT_NDK_VERSION=26.1.10909125 IMAGE_QUANT_NDK_VERSION=26.1.10909125