6.7.0 - Alpha4 - Fine tuning
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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() }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user