Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BYLAppRobot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuyang
BYLAppRobot
Commits
b2fb77d9
Commit
b2fb77d9
authored
Oct 18, 2018
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APK图片抓取识别及轮播流地址抓取,客户端4.2版本文件读取问题
#BYLSERVER-1438
parent
f3598946
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
build.gradle
app/build.gradle
+1
-1
Task.kt
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
+1
-0
AppUtil.kt
app/src/main/java/com/duolebo/blyrobot/util/AppUtil.kt
+8
-7
No files found.
app/build.gradle
View file @
b2fb77d9
...
...
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
apply
plugin:
'kotlin-android-extensions'
static
def
releaseTime
()
{
return
new
Date
().
format
(
"yyyyMMdd"
,
TimeZone
.
getTimeZone
(
"UTC"
))
return
new
Date
().
format
(
"yyyyMMdd
HHmm
"
,
TimeZone
.
getTimeZone
(
"UTC"
))
}
android
{
...
...
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
View file @
b2fb77d9
...
...
@@ -256,6 +256,7 @@ class Task : IAppBaseCallback {
if
(
add
)
{
// 这里进行媒体视频播放地址识别
add
=
false
val
extArr
=
this
.
apkInfo
.
mediaExt
.
split
(
"|"
)
for
(
ext
in
extArr
)
{
if
(
url
.
contains
(
ext
))
{
...
...
app/src/main/java/com/duolebo/blyrobot/util/AppUtil.kt
View file @
b2fb77d9
...
...
@@ -156,15 +156,16 @@ object AppUtil {
sdcardAbsPath
=
Environment
.
getExternalStorageDirectory
().
absolutePath
// 4.2系统存在legacy|0读取问题
if
(
Build
.
VERSION
.
SDK_INT
==
Build
.
VERSION_CODES
.
JELLY_BEAN_MR1
)
{
sdcardAbsPath
=
"/sdcard"
}
// val p = Pattern.compile("/?storage/emulated/\\d{1,2}")
// val m = p.matcher(sdcardAbsPath)
// if (m.find()) {
// sdcardAbsPath = sdcardAbsPath.replace("storage/emulated/", "storage/sdcard")
// if (Build.VERSION.SDK_INT == Build.VERSION_CODES.JELLY_BEAN_MR1) {
// sdcardAbsPath = "/sdcard"
// }
val
p
=
Pattern
.
compile
(
"/?storage/emulated/\\d{1,2}"
)
val
m
=
p
.
matcher
(
sdcardAbsPath
)
if
(
m
.
find
())
{
sdcardAbsPath
=
sdcardAbsPath
.
replace
(
"storage/emulated/0"
,
"storage/emulated/legacy"
)
}
return
sdcardAbsPath
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment