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
b9f4fdbc
Commit
b9f4fdbc
authored
Jan 13, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
c396c906
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
TaskActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
+7
-3
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
View file @
b9f4fdbc
...
...
@@ -80,6 +80,8 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
mCoralDownload
=
CoralDownload
(
CoralDownload
.
RELEASE_TASK_TYPE
).
setOnAdLoadListener
(
this
)
CacheUtil
.
clearAllCache
(
context
)
initView
()
initListener
()
...
...
@@ -116,7 +118,7 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
private
fun
refreshDemoTask
()
{
mTaskAdapter
?.
let
{
val
position
=
it
.
getPosition
()
if
(
mFakeTaskList
.
size
==
0
||
tryTimeOut
||
mFakeTaskList
[
position
].
state
==
3
)
return
if
(
mFakeTaskList
.
size
==
0
||
mFakeTaskList
[
position
].
state
==
3
)
return
val
currentPkgName
=
mFakeTaskList
[
position
].
currentPkgName
...
...
@@ -130,8 +132,11 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
mDownloadProcess
?.
reportAppActivated
()
}
else
{
if
(
AppTryPlayManager
.
getTryPlayIsOK
(
currentPkgName
,
5
))
{
tryTimeOut
=
true
// 试玩时间不足
if
(
tryTimeOut
)
{
return
}
tryTimeOut
=
true
mFakeTaskList
[
position
].
state
=
4
it
.
notifyItemChanged
(
it
.
getPosition
())
...
...
@@ -207,7 +212,6 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
mCoralDownload
?.
destroy
()
mDownloadProcess
=
null
DownloadApkManager
.
destroy
()
CacheUtil
.
clearAllCache
(
context
)
if
(
mReceiverBroadcastReceiver
!=
null
)
{
mContext
.
stopService
(
Intent
(
context
,
AppInstallService
::
class
.
java
))
mContext
.
unregisterReceiver
(
mReceiverBroadcastReceiver
)
...
...
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