提交 5a56ceee 编写于 作者: 囧jt's avatar 囧jt

modify:

[Android]: auto-service bug fixed
上级 8071f0ce
......@@ -60,7 +60,7 @@ dependencies {
implementation "com.android.tools.build:gradle:$gradlePluginVersion"
/* 👇👇👇👇 引用这两个模块 👇👇👇👇 */
// kapt "com.google.auto.service:auto-service:1.0-rc7"
kapt "com.google.auto.service:auto-service:1.0"
api "com.didiglobal.booster:booster-api:${rootProject.ext.android["booster_version"]}"
api "com.didiglobal.booster:booster-transform-asm:${rootProject.ext.android["booster_version"]}"
}
\ No newline at end of file
......@@ -30,7 +30,7 @@ ext {
kotlinx_coroutines_version : "1.4.3",
booster_version : "3.3.1",
jcenter_gradle_plugin_version: "3.5.3",
gradle_plugin_version : "4.2.1",
gradle_plugin_version : "4.2.2",
ktor : "1.5.4",
okhttp_v2 : "2.7.5",
okhttp_v3 : "3.14.7",
......
......@@ -80,7 +80,7 @@ class DokitMcInterceptor : AbsDoKitInterceptor() {
strResponseBody
)
val resulit = McHttpManager.uploadHttpInfo(httInfo)
val resulit = McHttpManager.uploadHttpInfo<Any>(httInfo)
}
......
......@@ -6,6 +6,7 @@ import com.android.volley.toolbox.StringRequest
import com.android.volley.toolbox.Volley
import com.didichuxing.doraemonkit.constant.DoKitConstant
import com.didichuxing.doraemonkit.kit.mc.all.ui.McCaseInfoDialogProvider
import com.didichuxing.doraemonkit.kit.mc.all.ui.McResInfo
import com.didichuxing.doraemonkit.util.GsonUtils
import com.didichuxing.doraemonkit.util.ToastUtils
import com.didichuxing.doraemonkit.volley.VolleyManager
......@@ -27,7 +28,9 @@ import kotlin.coroutines.suspendCoroutine
* ================================================
*/
object McHttpManager {
const val RESPONSE_OK = 200
const val host = "http://dokit-test.intra.xiaojukeji.com"
val mHttpInfoMap: MutableMap<String, HttpInfo> by lazy {
mutableMapOf<String, HttpInfo>()
......@@ -52,14 +55,14 @@ object McHttpManager {
@Throws(Exception::class)
suspend fun mcConfig() = suspendCoroutine<JSONObject> {
suspend fun <T> getMcConfig(): McResInfo<T> = suspendCoroutine {
val jsonObject = JSONObject()
jsonObject.put("pId", DoKitConstant.PRODUCT_ID)
val request = JsonObjectRequest(
"",
"$host/app/multiControl/getConfig",
jsonObject,
{ response ->
it.resume(response)
it.resume(convert2McResInfo(response))
}, { error ->
it.resumeWithException(error)
})
......@@ -68,12 +71,12 @@ object McHttpManager {
@Throws(Exception::class)
suspend fun mockStart() = suspendCoroutine<JSONObject> {
suspend fun <T> mockStart(): McResInfo<T> = suspendCoroutine {
val request = JsonObjectRequest(
"",
"$host/app/multiControl/startRecord",
JSONObject(GsonUtils.toJson(AppInfo())),
{ response ->
it.resume(response)
it.resume(convert2McResInfo(response))
}, { error ->
it.resumeWithException(error)
})
......@@ -82,13 +85,12 @@ object McHttpManager {
@Throws(Exception::class)
suspend fun uploadHttpInfo(httpInfo: HttpInfo) = suspendCoroutine<JSONObject> {
suspend fun <T> uploadHttpInfo(httpInfo: HttpInfo): McResInfo<T> = suspendCoroutine {
val request = JsonObjectRequest(
"",
"$host/app/multiControl/uploadApiInfo",
JSONObject(GsonUtils.toJson(httpInfo)),
{ response ->
it.resume(response)
it.resume(convert2McResInfo(response))
}, { error ->
it.resumeWithException(error)
})
......@@ -96,15 +98,13 @@ object McHttpManager {
}
@Throws(Exception::class)
suspend fun mockStop(caseInfo: McCaseInfoDialogProvider.CaseInfo) =
suspendCoroutine<JSONObject> {
suspend fun <T> mockStop(caseInfo: McCaseInfoDialogProvider.CaseInfo): McResInfo<T> =
suspendCoroutine {
val request = JsonObjectRequest(
"",
"$host/app/multiControl/endRecord",
JSONObject(GsonUtils.toJson(caseInfo)),
{ response ->
it.resume(response)
it.resume(convert2McResInfo(response))
}, { error ->
it.resumeWithException(error)
})
......@@ -113,12 +113,12 @@ object McHttpManager {
@Throws(Exception::class)
suspend fun mockCaseList() = suspendCoroutine<String> {
suspend fun <T> mockCaseList(): McResInfo<T> = suspendCoroutine {
val request = StringRequest(
Request.Method.GET,
"",
"$host/app/multiControl/caseList",
{ response ->
it.resume(response)
it.resume(convert2McResInfo(JSONObject(response)))
}, { error ->
it.resumeWithException(error)
})
......@@ -127,18 +127,23 @@ object McHttpManager {
@Throws(Exception::class)
suspend fun httpMatch(requestKey: String) = suspendCoroutine<JSONObject> {
suspend fun <T> httpMatch(requestKey: String): McResInfo<T> = suspendCoroutine {
val jsonObject = JSONObject()
jsonObject.put("key", requestKey)
jsonObject.put("caseId", "caseId")
val request = JsonObjectRequest(
"",
"$host/app/multiControl/getCaseApiInfo",
jsonObject,
{ response ->
it.resume(response)
it.resume(convert2McResInfo(response))
}, { error ->
it.resumeWithException(error)
})
VolleyManager.add(request)
}
private fun <T> convert2McResInfo(response: JSONObject): McResInfo<T> {
return GsonUtils.fromJson(response.toString(), McResInfo::class.java) as McResInfo<T>
}
}
\ No newline at end of file
......@@ -24,11 +24,12 @@ object McConstant {
const val MULTI_CONTROL_MODE_CLIENT = 200
/**
* 主机信息
*/
var HOST_INFO: HostInfo? = null
var MC_CASE_ID: String = ""
}
\ No newline at end of file
......@@ -18,15 +18,17 @@ import com.didichuxing.doraemonkit.widget.titlebar.HomeTitleBar
* ================================================
*/
class DoKitMcActivity : BaseActivity() {
lateinit var mTitlebar: HomeTitleBar
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.dk_activity_mc)
findViewById<HomeTitleBar>(R.id.title_bar).setListener {
mTitlebar = findViewById(R.id.title_bar)
mTitlebar.setListener {
finish()
}
changeFragment(DoKitConstant.WS_MODE)
changeFragment(WSMode.UNKNOW)
}
......@@ -34,15 +36,24 @@ class DoKitMcActivity : BaseActivity() {
val fragment: Fragment = when (wsMode) {
WSMode.RECORDING,
WSMode.UNKNOW -> {
mTitlebar.setTitle("一机多控(主页)")
DoKitMcMainFragment()
}
WSMode.HOST -> {
mTitlebar.setTitle("一机多控(主机)")
DoKitMcHostFragment()
}
WSMode.CLIENT -> {
mTitlebar.setTitle("一机多控(从机)")
DoKitMcClientFragment()
}
WSMode.MC_CASELIST -> {
mTitlebar.setTitle("一机多控(用例列表)")
DoKitMcDatasFragment()
}
else -> {
mTitlebar.setTitle("一机多控(主页)")
DoKitMcMainFragment()
}
}
......
package com.didichuxing.doraemonkit.kit.mc.all.ui
import android.Manifest
import android.app.Activity
import android.content.Intent
import android.content.pm.PackageManager
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import android.widget.Button
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.didichuxing.doraemonkit.constant.DoKitConstant
import com.didichuxing.doraemonkit.constant.WSMode
import com.didichuxing.doraemonkit.util.GsonUtils
import com.didichuxing.doraemonkit.util.ToastUtils
import com.didichuxing.doraemonkit.kit.core.BaseFragment
import com.didichuxing.doraemonkit.kit.core.SimpleDokitStarter
import com.didichuxing.doraemonkit.kit.mc.all.DoKitWindowManager
import com.didichuxing.doraemonkit.kit.mc.all.McConstant
import com.didichuxing.doraemonkit.kit.mc.client.DoKitWsClient
import com.didichuxing.doraemonkit.kit.mc.server.HostInfo
import com.didichuxing.doraemonkit.kit.mc.server.RecordingDokitView
import com.didichuxing.doraemonkit.kit.mc.util.McUtil
import com.didichuxing.doraemonkit.mc.R
import com.didichuxing.doraemonkit.util.LogHelper
import com.didichuxing.doraemonkit.zxing.activity.CaptureActivity
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import com.didichuxing.doraemonkit.util.TimeUtils
import com.didichuxing.doraemonkit.util.ToastUtils
import com.didichuxing.doraemonkit.widget.recyclerview.DividerItemDecoration
/**
* ================================================
......@@ -40,6 +21,8 @@ import kotlinx.coroutines.withContext
*/
class DoKitMcDatasFragment : BaseFragment() {
lateinit var mRv: RecyclerView
lateinit var mAdapter: McCaseListAdapter
override fun onRequestLayout(): Int {
return R.layout.dk_fragment_mc_datas
}
......@@ -48,8 +31,35 @@ class DoKitMcDatasFragment : BaseFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
mRv = findViewById(R.id.rv)
mRv.layoutManager = LinearLayoutManager(requireActivity())
val decoration = DividerItemDecoration(DividerItemDecoration.VERTICAL)
decoration.setDrawable(resources.getDrawable(R.drawable.dk_divider))
mRv.addItemDecoration(decoration)
mAdapter = McCaseListAdapter(createCaseList())
mAdapter.setOnItemClickListener { adapter, _, pos ->
for (i in adapter.data) {
(i as McCaseInfo).isChecked = false
}
val item = adapter.data[pos] as McCaseInfo
item.isChecked = true
adapter.notifyDataSetChanged()
ToastUtils.showShort("用例${item.caseName}已被选中")
}
mRv.adapter = mAdapter
}
private fun createCaseList(): MutableList<McCaseInfo> {
val list: MutableList<McCaseInfo> = mutableListOf()
for (index in 0..100) {
if (index == 0) {
list.add(McCaseInfo("item $index", "jintai", TimeUtils.getNowString(), true))
} else {
list.add(McCaseInfo("item $index", "jintai", TimeUtils.getNowString(), false))
}
}
return list
}
}
\ No newline at end of file
......@@ -19,6 +19,7 @@ import com.didichuxing.doraemonkit.util.ToastUtils
import com.didichuxing.doraemonkit.kit.core.BaseFragment
import com.didichuxing.doraemonkit.kit.core.SimpleDokitStarter
import com.didichuxing.doraemonkit.kit.mc.ability.McHttpManager
import com.didichuxing.doraemonkit.kit.mc.ability.McHttpManager.RESPONSE_OK
import com.didichuxing.doraemonkit.kit.mc.all.DoKitWindowManager
import com.didichuxing.doraemonkit.kit.mc.all.McConstant
import com.didichuxing.doraemonkit.kit.mc.client.DoKitWsClient
......@@ -28,13 +29,13 @@ import com.didichuxing.doraemonkit.mc.R
import com.didichuxing.doraemonkit.util.LogHelper
import com.didichuxing.doraemonkit.widget.dialog.DialogListener
import com.didichuxing.doraemonkit.widget.dialog.DialogProvider
import com.didichuxing.doraemonkit.widget.dialog.SimpleDialogListener
import com.didichuxing.doraemonkit.zxing.activity.CaptureActivity
import kotlinx.coroutines.CoroutineExceptionHandler
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.callbackFlow
import kotlinx.coroutines.launch
import kotlinx.coroutines.suspendCancellableCoroutine
import kotlinx.coroutines.withContext
import org.json.JSONObject
import org.xml.sax.ErrorHandler
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
......@@ -50,6 +51,10 @@ import kotlin.coroutines.suspendCoroutine
class DoKitMcMainFragment : BaseFragment() {
private val REQUEST_CODE_CAMERA = 0x100
private val REQUEST_CODE_SCAN = 0x101
private val exceptionHandler = CoroutineExceptionHandler { _, throwable ->
LogHelper.e(TAG, "error message: ${throwable.message}")
}
override fun onRequestLayout(): Int {
return R.layout.dk_fragment_mc_select
}
......@@ -57,12 +62,9 @@ class DoKitMcMainFragment : BaseFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val server = findViewById<Button>(R.id.tv_host)
server.setOnClickListener {
// if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
// ToastUtils.showShort("暂不支持Android 9以下的系统作为主机")
// return@setOnClickListener
// }
if (DoKitConstant.WS_MODE == WSMode.RECORDING) {
ToastUtils.showShort("当前处于数据录制状态,请先执行上传操作")
return@setOnClickListener
......@@ -92,23 +94,30 @@ class DoKitMcMainFragment : BaseFragment() {
}
val record = findViewById<Button>(R.id.tv_record)
record.setOnClickListener {
//请求一个CaseId
lifecycleScope.launch {
if (DoKitConstant.PRODUCT_ID.isEmpty()) {
ToastUtils.showShort("DoKit初始化时未传入产品id")
return@setOnClickListener
}
//请求一个CaseId
lifecycleScope.launch(exceptionHandler) {
if (interceptDialogResult()) {
// try {
// val result = McHttpManager.mockStart()
// DoKitConstant.WS_MODE = WSMode.RECORDING
// SimpleDokitStarter.startFloating(RecordingDokitView::class.java)
// LogHelper.i(TAG, "result===>$result")
// } catch (e: Exception) {
// DoKitConstant.WS_MODE = WSMode.UNKNOW
// ToastUtils.showShort("用例采集启动失败")
// LogHelper.i(TAG, "e===>${e.message} thread===>${Thread.currentThread().name}")
// }
DoKitConstant.WS_MODE = WSMode.RECORDING
SimpleDokitStarter.startFloating(RecordingDokitView::class.java)
ToastUtils.showShort("用例开始采集")
try {
val resInfo = McHttpManager.mockStart<Any>()
if (resInfo.code == RESPONSE_OK) {
SimpleDokitStarter.startFloating(RecordingDokitView::class.java)
LogHelper.i(TAG, "result===>$resInfo")
DoKitConstant.WS_MODE = WSMode.RECORDING
ToastUtils.showShort("用例开始采集")
}
} catch (e: Exception) {
DoKitConstant.WS_MODE = WSMode.UNKNOW
ToastUtils.showShort("用例采集启动失败")
LogHelper.i(
TAG, "e===>${e.message} thread===>${Thread.currentThread().name}"
)
}
} else {
ToastUtils.showShort("取消用例采集")
}
......@@ -121,22 +130,40 @@ class DoKitMcMainFragment : BaseFragment() {
val upload = findViewById<Button>(R.id.tv_upload)
upload.setOnClickListener {
lifecycleScope.launch {
try {
val result = McHttpManager.mockStop(mcCaseInfoDialog())
LogHelper.i(TAG, "result===>$result")
} catch (e: Exception) {
ToastUtils.showShort(e.message)
LogHelper.i(TAG, "e===>${e.message} thread===>${Thread.currentThread().name}")
}
if (DoKitConstant.PRODUCT_ID.isEmpty()) {
ToastUtils.showShort("DoKit初始化时未传入产品id")
return@setOnClickListener
}
lifecycleScope.launch(exceptionHandler) {
val result = McHttpManager.mockStop<Any>(mcCaseInfoDialog())
LogHelper.i(TAG, "result===>$result")
}
}
val datas = findViewById<Button>(R.id.tv_datas)
datas.setOnClickListener {
//SimpleDokitStarter.startFloating(RecordingDokitView::class.java)
if (DoKitConstant.PRODUCT_ID.isEmpty()) {
ToastUtils.showShort("DoKit初始化时未传入产品id")
return@setOnClickListener
}
(requireActivity() as DoKitMcActivity).changeFragment(WSMode.MC_CASELIST)
}
//加载exclude key
if (DoKitConstant.PRODUCT_ID.isNotEmpty()) {
lifecycleScope.launch(exceptionHandler) {
val config = McHttpManager.getMcConfig<Boolean>()
if (config.code == RESPONSE_OK) {
LogHelper.i(TAG, "config===>$config")
} else {
ToastUtils.showShort(config.msg)
}
}
}
}
/**
......
package com.didichuxing.doraemonkit.kit.mc.all.ui
import android.widget.RadioButton
import android.widget.TextView
import com.didichuxing.doraemonkit.mc.R
import com.didichuxing.doraemonkit.widget.brvah.BaseQuickAdapter
import com.didichuxing.doraemonkit.widget.brvah.viewholder.BaseViewHolder
/**
* ================================================
* 作 者:jint(金台)
* 版 本:1.0
* 创建日期:2021/7/1-15:53
* 描 述:
* 修订历史:
* ================================================
*/
class McCaseListAdapter(caseList: MutableList<McCaseInfo>) :
BaseQuickAdapter<McCaseInfo, BaseViewHolder>(R.layout.dk_item_mc_case, caseList) {
override fun convert(holder: BaseViewHolder, item: McCaseInfo) {
holder.getView<TextView>(R.id.tv_name).text = "用例名:${item.caseName}"
holder.getView<TextView>(R.id.tv_person).text = "采集人:${item.person}"
holder.getView<TextView>(R.id.tv_time).text = "采集时间:${item.time}"
holder.getView<RadioButton>(R.id.rb).isChecked = item.isChecked
}
}
data class McCaseInfo(
val caseName: String,
val person: String,
val time: String,
var isChecked: Boolean
)
\ No newline at end of file
package com.didichuxing.doraemonkit.kit.mc.all.ui
/**
* ================================================
* 作 者:jint(金台)
* 版 本:1.0
* 创建日期:2021/7/1-19:15
* 描 述:
* 修订历史:
* ================================================
*/
data class McResInfo<T>(val code: Int = 0, val data: T? = null, val msg: String = "")
......@@ -11,18 +11,20 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="@mipmap/dk_file_manager_banner" />
android:src="@mipmap/dk_mc_banner" />
<RelativeLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/iv_banner">
android:layout_below="@id/iv_banner"
android:scrollbars="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center_horizontal"
android:orientation="vertical">
<Button
......@@ -34,7 +36,9 @@
android:textAllCaps="false"
android:textColor="@color/dk_color_FFFFFF"
android:textSize="18sp"
android:textStyle="bold" />
android:textStyle="bold"
android:layout_marginTop="15dp"
/>
<Button
android:id="@+id/tv_client"
......@@ -84,6 +88,6 @@
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="@color/dk_color_FFFFFF"
android:orientation="vertical"
android:padding="@dimen/dk_dp_10">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/dk_color_333333"
android:textSize="16sp"
tools:text="用例名" />
<TextView
android:id="@+id/tv_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_name"
android:layout_marginTop="@dimen/dk_dp_10"
android:textColor="@color/dk_color_666666"
tools:text="采集人" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_person"
android:layout_marginTop="@dimen/dk_dp_10"
android:textColor="@color/dk_color_666666"
tools:text="用例时间" />
<RadioButton
android:id="@+id/rb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true" />
</RelativeLayout>
\ No newline at end of file
package com.didichuxing.doraemonkit;
package com.didichuxing.doraemonkit
import com.didichuxing.doraemonkit.util.GsonUtils;
import com.didichuxing.doraemonkit.kit.mc.all.WSEvent;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import org.junit.Test
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
* @see [Testing documentation](http://d.android.com/tools/testing)
*/
public class ExampleUnitTest {
class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
String json = "{\"eventType\":\"WSE_ACCESS_EVENT\",\"from\":\"HOST\",\"msgMaps\":{\"activityName\":\"com.didichuxing.doraemondemo.mc.MCActivity\"},\"viewC12c\":{\"acc\":{\"mAction\":0,\"mContentChangeTypes\":0,\"mEventTime\":1163811924,\"mEventType\":1,\"mMovementGranularity\":0,\"mPackageName\":\"com.didichuxing.doraemondemo.java\",\"mRecords\":null,\"mWindowChangeTypes\":0,\"originStackTrace\":null,\"mAddedCount\":-1,\"mBeforeText\":null,\"mBooleanProperties\":514,\"mClassName\":\"android.widget.ImageView\",\"mConnectionId\":-1,\"mContentDescription\":null,\"mCurrentItemIndex\":-1,\"mFromIndex\":-1,\"mIsInPool\":false,\"mItemCount\":-1,\"mMaxScrollX\":-1,\"mMaxScrollY\":-1,\"mNext\":null,\"mParcelableData\":null,\"mRemovedCount\":-1,\"mScrollDeltaX\":-1,\"mScrollDeltaY\":-1,\"mScrollX\":-1,\"mScrollY\":-1,\"mSealed\":false,\"mSourceNodeId\":-4294966900,\"mSourceWindowId\":-1,\"mText\":[],\"mToIndex\":-1},\"childCount\":0,\"directParentId \":\"title_bar\",\"directParentViewClassName\":\"com.didichuxing.doraemonkit.widget.titlebar.HomeTitleBar\",\"hasChild\":false,\"id\":\"icon\",\"imgWHRatio\":\"1.00\",\"indexOfDirectParent\":1,\"svgc12c\":{\"currentViewIndexOfSpecialViewGroup\":-1,\"specialViewGroupClassName\":\"\"},\"text\":\"\",\"viewClassName\":\"androidx.appcompat.widget.AppCompatImageView\",\"windowId\":\"android.view.ViewRootImpl$W@d37e0b3\"}}";
WSEvent wsEvent = GsonUtils.fromJson(json, WSEvent.class);
System.out.println(wsEvent.getFrom());
@Throws(Exception::class)
fun addition_isCorrect() {
// String json = "{\"eventType\":\"WSE_ACCESS_EVENT\",\"from\":\"HOST\",\"msgMaps\":{\"activityName\":\"com.didichuxing.doraemondemo.mc.MCActivity\"},\"viewC12c\":{\"acc\":{\"mAction\":0,\"mContentChangeTypes\":0,\"mEventTime\":1163811924,\"mEventType\":1,\"mMovementGranularity\":0,\"mPackageName\":\"com.didichuxing.doraemondemo.java\",\"mRecords\":null,\"mWindowChangeTypes\":0,\"originStackTrace\":null,\"mAddedCount\":-1,\"mBeforeText\":null,\"mBooleanProperties\":514,\"mClassName\":\"android.widget.ImageView\",\"mConnectionId\":-1,\"mContentDescription\":null,\"mCurrentItemIndex\":-1,\"mFromIndex\":-1,\"mIsInPool\":false,\"mItemCount\":-1,\"mMaxScrollX\":-1,\"mMaxScrollY\":-1,\"mNext\":null,\"mParcelableData\":null,\"mRemovedCount\":-1,\"mScrollDeltaX\":-1,\"mScrollDeltaY\":-1,\"mScrollX\":-1,\"mScrollY\":-1,\"mSealed\":false,\"mSourceNodeId\":-4294966900,\"mSourceWindowId\":-1,\"mText\":[],\"mToIndex\":-1},\"childCount\":0,\"directParentId \":\"title_bar\",\"directParentViewClassName\":\"com.didichuxing.doraemonkit.widget.titlebar.HomeTitleBar\",\"hasChild\":false,\"id\":\"icon\",\"imgWHRatio\":\"1.00\",\"indexOfDirectParent\":1,\"svgc12c\":{\"currentViewIndexOfSpecialViewGroup\":-1,\"specialViewGroupClassName\":\"\"},\"text\":\"\",\"viewClassName\":\"androidx.appcompat.widget.AppCompatImageView\",\"windowId\":\"android.view.ViewRootImpl$W@d37e0b3\"}}";
// WSEvent wsEvent = GsonUtils.fromJson(json, WSEvent.class);
//
//
// System.out.println(wsEvent.getFrom());
val list = listOf<Int>(1, 2, 3, 4, 5, 6, 7)
list.forEach {
if (it == 3) {
return@forEach
}
println(it)
}
}
}
\ No newline at end of file
......@@ -36,7 +36,7 @@ dependencies {
/* 👇👇👇👇 引用这两个模块 👇👇👇👇 */
api "com.didiglobal.booster:booster-api:${rootProject.ext.android["booster_version"]}"
api "com.didiglobal.booster:booster-transform-asm:${rootProject.ext.android["booster_version"]}"
// kapt "com.google.auto.service:auto-service:1.0-rc7"
kapt "com.google.auto.service:auto-service:1.0"
}
/**
......
......@@ -35,6 +35,11 @@ enum class WSMode {
*数据抓取中...
*/
RECORDING,
/**
* 查看用例列表
*/
MC_CASELIST
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册