Commit 179ae5e6 authored by liuyang's avatar liuyang

APK抓包>从频道1开始依次抓取, 一些epg显示时间过长的应用,模拟返回键点击

#BYLSERVER-1693
parent 2662cddf
......@@ -13,7 +13,7 @@ android {
minSdkVersion 15
targetSdkVersion 22
versionCode 15
versionName "1.2.25"
versionName "1.3.30"
}
signingConfigs {
......
......@@ -30,6 +30,9 @@ class ApkInfo: IModel {
// 弹出界面菜单按键,默认确定键
lateinit var menuKeyEvent: String
// epg是否需要按返回键,因为有些apk的epg显示时间过长
var epgBack = false
var monitoring = true
override fun from(json: JSONObject): Boolean {
......@@ -40,7 +43,15 @@ class ApkInfo: IModel {
this.captureDelay = json.optInt(CAPTURE_DELAY, 15)
this.launchKeyEvent = json.optString(LAUNCH_KEY_EVENT, "")
this.channelCount = json.optInt(CHANNEL_COUNT, 5)
this.channelKeyEvent = json.optString(CHANNEL_KEY_EVENT)
var channelKeyEvent = json.optString(CHANNEL_KEY_EVENT)
// 如果包含百分号则epg需要按返回键
if (!channelKeyEvent.isNullOrEmpty() && channelKeyEvent.contains('%')) {
this.epgBack = true
channelKeyEvent = channelKeyEvent.replace("%", "")
}
this.channelKeyEvent = channelKeyEvent
this.mediaExt = json.optString(MEDIA_EXT, VIDEO_EXTS)
this.filterUrl = json.optString(FILTER_URL, "")
this.menuKeyEvent = json.optString(MENU_KEY_EVENT, "ok")
......
......@@ -275,7 +275,10 @@ class Task : Thread, IAppBaseCallback {
val absOkName = this.imagePath + "/${this.apkInfo.packageName}_${channelIndex}_${time}_ok"
screenShot(absOkName)
screenImages.add("$absOkName.jpg")
AdbUtil.sendMultiKey("back")
// 对于一些epg弹出时间过长的应用,模拟点击一次返回键,比如电视家3.0
if (this.apkInfo.epgBack)
AdbUtil.sendMultiKey("back")
if (screenImages.size > 0)
uploadImages.addAll(screenImages)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment