6.7.0 - Alpha4 - Fine tuning

This commit is contained in:
SuperMonster003
2025-09-09 17:26:54 +08:00
parent 9991ec3c28
commit c2aab17618
13 changed files with 111 additions and 112 deletions

View File

@@ -206,9 +206,9 @@ class UiSelector : UiGlobalSelector {
public override fun idStartsWith(prefix: String): UiGlobalSelector {
if (!prefix.contains(":")) {
addFilter(object : Filter {
override fun filter(nodeInfo: UiObject): Boolean {
override fun filter(node: UiObject): Boolean {
val fullIdPrefix = mAccessibilityBridge.getInfoProvider().latestPackage + ":id/" + prefix
val id = nodeInfo.getViewIdResourceName()
val id = node.getViewIdResourceName()
return id != null && id.startsWith(fullIdPrefix)
}

View File

@@ -16,28 +16,28 @@ interface Able {
val ABLE_MAP = SparseArrayEntries<Able>()
.entry(AccessibilityNodeInfo.ACTION_CLICK, object : Able {
override fun isAble(nodeInfo: UiObject): Boolean {
return nodeInfo.isClickable
override fun isAble(node: UiObject): Boolean {
return node.isClickable
}
})
.entry(AccessibilityNodeInfo.ACTION_LONG_CLICK, object : Able {
override fun isAble(nodeInfo: UiObject): Boolean {
return nodeInfo.isLongClickable
override fun isAble(node: UiObject): Boolean {
return node.isLongClickable
}
})
.entry(AccessibilityNodeInfo.ACTION_FOCUS, object : Able {
override fun isAble(nodeInfo: UiObject): Boolean {
return nodeInfo.isFocusable
override fun isAble(node: UiObject): Boolean {
return node.isFocusable
}
})
.entry(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD, object : Able {
override fun isAble(nodeInfo: UiObject): Boolean {
return nodeInfo.isScrollable
override fun isAble(node: UiObject): Boolean {
return node.isScrollable
}
})
.entry(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD, object : Able {
override fun isAble(nodeInfo: UiObject): Boolean {
return nodeInfo.isScrollable
override fun isAble(node: UiObject): Boolean {
return node.isScrollable
}
})
.sparseArray()

View File

@@ -400,7 +400,7 @@ class Shell(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRuntim
data class CommandArgumentsData(val arguments: String = "", val withRoot: Boolean = false, val withExit: Boolean = false)
data class CommandData(val command: String, @IntRange(0, 1) val withRoot: Int = 0)
data class CommandData(val command: String, val withRoot: Int = 0)
}

View File

@@ -47,7 +47,7 @@ open class ResizableExpandableFloatyWindow(private var floaty: ResizableExpandab
val windowView = View.inflate(service, R.layout.ef_expandable_floaty_container, null).apply {
isFocusableInTouchMode = true
}
mViewSwitcher = windowView.findViewById<ViewSwitcher?>(R.id.container).also { switcher ->
mViewSwitcher = windowView.findViewById<ViewSwitcher>(R.id.container).also { switcher ->
switcher.measureAllChildren = false
ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT).let { params ->
switcher.addView(mCollapsedView, params)

View File

@@ -7,7 +7,6 @@ import android.view.Menu
import android.view.MenuItem
import android.widget.Toast
import androidx.annotation.StringRes
import androidx.core.content.ContextCompat
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.LinearLayoutManager
@@ -38,9 +37,7 @@ class ManageKeyStoreActivity : BaseActivity() {
companion object {
fun startActivity(context: Context) {
Intent(context, ManageKeyStoreActivity::class.java).apply {}.also {
ContextCompat.startActivity(context, it, null)
}
context.startActivity(Intent(context, ManageKeyStoreActivity::class.java))
}
}

View File

@@ -88,7 +88,7 @@ class VersionHistoryRepository {
private val regexValidMarkdownVersion = Regex("""^#\s+v[\d.]+\S*""")
enum class Category(@StringRes val labelRes: Int, val priority: Int) {
enum class Category(val labelRes: Int, val priority: Int) {
HINT(R.string.changelog_label_hint, -2),
FEATURE(R.string.changelog_label_feature, 3),
FIX(R.string.changelog_label_fix, 2),

View File

@@ -32,7 +32,7 @@ class RoundCheckboxWithText : LinearLayout {
mCheckbox = findViewById<CheckBox>(R.id.checkbox).also { it.isChecked = isChecked }
mTextView = findViewById<TextView>(R.id.text).also { it.text = text }
mWrapper = findViewById<LinearLayout?>(R.id.wrapper).also {
mWrapper = findViewById<LinearLayout>(R.id.wrapper).also {
it.setOnClickListener { if (isEnabled) mCheckbox.toggle() }
}
}