Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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
android
android_goodmoney
Commits
787978cf
Commit
787978cf
authored
Mar 05, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
6828cd00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
TaskCpdFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
+15
-15
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
View file @
787978cf
...
@@ -203,10 +203,10 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -203,10 +203,10 @@ class TaskCpdFragment : BaseFragment(), TaskView,
taskPresenter
.
getCpdDetail
(
outNetIp
)
taskPresenter
.
getCpdDetail
(
outNetIp
)
}
}
private
fun
loadCPDDataList
()
{
//
private fun loadCPDDataList() {
// 圣于地CPD广告拉取
//
// 圣于地CPD广告拉取
taskPresenter
.
getCpdListDetail
(
outNetIp
,
cpdMax
)
//
taskPresenter.getCpdListDetail(outNetIp, cpdMax)
}
//
}
override
fun
getCpdModelSuc
(
dataBean
:
CpdModelBean
.
DataBean
)
{
override
fun
getCpdModelSuc
(
dataBean
:
CpdModelBean
.
DataBean
)
{
...
@@ -404,7 +404,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -404,7 +404,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
for
(
tzTaskBean
in
mFakeTaskList
)
{
for
(
tzTaskBean
in
mFakeTaskList
)
{
if
(!
tzTaskBean
.
isShCpd
)
{
if
(!
tzTaskBean
.
isShCpd
)
{
val
trackerBean
=
tzTaskBean
.
tracker
List
Bean
val
trackerBean
=
tzTaskBean
.
trackerBean
// val trackerBean = tzTaskBean.trackerBean
// val trackerBean = tzTaskBean.trackerBean
if
(
trackerBean
!=
null
)
{
if
(
trackerBean
!=
null
)
{
LogUtil
.
d
(
"CPD -> show"
)
LogUtil
.
d
(
"CPD -> show"
)
...
@@ -431,10 +431,10 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -431,10 +431,10 @@ class TaskCpdFragment : BaseFragment(), TaskView,
LogUtil
.
d
(
TAG
,
"shanhu onLoadSuccess"
)
LogUtil
.
d
(
TAG
,
"shanhu onLoadSuccess"
)
if
(
cpdMax
==
0
||
cpdLoadCountTime
>=
cpdMax
)
{
if
(
cpdMax
==
0
||
cpdLoadCountTime
>=
cpdMax
)
{
notifyDataAndShowAd
()
getCpdRepeatPkg
()
}
else
{
}
else
{
// 珊瑚拉取完成后 调用圣于地广告
// 珊瑚拉取完成后 调用圣于地广告
loadCPDData
List
()
loadCPDData
Cycle
()
}
}
}
}
...
@@ -445,14 +445,14 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -445,14 +445,14 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 次数刷新完 且未拿到数据 提示
// 次数刷新完 且未拿到数据 提示
if
(
shLoadCountTime
++
>=
shMax
-
1
)
{
if
(
shLoadCountTime
++
>=
shMax
-
1
)
{
if
(
cpdMax
==
0
)
{
if
(
cpdMax
==
0
)
{
notifyDataAndShowAd
()
getCpdRepeatPkg
()
return
return
}
}
// for (i in 0 until cpdMax) {
// for (i in 0 until cpdMax) {
// loadCPDData()
// loadCPDData()
// }
// }
loadCPDData
List
()
loadCPDData
Cycle
()
}
}
}
}
...
@@ -566,7 +566,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -566,7 +566,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
else
{
}
else
{
taskCpdDialog
=
TaskCpdDialog
(
requireActivity
(),
object
:
DialogListener
()
{
taskCpdDialog
=
TaskCpdDialog
(
requireActivity
(),
object
:
DialogListener
()
{
override
fun
onClick
(
v
:
View
?)
{
override
fun
onClick
(
v
:
View
?)
{
val
trackerBean
=
mFakeTaskList
[
position
].
tracker
List
Bean
val
trackerBean
=
mFakeTaskList
[
position
].
trackerBean
if
(
trackerBean
!=
null
)
{
if
(
trackerBean
!=
null
)
{
LogUtil
.
d
(
"CPD -> clikc"
)
LogUtil
.
d
(
"CPD -> clikc"
)
...
@@ -617,7 +617,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -617,7 +617,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 上报珊瑚安装完成
// 上报珊瑚安装完成
mDownloadProcess
?.
reportInstallSuccess
(
false
)
mDownloadProcess
?.
reportInstallSuccess
(
false
)
}
else
{
}
else
{
val
trackerBean
=
mFakeTaskList
[
position
].
tracker
List
Bean
val
trackerBean
=
mFakeTaskList
[
position
].
trackerBean
if
(
trackerBean
!=
null
)
{
if
(
trackerBean
!=
null
)
{
// 上报CPD开始安装
// 上报CPD开始安装
LogUtil
.
d
(
"CPD -> install_start"
)
LogUtil
.
d
(
"CPD -> install_start"
)
...
@@ -662,7 +662,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -662,7 +662,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 上报珊瑚激活完成
// 上报珊瑚激活完成
mDownloadProcess
?.
reportAppActivated
()
mDownloadProcess
?.
reportAppActivated
()
}
else
{
}
else
{
val
trackerBean
=
mFakeTaskList
[
position
].
tracker
List
Bean
val
trackerBean
=
mFakeTaskList
[
position
].
trackerBean
if
(
trackerBean
!=
null
)
{
if
(
trackerBean
!=
null
)
{
// 上报CPD激活完成
// 上报CPD激活完成
...
@@ -683,7 +683,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -683,7 +683,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 上报珊瑚激活完成
// 上报珊瑚激活完成
mDownloadProcess
?.
reportAppActivated
()
mDownloadProcess
?.
reportAppActivated
()
}
else
{
}
else
{
val
trackerBean
=
mFakeTaskList
[
position
].
tracker
List
Bean
val
trackerBean
=
mFakeTaskList
[
position
].
trackerBean
if
(
trackerBean
!=
null
)
{
if
(
trackerBean
!=
null
)
{
// 上报CPD激活完成
// 上报CPD激活完成
LogUtil
.
d
(
"CPD -> activation"
)
LogUtil
.
d
(
"CPD -> activation"
)
...
@@ -734,7 +734,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -734,7 +734,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
else
{
}
else
{
LogUtil
.
d
(
"CPD -> onDownloadStart"
)
LogUtil
.
d
(
"CPD -> onDownloadStart"
)
val
trackerBean
=
mFakeTaskList
[
position
].
tracker
List
Bean
val
trackerBean
=
mFakeTaskList
[
position
].
trackerBean
if
(
trackerBean
!=
null
)
{
if
(
trackerBean
!=
null
)
{
// 上报CPD下载开始
// 上报CPD下载开始
taskPresenter
.
cmtImp
(
trackerBean
.
download_start
[
0
])
taskPresenter
.
cmtImp
(
trackerBean
.
download_start
[
0
])
...
@@ -755,7 +755,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -755,7 +755,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
else
{
}
else
{
LogUtil
.
d
(
"CPD -> onDownloadSuccess"
)
LogUtil
.
d
(
"CPD -> onDownloadSuccess"
)
val
trackerBean
=
mFakeTaskList
[
position
].
tracker
List
Bean
val
trackerBean
=
mFakeTaskList
[
position
].
trackerBean
if
(
trackerBean
!=
null
)
{
if
(
trackerBean
!=
null
)
{
// 上报CPD下载成功
// 上报CPD下载成功
taskPresenter
.
cmtImp
(
trackerBean
.
download_finish
[
0
])
taskPresenter
.
cmtImp
(
trackerBean
.
download_finish
[
0
])
...
...
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