Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_fiveworld
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_fiveworld
Commits
1587c0ea
Commit
1587c0ea
authored
Dec 16, 2021
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化开屏黑名单
parent
090cfd5f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
50 deletions
+84
-50
UmengManager.kt
...src/main/java/com/mints/fiveworld/manager/UmengManager.kt
+20
-20
SplashPresenter.kt
...ava/com/mints/fiveworld/mvp/presenters/SplashPresenter.kt
+46
-16
SplashView.kt
...src/main/java/com/mints/fiveworld/mvp/views/SplashView.kt
+2
-0
SplashActivity.java
...java/com/mints/fiveworld/ui/activitys/SplashActivity.java
+16
-14
No files found.
app/src/main/java/com/mints/fiveworld/manager/UmengManager.kt
View file @
1587c0ea
...
@@ -66,26 +66,26 @@ object UmengManager {
...
@@ -66,26 +66,26 @@ object UmengManager {
* 友盟埋点
* 友盟埋点
*/
*/
fun
onEvent
(
name
:
String
)
{
fun
onEvent
(
name
:
String
)
{
if
(
BuildConfig
.
DEBUG
){
//
if(BuildConfig.DEBUG){
LogUtil
.
d
(
TAG
,
"name=${name} remark=${AdReportManager.EventType.valueOf(name).value}"
)
//
LogUtil.d(TAG, "name=${name} remark=${AdReportManager.EventType.valueOf(name).value}")
//
//
TrackManager
.
getInstance
().
tempaddCallImp
(
//
TrackManager.getInstance().tempaddCallImp(
""
,
//
"",
""
,
//
"",
""
,
//
"",
""
,
//
"",
""
,
//
"",
""
,
//
"",
""
,
//
"",
""
,
//
"",
""
,
//
"",
""
,
//
"",
System
.
currentTimeMillis
(),
//
System.currentTimeMillis(),
name
,
//
name,
AdReportManager
.
EventType
.
valueOf
(
name
).
value
//
AdReportManager.EventType.valueOf(name).value
)
//
)
}
//
}
// 上送umeng
// 上送umeng
MobclickAgent
.
onEvent
(
MintsApplication
.
getContext
(),
name
)
MobclickAgent
.
onEvent
(
MintsApplication
.
getContext
(),
name
)
...
...
app/src/main/java/com/mints/fiveworld/mvp/presenters/SplashPresenter.kt
View file @
1587c0ea
...
@@ -15,8 +15,6 @@ import com.mints.fiveworld.mvp.views.SplashView
...
@@ -15,8 +15,6 @@ import com.mints.fiveworld.mvp.views.SplashView
import
com.mints.fiveworld.utils.AccessibilityUtils
import
com.mints.fiveworld.utils.AccessibilityUtils
import
com.mints.fiveworld.utils.DeviceUuidFactory
import
com.mints.fiveworld.utils.DeviceUuidFactory
import
com.mints.fiveworld.utils.LogUtil
import
com.mints.fiveworld.utils.LogUtil
import
com.mints.fiveworld.utils.rxutil.CommonRxTask
import
com.mints.fiveworld.utils.rxutil.RxjavaUtil
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
com.mints.library.net.neterror.Throwable
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.CommonUtils
...
@@ -24,8 +22,40 @@ import java.util.*
...
@@ -24,8 +22,40 @@ import java.util.*
class
SplashPresenter
:
BasePresenter
<
SplashView
>()
{
class
SplashPresenter
:
BasePresenter
<
SplashView
>()
{
fun
blackOuterAd
(
senceType
:
String
)
{
LogUtil
.
d
(
"SplashPresenter222"
,
"4、拉黑 blackOuterAd 请求-1"
)
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"senceType"
]
=
senceType
vo
[
"uid"
]
=
UserManager
.
getInstance
().
userID
vo
[
"deviceId"
]
=
DeviceUuidFactory
().
deviceUuid
.
toString
()
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
blackOuterAd
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onCompleted
()
{}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
LogUtil
.
d
(
"SplashPresenter222"
,
"4、拉黑 blackOuterAd onError-2"
)
view
.
getAppsCountFail
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{
if
(
isLinkView
)
return
LogUtil
.
d
(
"SplashPresenter222"
,
"4、拉黑 blackOuterAd 返回onNext 200-2"
)
val
code
=
baseResponse
.
status
when
(
code
)
{
200
->
{
view
.
getBlackSuc
()
}
else
->
view
.
getAppsCountFail
()
}
}
})
}
fun
getCloseNeedInitAppsCount
()
{
fun
getCloseNeedInitAppsCount
()
{
LogUtil
.
d
(
"SplashPresenter222"
,
"getCloseNeedInitAppsCount 请求-1"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
1、获取策略接口
getCloseNeedInitAppsCount 请求-1"
)
val
vo
=
HashMap
<
String
,
Any
>()
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"os"
]
=
"Android"
vo
[
"os"
]
=
"Android"
...
@@ -40,7 +70,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -40,7 +70,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
override
fun
onError
(
e
:
Throwable
)
{
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
if
(
isLinkView
)
return
LogUtil
.
d
(
"SplashPresenter222"
,
"getCloseNeedInitAppsCount onError-2"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
1、获取策略接口
getCloseNeedInitAppsCount onError-2"
)
view
.
getAppsCountFail
()
view
.
getAppsCountFail
()
}
}
...
@@ -50,14 +80,14 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -50,14 +80,14 @@ class SplashPresenter : BasePresenter<SplashView>() {
val
code
=
baseResponse
.
status
val
code
=
baseResponse
.
status
when
(
code
)
{
when
(
code
)
{
200
->
{
200
->
{
LogUtil
.
d
(
"SplashPresenter222"
,
"getCloseNeedInitAppsCount 返回onNext 200-2"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
1、获取策略接口
getCloseNeedInitAppsCount 返回onNext 200-2"
)
if
(!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
userID
))
{
if
(!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
userID
))
{
LogUtil
.
d
(
"SplashPresenter222"
,
"getCloseNeedInitAppsCount 返回onNext getAppsCountSuc 200-2.1"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
1、获取策略接口
getCloseNeedInitAppsCount 返回onNext getAppsCountSuc 200-2.1"
)
view
.
getAppsCountSuc
(
baseResponse
.
data
)
view
.
getAppsCountSuc
(
baseResponse
.
data
)
}
else
{
}
else
{
LogUtil
.
d
(
"SplashPresenter222"
,
"getCloseNeedInitAppsCount 返回onNext userLogin 200-2.1"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
1、获取策略接口
getCloseNeedInitAppsCount 返回onNext userLogin 200-2.1"
)
userLogin
(
baseResponse
.
data
)
userLogin
(
baseResponse
.
data
)
}
}
...
@@ -76,7 +106,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -76,7 +106,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
* 游客登录
* 游客登录
*/
*/
fun
userLogin
(
splashBean
:
SplashAppBean
)
{
fun
userLogin
(
splashBean
:
SplashAppBean
)
{
LogUtil
.
d
(
"SplashPresenter222"
,
"userLogin 请求-1"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
2、游客登录
userLogin 请求-1"
)
val
vo
=
HashMap
<
String
,
Any
>()
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"device"
]
=
DeviceUuidFactory
().
deviceUuid
.
toString
()
vo
[
"device"
]
=
DeviceUuidFactory
().
deviceUuid
.
toString
()
...
@@ -89,13 +119,13 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -89,13 +119,13 @@ class SplashPresenter : BasePresenter<SplashView>() {
override
fun
onError
(
e
:
Throwable
)
{
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
if
(
isLinkView
)
return
view
.
getAppsCountFail
()
view
.
getAppsCountFail
()
LogUtil
.
d
(
"SplashPresenter222"
,
"userLogin onError-2"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
2、游客登录
userLogin onError-2"
)
}
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
UserBean
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
UserBean
>)
{
if
(
isLinkView
)
return
if
(
isLinkView
)
return
LogUtil
.
d
(
"SplashPresenter222"
,
"userLogin 返回onNext 200-2"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
2、游客登录
userLogin 返回onNext 200-2"
)
val
code
=
baseResponse
.
status
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
val
message
=
baseResponse
.
message
...
@@ -116,7 +146,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -116,7 +146,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
* 提交设备信息
* 提交设备信息
*/
*/
private
fun
saveTerminalInfo
(
splashBean
:
SplashAppBean
)
{
private
fun
saveTerminalInfo
(
splashBean
:
SplashAppBean
)
{
LogUtil
.
d
(
"SplashPresenter222"
,
"saveTerminalInfo 请求-1"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
3、设备信息
saveTerminalInfo 请求-1"
)
val
deviceInfo
:
DeviceInfo
=
DeviceInfo
.
instance
val
deviceInfo
:
DeviceInfo
=
DeviceInfo
.
instance
val
vo
=
HashMap
<
String
,
Any
>()
val
vo
=
HashMap
<
String
,
Any
>()
...
@@ -156,7 +186,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -156,7 +186,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
if
(
isLinkView
)
return
if
(
isLinkView
)
return
view
.
getAppsCountFail
()
view
.
getAppsCountFail
()
LogUtil
.
d
(
"SplashPresenter222"
,
"saveTerminalInfo 返回 onError"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
3、设备信息
saveTerminalInfo 返回 onError"
)
}
}
...
@@ -169,7 +199,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -169,7 +199,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
TrackManager
.
getInstance
().
riskCmtInfo
()
TrackManager
.
getInstance
().
riskCmtInfo
()
}
}
LogUtil
.
d
(
"SplashPresenter222"
,
"saveTerminalInfo 返回onNext 200-2"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
3、设备信息
saveTerminalInfo 返回onNext 200-2"
)
view
.
getAppsCountSuc
(
splashBean
)
view
.
getAppsCountSuc
(
splashBean
)
...
@@ -201,7 +231,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -201,7 +231,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
}
}
private
fun
installApp
()
{
private
fun
installApp
()
{
LogUtil
.
d
(
"SplashPresenter222"
,
"installApp 请求-1"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
5、安装
installApp 请求-1"
)
val
vo
=
HashMap
<
String
,
Any
>()
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"device"
]
=
DeviceUuidFactory
().
deviceUuid
.
toString
()
vo
[
"device"
]
=
DeviceUuidFactory
().
deviceUuid
.
toString
()
...
@@ -212,12 +242,12 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -212,12 +242,12 @@ class SplashPresenter : BasePresenter<SplashView>() {
}
}
override
fun
onError
(
e
:
Throwable
)
{
override
fun
onError
(
e
:
Throwable
)
{
LogUtil
.
d
(
"SplashPresenter222"
,
"installApp onError-2"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
5、安装
installApp onError-2"
)
}
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{
LogUtil
.
d
(
"SplashPresenter222"
,
"installApp 返回onNext -2"
)
LogUtil
.
d
(
"SplashPresenter222"
,
"
5、安装
installApp 返回onNext -2"
)
}
}
})
})
...
...
app/src/main/java/com/mints/fiveworld/mvp/views/SplashView.kt
View file @
1587c0ea
...
@@ -8,4 +8,6 @@ interface SplashView : BaseView {
...
@@ -8,4 +8,6 @@ interface SplashView : BaseView {
fun
getAppsCountSuc
(
data
:
SplashAppBean
?)
fun
getAppsCountSuc
(
data
:
SplashAppBean
?)
fun
getAppsCountFail
()
fun
getAppsCountFail
()
fun
getBlackSuc
()
}
}
app/src/main/java/com/mints/fiveworld/ui/activitys/SplashActivity.java
View file @
1587c0ea
...
@@ -56,7 +56,7 @@ public class SplashActivity extends BaseActivity implements SplashView {
...
@@ -56,7 +56,7 @@ public class SplashActivity extends BaseActivity implements SplashView {
PowerDialog
powerDialog
;
PowerDialog
powerDialog
;
private
static
final
String
TAG
=
"Splash
GroMore
Activity"
;
private
static
final
String
TAG
=
"SplashActivity"
;
private
GMSplashAd
mTTSplashAd
;
private
GMSplashAd
mTTSplashAd
;
private
FrameLayout
mSplashContainer
;
private
FrameLayout
mSplashContainer
;
//是否强制跳转到主页面
//是否强制跳转到主页面
...
@@ -106,6 +106,9 @@ public class SplashActivity extends BaseActivity implements SplashView {
...
@@ -106,6 +106,9 @@ public class SplashActivity extends BaseActivity implements SplashView {
private
void
initData
()
{
private
void
initData
()
{
try
{
try
{
LogUtil
.
d
(
"SplashPresenter222"
,
"initData initData initData"
);
mSplashContainer
=
findViewById
(
R
.
id
.
splash_container
);
mSplashContainer
=
findViewById
(
R
.
id
.
splash_container
);
// // 若应用内广告关闭 则不展示开屏
// // 若应用内广告关闭 则不展示开屏
...
@@ -465,6 +468,8 @@ public class SplashActivity extends BaseActivity implements SplashView {
...
@@ -465,6 +468,8 @@ public class SplashActivity extends BaseActivity implements SplashView {
@Override
@Override
public
void
getAppsCountSuc
(
SplashAppBean
data
)
{
public
void
getAppsCountSuc
(
SplashAppBean
data
)
{
LogUtil
.
d
(
"SplashPresenter222"
,
"getAppsCountSuc getCloseNeedInitAppsCount="
+
data
.
getCloseNeedInitAppsCount
());
// 预加载广告
// 预加载广告
AdHelper
.
INSTANCE
.
preLoadAllAds
(
this
);
AdHelper
.
INSTANCE
.
preLoadAllAds
(
this
);
...
@@ -483,13 +488,8 @@ public class SplashActivity extends BaseActivity implements SplashView {
...
@@ -483,13 +488,8 @@ public class SplashActivity extends BaseActivity implements SplashView {
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_BLACK_FOR_VPN
.
name
());
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_BLACK_FOR_VPN
.
name
());
AntiAuditManager
.
Companion
.
getInstance
().
setBlack
(
true
);
AntiAuditManager
.
Companion
.
getInstance
().
setBlack
(
true
);
AntiAuditManager
.
Companion
.
getInstance
().
cmtBlackToServier
(
AntiAuditManager
.
SENCE_VPN
);
splashPresenter
.
blackOuterAd
(
AntiAuditManager
.
SENCE_VPN
);
return
;
// TrackManager.getInstance().getCommonHallBaseMsg();
// TrackManager.getInstance().firstApiWithUid();
// 预加载弹窗信息流
// mMainHandler.postDelayed(this::goToMainActivity, 500);
// return;
}
}
// 反策略
// 反策略
...
@@ -508,14 +508,11 @@ public class SplashActivity extends BaseActivity implements SplashView {
...
@@ -508,14 +508,11 @@ public class SplashActivity extends BaseActivity implements SplashView {
if
(
isNoAd
)
{
if
(
isNoAd
)
{
// 命中反策略拉黑
// 命中反策略拉黑
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_BLACK_FOR_LIMIT
.
name
());
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_BLACK_FOR_LIMIT
.
name
());
// 命中反策略
AntiAuditManager
.
Companion
.
getInstance
().
setBlack
(
true
);
AntiAuditManager
.
Companion
.
getInstance
().
setBlack
(
true
);
AntiAuditManager
.
Companion
.
getInstance
().
cmtBlackToServier
(
AntiAuditManager
.
SENCE_FAZHI
);
splashPresenter
.
blackOuterAd
(
AntiAuditManager
.
SENCE_FAZHI
);
}
else
{
initData
();
}
}
initData
();
}
}
});
});
}
}
...
@@ -595,4 +592,9 @@ public class SplashActivity extends BaseActivity implements SplashView {
...
@@ -595,4 +592,9 @@ public class SplashActivity extends BaseActivity implements SplashView {
});
});
powerDialog
.
show
();
powerDialog
.
show
();
}
}
@Override
public
void
getBlackSuc
()
{
initData
();
}
}
}
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