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
02c53e98
Commit
02c53e98
authored
Jan 07, 2021
by
jyx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_ad' of
http://39.97.65.143:81/android/android_goodmoney
into dev_ad
parents
fb6a6753
36db09d7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
45 deletions
+50
-45
DownloadApkManager.kt
...in/java/com/mints/goodmoney/manager/DownloadApkManager.kt
+1
-5
KylVedioActivity.kt
...java/com/mints/goodmoney/ui/activitys/KylVedioActivity.kt
+1
-5
SettingsActivity.kt
...java/com/mints/goodmoney/ui/activitys/SettingsActivity.kt
+2
-7
WebActivity.kt
...main/java/com/mints/goodmoney/ui/activitys/WebActivity.kt
+4
-0
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+35
-25
CacheUtil.java
...pp/src/main/java/com/mints/goodmoney/utils/CacheUtil.java
+7
-3
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/DownloadApkManager.kt
View file @
02c53e98
...
...
@@ -82,11 +82,7 @@ object DownloadApkManager {
override
fun
onError
(
error
:
Error
)
{
downloadProgressDialog
?.
dismiss
()
try
{
CacheUtil
.
clearAllCache
(
context
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
CacheUtil
.
clearAllCache
(
context
)
}
})
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/KylVedioActivity.kt
View file @
02c53e98
...
...
@@ -110,11 +110,7 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
}
//删除缓存文件
try
{
CacheUtil
.
clearAllCache
(
context
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
CacheUtil
.
clearAllCache
(
context
)
kylVedioPresenter
.
detachView
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SettingsActivity.kt
View file @
02c53e98
...
...
@@ -271,13 +271,8 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
}
R
.
id
.
dialog_btn_right
->
{
try
{
CacheUtil
.
clearAllCache
(
context
)
item_cleanCache
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
"0KB"
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
finally
{
}
CacheUtil
.
clearAllCache
(
context
)
item_cleanCache
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
"0KB"
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WebActivity.kt
View file @
02c53e98
...
...
@@ -11,6 +11,7 @@ import android.webkit.WebViewClient
import
com.mints.goodmoney.R
import
com.mints.goodmoney.manager.DownloadApkManager
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.utils.CacheUtil
import
kotlinx.android.synthetic.main.activity_web.*
/**
...
...
@@ -99,6 +100,9 @@ class WebActivity : BaseActivity(), View.OnClickListener {
override
fun
onDestroy
()
{
super
.
onDestroy
()
CacheUtil
.
clearAllCache
(
context
)
if
(
browser_layout
!=
null
)
{
browser_layout
.
destroyDrawingCache
()
browser_layout
.
clearWebView
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
02c53e98
...
...
@@ -94,7 +94,6 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
// 高额任务
private
var
mCurrentPkg
:
String
?
=
null
private
var
mCarrierType
:
String
?
=
null
private
var
cdaa
:
CustomDialogAsApple
?
=
null
...
...
@@ -130,6 +129,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_MY
)
{
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
myPresenter
.
getAutoUserHallBaseMsg
()
refreshHighTask
()
}
else
{
// 游客登录
myPresenter
.
userLogin
()
...
...
@@ -141,20 +141,25 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
// 刷新喜马拉雅信息流
TTPreLoadExpressXmlyManager
.
getInstance
().
loadTtFrameLayout
()
}
}
if
(
AppConfig
.
isHighTask
&&
mCurrentPkg
!=
null
)
{
if
(
AppTryPlayManager
.
getTryPlayIsOK
(
mCurrentPkg
!!
))
{
myPresenter
.
setHighTaskType
(
"1"
)
}
else
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
0
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_HIGH_ACTIVITY
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
/**
* 刷新高额任务
*/
private
fun
refreshHighTask
()
{
if
(
AppConfig
.
isHighTask
&&
mCurrentPkg
!=
null
)
{
if
(
AppTryPlayManager
.
getTryPlayIsOK
(
mCurrentPkg
!!
))
{
myPresenter
.
setHighTaskType
(
"1"
)
}
else
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
0
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_HIGH_ACTIVITY
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
myPresenter
.
setHighTaskType
(
"0"
)
}
AppConfig
.
isHighTask
=
false
myPresenter
.
setHighTaskType
(
"0"
)
}
AppConfig
.
isHighTask
=
false
}
}
...
...
@@ -461,7 +466,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
when
(
taskBean
.
otherConfig
.
status
)
{
0
->
{
0
->
{
// 0-去下载 1-去领取 3-去试玩
if
(
AppUtil
.
isOpenUsageStats
())
{
highVideoTint
(
taskBean
)
}
else
{
...
...
@@ -920,6 +925,12 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
private
fun
videoAdingSuccess
(
adType
:
String
)
{
if
(
activity
!=
null
&&
!
activity
!!
.
isFinishing
)
{
// 高额任务
if
(
TextUtils
.
equals
(
carrierType
,
Constant
.
CARRIER_HIGH_ACTIVITY
))
{
return
}
// 签到
val
bundle
=
Bundle
()
if
(
TextUtils
.
equals
(
carrierType
,
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
))
{
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
curSignCoin
*
2
)
...
...
@@ -928,11 +939,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
return
}
if
(
mCarrierType
!=
null
&&
mCarrierType
==
Constant
.
CARRIER_HIGH_ACTIVITY
)
{
mCarrierType
=
null
return
}
// 每日福利视频
userConfig
?.
let
{
for
(
autoListBean
in
it
.
autoList
)
{
if
(
autoListBean
.
baseConfig
.
taskId
==
MainMyAdapter
.
APP_VEDIO
)
{
...
...
@@ -1133,7 +1140,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
R
.
id
.
dialog_btn_right
->
{
cdaa
!!
.
dismiss
()
mC
arrierType
=
Constant
.
CARRIER_HIGH_ACTIVITY
c
arrierType
=
Constant
.
CARRIER_HIGH_ACTIVITY
vedioAdingManager
.
setIsHighWeight
(
true
)
awardVedio
(
taskBean
.
otherConfig
.
coin
,
Constant
.
CARRIER_HIGH_ACTIVITY
)
...
...
@@ -1194,13 +1201,16 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
private
val
mReceiverBroadcastReceiver
=
object
:
BroadcastReceiver
()
{
override
fun
onReceive
(
context
:
Context
?,
intent
:
Intent
?)
{
if
(
intent
==
null
)
return
try
{
val
pkg
=
intent
.
getStringExtra
(
"pkg"
)
mCurrentPkg
=
pkg
myPresenter
.
setHighTaskType
(
"3"
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
// 非高额任务不监听下载安装
if
(
TextUtils
.
equals
(
carrierType
,
Constant
.
CARRIER_HIGH_ACTIVITY
))
{
try
{
val
pkg
=
intent
.
getStringExtra
(
"pkg"
)
mCurrentPkg
=
pkg
myPresenter
.
setHighTaskType
(
"3"
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/CacheUtil.java
View file @
02c53e98
...
...
@@ -27,9 +27,13 @@ public class CacheUtil {
* @param context
*/
public
static
void
clearAllCache
(
Context
context
)
{
deleteDir
(
context
.
getCacheDir
());
if
(
Environment
.
getExternalStorageState
().
equals
(
Environment
.
MEDIA_MOUNTED
))
{
deleteDir
(
context
.
getExternalCacheDir
());
try
{
deleteDir
(
context
.
getCacheDir
());
if
(
Environment
.
getExternalStorageState
().
equals
(
Environment
.
MEDIA_MOUNTED
))
{
deleteDir
(
context
.
getExternalCacheDir
());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
...
...
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