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
b10ac2b7
Commit
b10ac2b7
authored
Nov 08, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加同5逻辑
parent
9057d989
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1102 additions
and
697 deletions
+1102
-697
AdReportManager.kt
app/src/main/java/com/mints/fiveworld/ad/AdReportManager.kt
+13
-0
InSceneFull.java
...rc/main/java/com/mints/fiveworld/ad/full/InSceneFull.java
+2
-0
NewInSceneFull.java
...main/java/com/mints/fiveworld/ad/half/NewInSceneFull.java
+2
-0
AppConfig.java
app/src/main/java/com/mints/fiveworld/common/AppConfig.java
+2
-0
Constant.kt
app/src/main/java/com/mints/fiveworld/common/Constant.kt
+6
-0
MateTimerManager.java
.../java/com/mints/fiveworld/keepalive/MateTimerManager.java
+177
-0
AntiAuditManager.kt
...m/mints/fiveworld/keepalive/appswitch/AntiAuditManager.kt
+17
-19
TrackManager.java
...c/main/java/com/mints/fiveworld/manager/TrackManager.java
+7
-0
WifiDataManager.kt
.../java/com/mints/fiveworld/manager/wifi/WifiDataManager.kt
+649
-580
OutAppConfig.java
...main/java/com/mints/fiveworld/mvp/model/OutAppConfig.java
+18
-0
SplashAppBean.kt
.../main/java/com/mints/fiveworld/mvp/model/SplashAppBean.kt
+3
-1
SplashPresenter.kt
...ava/com/mints/fiveworld/mvp/presenters/SplashPresenter.kt
+105
-65
TrackPresenter.java
...va/com/mints/fiveworld/mvp/presenters/TrackPresenter.java
+52
-2
LoanService.java
app/src/main/java/com/mints/fiveworld/net/LoanService.java
+15
-3
AboutusActivity.kt
.../java/com/mints/fiveworld/ui/activitys/AboutusActivity.kt
+4
-2
MainActivity.kt
...ain/java/com/mints/fiveworld/ui/activitys/MainActivity.kt
+5
-5
SplashActivity.java
...java/com/mints/fiveworld/ui/activitys/SplashActivity.java
+15
-1
WifiFragment.kt
...main/java/com/mints/fiveworld/ui/fragment/WifiFragment.kt
+6
-5
Utils.java
app/src/main/java/com/mints/fiveworld/utils/Utils.java
+4
-14
No files found.
app/src/main/java/com/mints/fiveworld/ad/AdReportManager.kt
View file @
b10ac2b7
...
@@ -175,6 +175,19 @@ object AdReportManager {
...
@@ -175,6 +175,19 @@ object AdReportManager {
EVENT_TYPE_SCENCE_ALL_SWITCH_CLOSE
(
"402"
),
// 总开关 关闭-新
EVENT_TYPE_SCENCE_ALL_SWITCH_CLOSE
(
"402"
),
// 总开关 关闭-新
EVENT_TYPE_SCENCE_SWITCH_CLOSE
(
"403"
),
// 场景开关 关闭-新
EVENT_TYPE_SCENCE_SWITCH_CLOSE
(
"403"
),
// 场景开关 关闭-新
EVENT_TYPE_SCENCE_UID_NULL_LOGIN
(
"404"
),
// 定时10分钟调用server接口-点击同意后 若uid为空 调用登录接口
EVENT_TYPE_SCENCE_UID_NULL_LOGIN
(
"404"
),
// 定时10分钟调用server接口-点击同意后 若uid为空 调用登录接口
EVENT_TYPE_MATE_TIMER_INIT
(
"600"
),
// 体内 - 启动页 初始化匹配定时器
EVENT_TYPE_SCENCE_IN_SPLASH_AGREE
(
"601"
),
// 体内 - 启动页 点击同意
EVENT_TYPE_SCENCE_IN_SPLASH_DEVICESUC
(
"602"
),
// 体内 - 启动页 上传设备信息成功调用10秒接口
EVENT_TYPE_MATE_TIMER_GET
(
"603"
),
// 体内 - 匹配定时器请求服务10秒接口
EVENT_TYPE_MATE_TIMER_STOP
(
"604"
),
// 体内 - 匹配定时器停止
EVENT_TYPE_MATE_TIMER_SUC
(
"605"
),
// 体内 - 匹配定时器server返回结果匹配成功
EVENT_TYPE_SCENCE_IN_AD_HOT
(
"606"
),
// 体内 -定时器小火箭页 应用内广告不展示
EVENT_TYPE_SCENCE_IN_FIVE_HOT
(
"607"
),
// 体内 -定时器小火箭页 应用内不是同5
EVENT_TYPE_SCENCE_IN_FIVE_SHOW
(
"608"
),
// 体内 -定时器小火箭页 展示
EVENT_TYPE_SCENCE_IN_FIVE_ENTER
(
"609"
),
// 体内 -同5逻辑 进入逻辑校验
EVENT_TYPE_SCENCE_IN_FIVE_ENTER_HIT
(
"610"
),
// 体内 -同5逻辑 命中 - 不展示广告
EVENT_TYPE_SCENCE_IN_FIVE_ENTER_NO_HIT
(
"611"
),
// 体内 -同5逻辑 未命中 - 不展示广告
}
}
enum
class
AdActivityType
(
val
value
:
String
)
{
enum
class
AdActivityType
(
val
value
:
String
)
{
...
...
app/src/main/java/com/mints/fiveworld/ad/full/InSceneFull.java
View file @
b10ac2b7
...
@@ -15,6 +15,7 @@ import com.bytedance.msdk.api.v2.slot.GMAdSlotFullVideo;
...
@@ -15,6 +15,7 @@ import com.bytedance.msdk.api.v2.slot.GMAdSlotFullVideo;
import
com.mints.fiveworld.ad.AdHelper
;
import
com.mints.fiveworld.ad.AdHelper
;
import
com.mints.fiveworld.ad.AdReportManager
;
import
com.mints.fiveworld.ad.AdReportManager
;
import
com.mints.fiveworld.ad.wifi.WifiAdStatusListener
;
import
com.mints.fiveworld.ad.wifi.WifiAdStatusListener
;
import
com.mints.fiveworld.common.AppConfig
;
import
com.mints.fiveworld.common.Constant
;
import
com.mints.fiveworld.common.Constant
;
import
com.mints.fiveworld.manager.TrackManager
;
import
com.mints.fiveworld.manager.TrackManager
;
import
com.mints.fiveworld.manager.UserManager
;
import
com.mints.fiveworld.manager.UserManager
;
...
@@ -353,6 +354,7 @@ public class InSceneFull {
...
@@ -353,6 +354,7 @@ public class InSceneFull {
@Override
@Override
public
void
onFullVideoAdClosed
()
{
public
void
onFullVideoAdClosed
()
{
AppConfig
.
inAdShowing
=
false
;
if
(
wifiAdStatusListener
!=
null
)
if
(
wifiAdStatusListener
!=
null
)
wifiAdStatusListener
.
adClose
();
wifiAdStatusListener
.
adClose
();
...
...
app/src/main/java/com/mints/fiveworld/ad/half/NewInSceneFull.java
View file @
b10ac2b7
...
@@ -15,6 +15,7 @@ import com.bytedance.msdk.api.v2.slot.GMAdSlotFullVideo;
...
@@ -15,6 +15,7 @@ import com.bytedance.msdk.api.v2.slot.GMAdSlotFullVideo;
import
com.mints.fiveworld.ad.AdHelper
;
import
com.mints.fiveworld.ad.AdHelper
;
import
com.mints.fiveworld.ad.AdReportManager
;
import
com.mints.fiveworld.ad.AdReportManager
;
import
com.mints.fiveworld.ad.wifi.WifiAdStatusListener
;
import
com.mints.fiveworld.ad.wifi.WifiAdStatusListener
;
import
com.mints.fiveworld.common.AppConfig
;
import
com.mints.fiveworld.common.Constant
;
import
com.mints.fiveworld.common.Constant
;
import
com.mints.fiveworld.manager.TrackManager
;
import
com.mints.fiveworld.manager.TrackManager
;
import
com.mints.fiveworld.manager.UserManager
;
import
com.mints.fiveworld.manager.UserManager
;
...
@@ -350,6 +351,7 @@ public class NewInSceneFull {
...
@@ -350,6 +351,7 @@ public class NewInSceneFull {
@Override
@Override
public
void
onFullVideoAdClosed
()
{
public
void
onFullVideoAdClosed
()
{
AppConfig
.
inAdShowing
=
false
;
if
(
wifiAdStatusListener
!=
null
)
if
(
wifiAdStatusListener
!=
null
)
wifiAdStatusListener
.
adClose
();
wifiAdStatusListener
.
adClose
();
...
...
app/src/main/java/com/mints/fiveworld/common/AppConfig.java
View file @
b10ac2b7
...
@@ -47,4 +47,6 @@ public class AppConfig {
...
@@ -47,4 +47,6 @@ public class AppConfig {
// 网赚总开关 默认开
// 网赚总开关 默认开
public
static
boolean
openMoney
=
true
;
public
static
boolean
openMoney
=
true
;
// 应用内普通 插屏和全屏开关
public
static
boolean
inAdShowing
=
false
;
}
}
app/src/main/java/com/mints/fiveworld/common/Constant.kt
View file @
b10ac2b7
...
@@ -109,4 +109,10 @@ object Constant {
...
@@ -109,4 +109,10 @@ object Constant {
const
val
REGISTER_FLAG
=
"REGISTER_FLAG"
//服务协议
const
val
REGISTER_FLAG
=
"REGISTER_FLAG"
//服务协议
const
val
PRIVACY_FLAG
=
"PRIVACY_FLAG"
//隐私协议
const
val
PRIVACY_FLAG
=
"PRIVACY_FLAG"
//隐私协议
const
val
BOTTOM_FLAG
=
"BOTTOM_FLAG"
//滑动底部
const
val
BOTTOM_FLAG
=
"BOTTOM_FLAG"
//滑动底部
const
val
SPLASH_10_MATE
=
"SPLASH_10_MATE"
//启动页10秒
const
val
TIMER_10_MATE
=
"TIMER_10_MATE"
//定时10秒
// 是否第一次显示小火箭 true-是
const
val
IS_ONE_HOTPAGE
=
"IS_ONE_HOTPAGE"
}
}
app/src/main/java/com/mints/fiveworld/keepalive/MateTimerManager.java
0 → 100644
View file @
b10ac2b7
package
com
.
mints
.
fiveworld
.
keepalive
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.os.Message
;
import
androidx.annotation.NonNull
;
import
com.mints.fiveworld.ad.AdReportManager
;
import
com.mints.fiveworld.common.AppConfig
;
import
com.mints.fiveworld.common.Constant
;
import
com.mints.fiveworld.manager.AppPreferencesManager
;
import
com.mints.fiveworld.manager.TrackManager
;
import
com.mints.fiveworld.manager.UmengManager
;
import
com.mints.fiveworld.manager.wifi.WifiDataManager
;
import
com.mints.fiveworld.ui.activitys.IncreasespeedActivity
;
import
com.mints.fiveworld.utils.ForegroundOrBackground
;
import
com.mints.fiveworld.utils.LogUtil
;
/**
* 描述:匹配定时
* 作者:孟崔广
* 邮箱:mengcg@xiaojinqb.cn
*/
public
class
MateTimerManager
implements
Handler
.
Callback
{
private
static
final
String
TAG
=
"MateTimerManager"
;
private
static
volatile
MateTimerManager
_inst
;
private
static
final
long
CHECK_INTERVAL
=
10
*
1000
;
//10秒
private
static
final
int
MSG1
=
1002
;
public
Handler
mHandler
=
null
;
public
static
MateTimerManager
getInstance
()
{
if
(
_inst
==
null
)
{
synchronized
(
MateTimerManager
.
class
)
{
if
(
_inst
==
null
)
{
_inst
=
new
MateTimerManager
();
}
}
}
return
_inst
;
}
private
MateTimerManager
()
{
}
public
void
init
()
{
AdReportManager
.
INSTANCE
.
eventScene
(
AdReportManager
.
INNER_IN
,
System
.
currentTimeMillis
(),
Constant
.
CARRIER_TIMER
,
""
,
AdReportManager
.
EventType
.
EVENT_TYPE_MATE_TIMER_INIT
.
getValue
());
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_MATE_TIMER_INIT
.
name
());
if
(
mHandler
!=
null
)
{
mHandler
.
removeCallbacksAndMessages
(
null
);
}
mHandler
=
new
Handler
(
Looper
.
getMainLooper
(),
this
);
mHandler
.
sendEmptyMessageDelayed
(
MSG1
,
CHECK_INTERVAL
);
}
@Override
public
boolean
handleMessage
(
@NonNull
Message
msg
)
{
if
(
msg
.
what
==
MSG1
)
{
LogUtil
.
d
(
TAG
,
"handleMessage"
);
TrackManager
.
getInstance
().
splashTenMate
(
Constant
.
TIMER_10_MATE
);
AdReportManager
.
INSTANCE
.
eventScene
(
AdReportManager
.
INNER_IN
,
System
.
currentTimeMillis
(),
Constant
.
CARRIER_TIMER
,
""
,
AdReportManager
.
EventType
.
EVENT_TYPE_MATE_TIMER_GET
.
getValue
());
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_MATE_TIMER_GET
.
name
());
if
(
mHandler
!=
null
){
mHandler
.
sendEmptyMessageDelayed
(
MSG1
,
CHECK_INTERVAL
);
}
}
return
false
;
}
public
void
stopTimer
()
{
readyGoHotPage
();
AdReportManager
.
INSTANCE
.
eventScene
(
AdReportManager
.
INNER_IN
,
System
.
currentTimeMillis
(),
Constant
.
CARRIER_TIMER
,
""
,
AdReportManager
.
EventType
.
EVENT_TYPE_MATE_TIMER_STOP
.
getValue
());
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_MATE_TIMER_STOP
.
name
());
if
(
mHandler
!=
null
)
{
mHandler
.
removeCallbacksAndMessages
(
null
);
mHandler
=
null
;
}
}
/**
* 匹配成功跳转小火箭页面
* 触发时机:定时和体内 全屏或插屏广告点击关闭回调
*/
public
void
readyGoHotPage
()
{
Activity
context
=
ForegroundOrBackground
.
getApp_activity
();
if
(
context
==
null
)
return
;
// 若体内 全屏或插屏动画展示时 直接返回
if
(
AppConfig
.
isShowInsertScreen
)
return
;
// 如果展示过一次则返回
if
(!
AppPreferencesManager
.
INSTANCE
.
get
().
getBoolean
(
Constant
.
IS_ONE_HOTPAGE
,
true
))
{
return
;
}
// 应用内广告开关 为关则返回
if
(!
WifiDataManager
.
INSTANCE
.
getAppInAdSwitch
())
{
AdReportManager
.
INSTANCE
.
eventScene
(
AdReportManager
.
INNER_IN
,
System
.
currentTimeMillis
(),
Constant
.
CARRIER_TIMER
,
""
,
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_IN_AD_HOT
.
getValue
());
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_IN_AD_HOT
.
name
());
return
;
}
// 应用内同5 为开则返回
if
(
WifiDataManager
.
INSTANCE
.
getAppInFive
())
{
AdReportManager
.
INSTANCE
.
eventScene
(
AdReportManager
.
INNER_IN
,
System
.
currentTimeMillis
(),
Constant
.
CARRIER_TIMER
,
""
,
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_IN_FIVE_HOT
.
getValue
());
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_IN_FIVE_HOT
.
name
());
return
;
}
// 跳转界面
AdReportManager
.
INSTANCE
.
eventScene
(
AdReportManager
.
INNER_IN
,
System
.
currentTimeMillis
(),
Constant
.
CARRIER_TIMER
,
""
,
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_IN_FIVE_SHOW
.
getValue
());
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_IN_FIVE_SHOW
.
name
());
AppPreferencesManager
.
INSTANCE
.
get
().
put
(
Constant
.
IS_ONE_HOTPAGE
,
false
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_BOOST
);
readyGo
(
context
,
IncreasespeedActivity
.
class
,
bundle
);
}
private
void
readyGo
(
Context
context
,
Class
<?>
clazz
,
Bundle
bundle
)
{
Intent
intent
=
new
Intent
(
context
,
clazz
);
if
(
null
!=
bundle
)
{
intent
.
putExtras
(
bundle
);
}
context
.
startActivity
(
intent
);
}
}
app/src/main/java/com/mints/fiveworld/keepalive/appswitch/AntiAuditManager.kt
View file @
b10ac2b7
...
@@ -93,31 +93,29 @@ class AntiAuditManager private constructor() {
...
@@ -93,31 +93,29 @@ class AntiAuditManager private constructor() {
*
*
* adflag=true 可以看广告且是白名单
* adflag=true 可以看广告且是白名单
*/
*/
fun
resetBlack
(
adflag
:
Boolean
,
senceType
:
String
)
{
fun
resetBlack
(
inadflag
:
Boolean
,
out
adflag
:
Boolean
,
senceType
:
String
)
{
LogUtil
.
d
(
TAG
,
"重置黑名单
adflag=true 可以看广告且是白名单 -> $
adflag"
)
LogUtil
.
d
(
TAG
,
"重置黑名单
-> inadflag=$inadflag outadflag=$out
adflag"
)
if
(
adflag
)
{
if
(!
inadflag
&&
!
outadflag
)
{
// 服务器不拉黑
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_BLACK_FOR_SERVER
.
name
)
}
else
{
// 服务器拉黑
// 服务器拉黑
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_BLACK_FOR_SERVER_BLACK
.
name
)
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_BLACK_FOR_SERVER_BLACK
.
name
)
// 黑名单
sp
.
put
(
APP_OUT_BLACK
,
true
)
}
else
{
// 黑名单
sp
.
put
(
APP_OUT_BLACK
,
false
)
}
}
// 黑名单
sp
.
put
(
APP_OUT_BLACK
,
!
adflag
)
// 应用外广告总开关
// 广告总开关
sp
.
put
(
WifiDataManager
.
APP_OUT_SWITCH
,
outadflag
)
sp
.
put
(
WifiDataManager
.
APP_OUT_SWITCH
,
adflag
)
WifiDataManager
.
setAppInAdSwitch
(
in
adflag
)
AdReportManager
.
eventScene
(
AdReportManager
.
eventScene
(
AdReportManager
.
INNER_OUT
,
AdReportManager
.
INNER_OUT
,
System
.
currentTimeMillis
(),
System
.
currentTimeMillis
(),
senceType
,
senceType
,
"后台返回广告重置状态=${adflag} 黑名单状态=${sp.getBoolean(APP_OUT_BLACK)} 广告总开关=${
"后台返回广告重置状态=inadflag=$inadflag outadflag=$outadflag 黑名单状态=${sp.getBoolean(APP_OUT_BLACK)}"
,
sp
.
getBoolean
(
WifiDataManager
.
APP_OUT_SWITCH
)
}
",
AdReportManager
.
EVENT_TYPE_SCENCE_CLOSE
AdReportManager
.
EVENT_TYPE_SCENCE_CLOSE
)
)
}
}
...
...
app/src/main/java/com/mints/fiveworld/manager/TrackManager.java
View file @
b10ac2b7
...
@@ -161,4 +161,11 @@ public class TrackManager {
...
@@ -161,4 +161,11 @@ public class TrackManager {
trackPresenter
.
tempaddCallImp
(
vo
);
trackPresenter
.
tempaddCallImp
(
vo
);
}
}
}
}
public
void
splashTenMate
(
String
type
)
{
if
(
trackPresenter
!=
null
&&
!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
getUserID
()))
{
trackPresenter
.
splashTenMate
(
type
);
}
}
}
}
app/src/main/java/com/mints/fiveworld/manager/wifi/WifiDataManager.kt
View file @
b10ac2b7
...
@@ -78,9 +78,38 @@ object WifiDataManager {
...
@@ -78,9 +78,38 @@ object WifiDataManager {
const
val
LOW_STORAGE
=
"LOW_STORAGE"
const
val
LOW_STORAGE
=
"LOW_STORAGE"
private
const
val
LOW_STORAGE_SWITCH
=
"LOW_STORAGE_SWITCH"
private
const
val
LOW_STORAGE_SWITCH
=
"LOW_STORAGE_SWITCH"
// 总开关
// 服务器下发本地定时间隔
private
const
val
LOCAL_HOME_TIME_INTERVAL
=
"LOCAL_HOME_TIME_INTERVAL"
// 体外场景总开关
const
val
APP_OUT_SWITCH
=
"APP_OUT_SWITCH"
const
val
APP_OUT_SWITCH
=
"APP_OUT_SWITCH"
// 体内广告总开关 默认开
const
val
APP_IN_AD_SWITCH
=
"APP_IN_AD_SWITCH"
// 体内同5开关 默认开
const
val
APP_IN_FIVE
=
"APP_IN_FIVE"
// 上次加速操作时间
const
val
FAKE_BOOST_TIME
=
"FAKE_BOOST_TIME"
// 上次清理操作时间
const
val
FAKE_CLEAN_TIME
=
"FAKE_CLEAN_TIME"
// 上次省电操作时间
const
val
FAKE_SAVE_BATTERY_TIME
=
"FAKE_SAVE_BATTERY_TIME"
// 上次省电降温操作时间
const
val
FAKE_SAVE_BATTERYLOW_TIME
=
"FAKE_SAVE_BATTERYLOW_TIME"
// 上次安全检测操作时间
const
val
FAKE_SAFE_CHECK_TIME
=
"FAKE_SAFE_CHECK_TIME"
// 上次网络测速操作时间
const
val
FAKE_SPEED_TEST_TIME
=
"FAKE_SPEED_TEST_TIME"
// 上次Wifi提速操作时间
const
val
FAKE_SPEED_FAST_TIME
=
"FAKE_SPEED_FAST_TIME"
// 锁屏 单位:次数
// 锁屏 单位:次数
var
LOCK_TIMES
=
120
var
LOCK_TIMES
=
120
...
@@ -146,9 +175,6 @@ object WifiDataManager {
...
@@ -146,9 +175,6 @@ object WifiDataManager {
// 服务器下发本地Home页展示插屏百分比,总值为100
// 服务器下发本地Home页展示插屏百分比,总值为100
private
const
val
LOCAL_HOME_INSCREEN_PERCENTAGE
=
"LOCAL_HOME_INSCREEN_PERCENTAGE"
private
const
val
LOCAL_HOME_INSCREEN_PERCENTAGE
=
"LOCAL_HOME_INSCREEN_PERCENTAGE"
// 服务器下发本地定时间隔
private
const
val
LOCAL_HOME_TIME_INTERVAL
=
"LOCAL_HOME_TIME_INTERVAL"
// 服务器下发本地Home页展示插屏百分比,总值为100
// 服务器下发本地Home页展示插屏百分比,总值为100
// private const val LOCAL_TIMING_SHOW_WHEN_SCREEN_ON_PERCENTAGE =
// private const val LOCAL_TIMING_SHOW_WHEN_SCREEN_ON_PERCENTAGE =
// "LOCAL_TIMING_SHOW_WHEN_SCREEN_ON_PERCENTAGE"
// "LOCAL_TIMING_SHOW_WHEN_SCREEN_ON_PERCENTAGE"
...
@@ -209,7 +235,7 @@ object WifiDataManager {
...
@@ -209,7 +235,7 @@ object WifiDataManager {
}
}
// 开关关闭 return
// 开关关闭 return
if
(!
sp
.
getBoolean
(
PHONE_OFF_SWITCH
,
tru
e
))
{
if
(!
sp
.
getBoolean
(
PHONE_OFF_SWITCH
,
fals
e
))
{
UmengManager
.
onEventArgs
(
UmengManager
.
onEventArgs
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_SWITCH_CLOSE
.
name
,
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_SWITCH_CLOSE
.
name
,
PHONE_OFF_SWITCH
PHONE_OFF_SWITCH
...
@@ -1553,6 +1579,9 @@ object WifiDataManager {
...
@@ -1553,6 +1579,9 @@ object WifiDataManager {
*/
*/
fun
resetServerSumCountData
(
data
:
OutAppConfig
)
{
fun
resetServerSumCountData
(
data
:
OutAppConfig
)
{
setAppInAdSwitch
(
data
.
isInnerAdOpen
)
setAppInFive
(
data
.
isT5LogicOpen
)
// 设置总阀值个数
// 设置总阀值个数
if
(
data
.
closeNeedInitAppsCount
>
0
)
{
if
(
data
.
closeNeedInitAppsCount
>
0
)
{
AntiAuditManager
.
instance
.
setSumCount
(
data
.
closeNeedInitAppsCount
)
AntiAuditManager
.
instance
.
setSumCount
(
data
.
closeNeedInitAppsCount
)
...
@@ -1812,7 +1841,7 @@ object WifiDataManager {
...
@@ -1812,7 +1841,7 @@ object WifiDataManager {
/**
/**
* 获取服务器下发应用外百分比
* 获取服务器下发应用外百分比
*/
*/
fun
getServerOutAutoenterPercentage
()
=
sp
.
getInt
(
SERVER_OUT_AUTOENTER_PERCENTAGE
,
5
0
)
fun
getServerOutAutoenterPercentage
()
=
sp
.
getInt
(
SERVER_OUT_AUTOENTER_PERCENTAGE
,
1
0
)
/**
/**
* 设置服务器下发应用外百分比
* 设置服务器下发应用外百分比
...
@@ -1869,6 +1898,60 @@ object WifiDataManager {
...
@@ -1869,6 +1898,60 @@ object WifiDataManager {
*/
*/
fun
getHomeInscreenPercentage
()
=
sp
.
getInt
(
LOCAL_HOME_INSCREEN_PERCENTAGE
,
0
)
fun
getHomeInscreenPercentage
()
=
sp
.
getInt
(
LOCAL_HOME_INSCREEN_PERCENTAGE
,
0
)
fun
getAppInAdSwitch
()
=
sp
.
getBoolean
(
APP_IN_AD_SWITCH
,
true
)
fun
setAppInAdSwitch
(
value
:
Boolean
)
{
sp
.
put
(
APP_IN_AD_SWITCH
,
value
)
}
fun
getAppInFive
()
=
sp
.
getBoolean
(
APP_IN_FIVE
,
true
)
fun
setAppInFive
(
value
:
Boolean
)
{
sp
.
put
(
APP_IN_FIVE
,
value
)
}
fun
getFakeBoostTime
()
=
sp
.
getLong
(
FAKE_BOOST_TIME
,
0L
)
fun
setFakeBoostTime
(
value
:
Long
)
{
sp
.
put
(
FAKE_BOOST_TIME
,
value
)
}
fun
getFakeCleanTime
()
=
sp
.
getLong
(
FAKE_CLEAN_TIME
,
0L
)
fun
setFakeCleanTime
(
value
:
Long
)
{
sp
.
put
(
FAKE_CLEAN_TIME
,
value
)
}
fun
getFakeSaveBatteryTime
()
=
sp
.
getLong
(
FAKE_SAVE_BATTERY_TIME
,
0L
)
fun
setFakeSaveBatteryTime
(
value
:
Long
)
{
sp
.
put
(
FAKE_SAVE_BATTERY_TIME
,
value
)
}
fun
getFakeSaveBatteryLowTime
()
=
sp
.
getLong
(
FAKE_SAVE_BATTERYLOW_TIME
,
0L
)
fun
setFakeSaveBatteryLowTime
(
value
:
Long
)
{
sp
.
put
(
FAKE_SAVE_BATTERYLOW_TIME
,
value
)
}
fun
getFakeSaveCheckTime
()
=
sp
.
getLong
(
FAKE_SAFE_CHECK_TIME
,
0L
)
fun
setFakeSaveCheckTime
(
value
:
Long
)
{
sp
.
put
(
FAKE_SAFE_CHECK_TIME
,
value
)
}
fun
getFakeSpeedTestTime
()
=
sp
.
getLong
(
FAKE_SPEED_TEST_TIME
,
0L
)
fun
setFakeSpeedTestTime
(
value
:
Long
)
{
sp
.
put
(
FAKE_SPEED_TEST_TIME
,
value
)
}
fun
getFakeSpeedFastTime
()
=
sp
.
getLong
(
FAKE_SPEED_FAST_TIME
,
0L
)
fun
setFakeSpeedFastTime
(
value
:
Long
)
{
sp
.
put
(
FAKE_SPEED_FAST_TIME
,
value
)
}
/**
/**
* 设置本地定时展示时间间隔
* 设置本地定时展示时间间隔
*/
*/
...
@@ -1880,18 +1963,4 @@ object WifiDataManager {
...
@@ -1880,18 +1963,4 @@ object WifiDataManager {
* 获取本地定时展示时间间隔
* 获取本地定时展示时间间隔
*/
*/
fun
getHomeTimeInterval
()
=
sp
.
getInt
(
LOCAL_HOME_TIME_INTERVAL
,
10
)
fun
getHomeTimeInterval
()
=
sp
.
getInt
(
LOCAL_HOME_TIME_INTERVAL
,
10
)
// /**
// * 设置本地定时在亮屏后展示百分比
// */
// fun setTimingShowWhenScreenOnPercentage(value: Int) {
// sp.put(LOCAL_TIMING_SHOW_WHEN_SCREEN_ON_PERCENTAGE, value)
// }
//
// /**
// * 获取本地定时在亮屏后展示百分比
// */
// fun getTimingShowWhenScreenOnPercentage() =
// sp.getInt(LOCAL_TIMING_SHOW_WHEN_SCREEN_ON_PERCENTAGE, 0)
}
}
\ No newline at end of file
app/src/main/java/com/mints/fiveworld/mvp/model/OutAppConfig.java
View file @
b10ac2b7
...
@@ -14,6 +14,8 @@ public class OutAppConfig implements Serializable {
...
@@ -14,6 +14,8 @@ public class OutAppConfig implements Serializable {
*/
*/
private
boolean
open
;
// 只是当前用户 应用外广告关闭,不是永久拉黑的关闭
private
boolean
open
;
// 只是当前用户 应用外广告关闭,不是永久拉黑的关闭
private
boolean
innerAdOpen
=
true
;
// 应用内广告开关
private
boolean
t5LogicOpen
=
true
;
// 应用内同5开关
private
int
closeNeedInitAppsCount
;
// 反审核阀值
private
int
closeNeedInitAppsCount
;
// 反审核阀值
public
int
getCloseNeedInitAppsCount
()
{
public
int
getCloseNeedInitAppsCount
()
{
...
@@ -49,6 +51,22 @@ public class OutAppConfig implements Serializable {
...
@@ -49,6 +51,22 @@ public class OutAppConfig implements Serializable {
return
open
;
return
open
;
}
}
public
boolean
isInnerAdOpen
()
{
return
innerAdOpen
;
}
public
void
setInnerAdOpen
(
boolean
innerAdOpen
)
{
this
.
innerAdOpen
=
innerAdOpen
;
}
public
boolean
isT5LogicOpen
()
{
return
t5LogicOpen
;
}
public
void
setT5LogicOpen
(
boolean
t5LogicOpen
)
{
this
.
t5LogicOpen
=
t5LogicOpen
;
}
public
void
setOpen
(
boolean
open
)
{
public
void
setOpen
(
boolean
open
)
{
this
.
open
=
open
;
this
.
open
=
open
;
}
}
...
...
app/src/main/java/com/mints/fiveworld/mvp/model/SplashAppBean.kt
View file @
b10ac2b7
...
@@ -5,5 +5,7 @@ import java.io.Serializable
...
@@ -5,5 +5,7 @@ import java.io.Serializable
data class
SplashAppBean
(
data class
SplashAppBean
(
val
closeNeedInitAppsCount
:
Int
=
12
,
val
closeNeedInitAppsCount
:
Int
=
12
,
val
openMoney
:
Boolean
=
true
,
val
openMoney
:
Boolean
=
true
,
val
openAll
:
Boolean
=
true
,
val
openAll
:
Boolean
=
false
,
val
t5LogicOpen
:
Boolean
=
true
,
val
innerAdOpen
:
Boolean
=
true
,
)
:
Serializable
)
:
Serializable
\ No newline at end of file
app/src/main/java/com/mints/fiveworld/mvp/presenters/SplashPresenter.kt
View file @
b10ac2b7
...
@@ -2,8 +2,12 @@ package com.mints.fiveworld.mvp.presenters
...
@@ -2,8 +2,12 @@ package com.mints.fiveworld.mvp.presenters
import
android.text.TextUtils
import
android.text.TextUtils
import
com.mints.fiveworld.MintsApplication
import
com.mints.fiveworld.MintsApplication
import
com.mints.fiveworld.ad.AdReportManager
import
com.mints.fiveworld.common.Constant
import
com.mints.fiveworld.common.DeviceInfo
import
com.mints.fiveworld.common.DeviceInfo
import
com.mints.fiveworld.manager.AppHttpManager
import
com.mints.fiveworld.manager.AppHttpManager
import
com.mints.fiveworld.manager.TrackManager
import
com.mints.fiveworld.manager.UmengManager
import
com.mints.fiveworld.manager.UserManager
import
com.mints.fiveworld.manager.UserManager
import
com.mints.fiveworld.mvp.model.BaseResponse
import
com.mints.fiveworld.mvp.model.BaseResponse
import
com.mints.fiveworld.mvp.model.SplashAppBean
import
com.mints.fiveworld.mvp.model.SplashAppBean
...
@@ -73,7 +77,8 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -73,7 +77,8 @@ class SplashPresenter : BasePresenter<SplashView>() {
200
->
if
(
data
!=
null
)
{
200
->
if
(
data
!=
null
)
{
UserManager
.
getInstance
().
saveUserInfo
(
data
)
UserManager
.
getInstance
().
saveUserInfo
(
data
)
view
.
userRegisterOver
()
view
.
userRegisterOver
()
saveTerminalInfo
(
data
.
consumer
.
pk_id
)
saveTerminalInfo
()
installApp
()
}
}
else
->
view
.
showToast
(
message
)
else
->
view
.
showToast
(
message
)
}
}
...
@@ -84,7 +89,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -84,7 +89,7 @@ class SplashPresenter : BasePresenter<SplashView>() {
/**
/**
* 提交设备信息
* 提交设备信息
*/
*/
private
fun
saveTerminalInfo
(
userId
:
Long
)
{
private
fun
saveTerminalInfo
()
{
val
vo
=
HashMap
<
String
,
Any
>()
val
vo
=
HashMap
<
String
,
Any
>()
val
deviceInfo
:
DeviceInfo
=
DeviceInfo
.
instance
val
deviceInfo
:
DeviceInfo
=
DeviceInfo
.
instance
val
macAddress
:
String
=
deviceInfo
.
getMacAddress
()
val
macAddress
:
String
=
deviceInfo
.
getMacAddress
()
...
@@ -103,7 +108,6 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -103,7 +108,6 @@ class SplashPresenter : BasePresenter<SplashView>() {
vo
[
"uuid"
]
=
DeviceUuidFactory
().
deviceUuid
vo
[
"uuid"
]
=
DeviceUuidFactory
().
deviceUuid
vo
[
"osversion"
]
=
deviceInfo
.
oSVersion
vo
[
"osversion"
]
=
deviceInfo
.
oSVersion
vo
[
"appversion"
]
=
deviceInfo
.
versionName
vo
[
"appversion"
]
=
deviceInfo
.
versionName
vo
[
"device"
]
=
DeviceUuidFactory
().
deviceUuid
.
toString
()
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
saveTerminalInfo
(
vo
),
.
call
(
loanService
.
saveTerminalInfo
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
...
@@ -120,9 +124,45 @@ class SplashPresenter : BasePresenter<SplashView>() {
...
@@ -120,9 +124,45 @@ class SplashPresenter : BasePresenter<SplashView>() {
if
(
isLinkView
)
return
if
(
isLinkView
)
return
when
(
baseResponse
.
status
)
{
when
(
baseResponse
.
status
)
{
200
->
{
200
->
{
// JpushManager.getInstance().setJpushService(userId.toString())
AdReportManager
.
eventExpress
(
AdReportManager
.
INNER_IN
,
AdReportManager
.
EVENT_TYPE_SHOWFAIL
,
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_IN_SPLASH_DEVICESUC
.
value
,
""
,
""
,
""
,
""
,
System
.
currentTimeMillis
(),
"TerminalInfoSuc"
,
""
,
""
,
""
)
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_IN_SPLASH_DEVICESUC
.
name
)
UmengManager
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_MATE_TIMER_GET
.
name
)
TrackManager
.
getInstance
().
splashTenMate
(
Constant
.
SPLASH_10_MATE
)
}
}
}
}
}
})
}
private
fun
installApp
()
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"device"
]
=
DeviceUuidFactory
().
deviceUuid
.
toString
()
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
installApp
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onCompleted
()
{
}
override
fun
onError
(
e
:
Throwable
)
{
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{
}
}
})
})
}
}
...
...
app/src/main/java/com/mints/fiveworld/mvp/presenters/TrackPresenter.java
View file @
b10ac2b7
...
@@ -8,6 +8,7 @@ import com.mints.fiveworld.ad.AdReportManager;
...
@@ -8,6 +8,7 @@ import com.mints.fiveworld.ad.AdReportManager;
import
com.mints.fiveworld.common.Constant
;
import
com.mints.fiveworld.common.Constant
;
import
com.mints.fiveworld.common.DeviceInfo
;
import
com.mints.fiveworld.common.DeviceInfo
;
import
com.mints.fiveworld.common.random.HitChanceConfig
;
import
com.mints.fiveworld.common.random.HitChanceConfig
;
import
com.mints.fiveworld.keepalive.MateTimerManager
;
import
com.mints.fiveworld.keepalive.appswitch.AntiAuditManager
;
import
com.mints.fiveworld.keepalive.appswitch.AntiAuditManager
;
import
com.mints.fiveworld.manager.AppHttpManager
;
import
com.mints.fiveworld.manager.AppHttpManager
;
import
com.mints.fiveworld.manager.AppPreferencesManager
;
import
com.mints.fiveworld.manager.AppPreferencesManager
;
...
@@ -154,7 +155,7 @@ public class TrackPresenter extends BaseTrackPresenter {
...
@@ -154,7 +155,7 @@ public class TrackPresenter extends BaseTrackPresenter {
if
(
baseResponse
.
getStatus
()
==
200
)
{
if
(
baseResponse
.
getStatus
()
==
200
)
{
// 点击同意后 若uid为空 则调用登录接口
// 点击同意后 若uid为空 则调用登录接口
MintsApplication
context
=
MintsApplication
.
getContext
();
MintsApplication
context
=
MintsApplication
.
getContext
();
if
(
context
!=
null
&&
!
com
.
mints
.
fiveworld
.
manager
.
AppPreferencesManager
.
INSTANCE
.
get
(
context
)
if
(
context
!=
null
&&
!
AppPreferencesManager
.
INSTANCE
.
get
(
context
)
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
if
(
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
getUserID
()))
{
if
(
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
getUserID
()))
{
TrackManager
.
getInstance
().
userLogin
();
TrackManager
.
getInstance
().
userLogin
();
...
@@ -173,7 +174,7 @@ public class TrackPresenter extends BaseTrackPresenter {
...
@@ -173,7 +174,7 @@ public class TrackPresenter extends BaseTrackPresenter {
WifiDataManager
.
INSTANCE
.
getNewDay
(
data
.
getTime
(),
data
.
getSetAllToZero
(),
null
);
WifiDataManager
.
INSTANCE
.
getNewDay
(
data
.
getTime
(),
data
.
getSetAllToZero
(),
null
);
WifiDataManager
.
INSTANCE
.
resetServerSumCountData
(
data
.
getOuterConfigs
());
WifiDataManager
.
INSTANCE
.
resetServerSumCountData
(
data
.
getOuterConfigs
());
// 设置本地拉黑标记 由云端控制
// 设置本地拉黑标记 由云端控制
AntiAuditManager
.
Companion
.
getInstance
().
resetBlack
(
data
.
getOuterConfigs
().
isOpen
(),
Constant
.
CARRIER_OUT_TEN_TIME
);
AntiAuditManager
.
Companion
.
getInstance
().
resetBlack
(
data
.
getOuterConfigs
().
is
InnerAdOpen
(),
data
.
getOuterConfigs
().
is
Open
(),
Constant
.
CARRIER_OUT_TEN_TIME
);
}
}
// 设置场景上报接口开头
// 设置场景上报接口开头
...
@@ -283,4 +284,53 @@ public class TrackPresenter extends BaseTrackPresenter {
...
@@ -283,4 +284,53 @@ public class TrackPresenter extends BaseTrackPresenter {
}
}
});
});
}
}
public
void
splashTenMate
(
String
type
)
{
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"uid"
,
UserManager
.
getInstance
().
getUserID
());
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
splashTenMate
(
vo
),
new
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
@Override
public
void
onCompleted
()
{
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onNext
(
BaseResponse
<
JsonObject
>
baseResponse
)
{
// 启动页直接返回
if
(
TextUtils
.
equals
(
type
,
Constant
.
SPLASH_10_MATE
)){
return
;
}
try
{
if
(
baseResponse
.
getStatus
()
==
200
)
{
JsonObject
data
=
baseResponse
.
getData
();
if
(
data
!=
null
)
{
boolean
flag
=
data
.
get
(
"closetimingAndToReqMinsReq"
).
getAsBoolean
();
if
(
flag
)
{
//true-关 请求
MateTimerManager
.
getInstance
().
stopTimer
();
TrackManager
.
getInstance
().
setMinsActive
();
AdReportManager
.
INSTANCE
.
eventScene
(
AdReportManager
.
INNER_IN
,
System
.
currentTimeMillis
(),
Constant
.
CARRIER_TIMER
,
""
,
AdReportManager
.
EventType
.
EVENT_TYPE_MATE_TIMER_SUC
.
getValue
());
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_MATE_TIMER_SUC
.
name
());
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
});
}
}
}
app/src/main/java/com/mints/fiveworld/net/LoanService.java
View file @
b10ac2b7
...
@@ -71,13 +71,13 @@ public interface LoanService {
...
@@ -71,13 +71,13 @@ public interface LoanService {
/**
/**
* 保活10分钟间隔上送后台
* 保活10分钟间隔上送后台
*/
*/
@POST
(
"na/setMinsActive/v1
21
"
)
@POST
(
"na/setMinsActive/v1"
)
Observable
<
BaseResponse
<
WifiActiveBean
>>
setMinsActive121
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
WifiActiveBean
>>
setMinsActive121
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
* 获取应用外广告配置
* 获取应用外广告配置
*/
*/
@POST
(
"common/getOuterAdConfig"
)
@POST
(
"common/getOuterAdConfig
/v1
"
)
Observable
<
BaseResponse
<
OutAppConfig
>>
getOuterAdConfig
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
OutAppConfig
>>
getOuterAdConfig
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
@@ -89,7 +89,7 @@ public interface LoanService {
...
@@ -89,7 +89,7 @@ public interface LoanService {
/**
/**
* 启动页获取反策略个数
* 启动页获取反策略个数
*/
*/
@POST
(
"common/getCloseNeedInitAppsCount"
)
@POST
(
"common/getCloseNeedInitAppsCount
/v1
"
)
Observable
<
BaseResponse
<
SplashAppBean
>>
getCloseNeedInitAppsCount
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
SplashAppBean
>>
getCloseNeedInitAppsCount
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
@@ -106,6 +106,18 @@ public interface LoanService {
...
@@ -106,6 +106,18 @@ public interface LoanService {
@POST
(
"stasticis/adCall/add/tempadd"
)
@POST
(
"stasticis/adCall/add/tempadd"
)
Observable
<
BaseResponse
<
Object
>>
tempaddCallImp
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
Object
>>
tempaddCallImp
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 定时10秒匹配接口
*/
@POST
(
"na/reqAppTimingNextDo/v1"
)
Observable
<
BaseResponse
<
JsonObject
>>
splashTenMate
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 开屏页点击同意调用
*/
@POST
(
"api/installApp"
)
Observable
<
BaseResponse
<
Object
>>
installApp
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
* 默认http工厂
* 默认http工厂
*/
*/
...
...
app/src/main/java/com/mints/fiveworld/ui/activitys/AboutusActivity.kt
View file @
b10ac2b7
...
@@ -49,8 +49,10 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
...
@@ -49,8 +49,10 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
tvAboutasVersion
.
setOnLongClickListener
{
tvAboutasVersion
.
setOnLongClickListener
{
ToastUtil
.
showLong
(
ToastUtil
.
showLong
(
MintsApplication
.
getContext
(),
MintsApplication
.
getContext
(),
"黑名单:"
+
AntiAuditManager
.
instance
.
isBlack
()+
"黑名单:"
+
AntiAuditManager
.
instance
.
isBlack
()
+
"\n 应用外总开关:"
+
AppPreferencesManager
.
get
().
getBoolean
(
WifiDataManager
.
APP_OUT_SWITCH
,
false
)
"\n 应用外总开关:"
+
AppPreferencesManager
.
get
().
getBoolean
(
WifiDataManager
.
APP_OUT_SWITCH
,
false
)
+
"\n 应用内广告总开关:"
+
WifiDataManager
.
getAppInAdSwitch
()
+
"\n 应用内同5开关:"
+
WifiDataManager
.
getAppInFive
()
)
)
true
true
}
}
...
...
app/src/main/java/com/mints/fiveworld/ui/activitys/MainActivity.kt
View file @
b10ac2b7
...
@@ -130,11 +130,11 @@ class MainActivity : BaseActivity(), MainView {
...
@@ -130,11 +130,11 @@ class MainActivity : BaseActivity(), MainView {
}
}
permissionBuilder
.
request
{
_
,
_
,
_
->
permissionBuilder
.
request
{
_
,
_
,
_
->
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
//
bundle.putString(
IncreasespeedActivity
.
INCREASE_TYPE
,
//
IncreasespeedActivity.INCREASE_TYPE,
IncreasespeedActivity
.
INCREASE_BOOST
//
IncreasespeedActivity.INCREASE_BOOST
)
//
)
readyGo
(
IncreasespeedActivity
::
class
.
java
)
//
readyGo(IncreasespeedActivity::class.java)
}
}
}
}
...
...
app/src/main/java/com/mints/fiveworld/ui/activitys/SplashActivity.java
View file @
b10ac2b7
...
@@ -23,6 +23,7 @@ import com.mints.fiveworld.ad.AdReportManager;
...
@@ -23,6 +23,7 @@ import com.mints.fiveworld.ad.AdReportManager;
import
com.mints.fiveworld.common.AppConfig
;
import
com.mints.fiveworld.common.AppConfig
;
import
com.mints.fiveworld.common.Constant
;
import
com.mints.fiveworld.common.Constant
;
import
com.mints.fiveworld.common.DeviceInfo
;
import
com.mints.fiveworld.common.DeviceInfo
;
import
com.mints.fiveworld.keepalive.MateTimerManager
;
import
com.mints.fiveworld.keepalive.appswitch.AntiAuditManager
;
import
com.mints.fiveworld.keepalive.appswitch.AntiAuditManager
;
import
com.mints.fiveworld.manager.AppPreferencesManager
;
import
com.mints.fiveworld.manager.AppPreferencesManager
;
import
com.mints.fiveworld.manager.TrackManager
;
import
com.mints.fiveworld.manager.TrackManager
;
...
@@ -449,7 +450,7 @@ public class SplashActivity extends BaseActivity implements SplashView {
...
@@ -449,7 +450,7 @@ public class SplashActivity extends BaseActivity implements SplashView {
mProgressBar
.
startOneAnim
();
mProgressBar
.
startOneAnim
();
// 设置本地拉黑标记 由云端控制
// 设置本地拉黑标记 由云端控制
AntiAuditManager
.
Companion
.
getInstance
().
resetBlack
(
data
.
getOpenAll
(),
Constant
.
CARRIER_SPLASH
);
AntiAuditManager
.
Companion
.
getInstance
().
resetBlack
(
data
.
get
InnerAdOpen
(),
data
.
get
OpenAll
(),
Constant
.
CARRIER_SPLASH
);
AppConfig
.
openMoney
=
data
.
getOpenMoney
();
AppConfig
.
openMoney
=
data
.
getOpenMoney
();
AntiAuditManager
.
Companion
.
getInstance
().
setSumCount
(
data
.
getCloseNeedInitAppsCount
());
AntiAuditManager
.
Companion
.
getInstance
().
setSumCount
(
data
.
getCloseNeedInitAppsCount
());
...
@@ -462,6 +463,9 @@ public class SplashActivity extends BaseActivity implements SplashView {
...
@@ -462,6 +463,9 @@ public class SplashActivity extends BaseActivity implements SplashView {
AntiAuditManager
.
Companion
.
getInstance
().
setBlack
(
true
);
AntiAuditManager
.
Companion
.
getInstance
().
setBlack
(
true
);
AntiAuditManager
.
Companion
.
getInstance
().
cmtBlackToServier
(
AntiAuditManager
.
SENCE_VPN
);
AntiAuditManager
.
Companion
.
getInstance
().
cmtBlackToServier
(
AntiAuditManager
.
SENCE_VPN
);
// TrackManager.getInstance().getCommonHallBaseMsg();
// TrackManager.getInstance().firstApiWithUid();
// 预加载弹窗信息流
mMainHandler
.
postDelayed
(
this
::
goToMainActivity
,
500
);
mMainHandler
.
postDelayed
(
this
::
goToMainActivity
,
500
);
return
;
return
;
}
}
...
@@ -487,6 +491,12 @@ public class SplashActivity extends BaseActivity implements SplashView {
...
@@ -487,6 +491,12 @@ public class SplashActivity extends BaseActivity implements SplashView {
AntiAuditManager
.
Companion
.
getInstance
().
setBlack
(
true
);
AntiAuditManager
.
Companion
.
getInstance
().
setBlack
(
true
);
AntiAuditManager
.
Companion
.
getInstance
().
cmtBlackToServier
(
AntiAuditManager
.
SENCE_FAZHI
);
AntiAuditManager
.
Companion
.
getInstance
().
cmtBlackToServier
(
AntiAuditManager
.
SENCE_FAZHI
);
// TrackManager.getInstance().getCommonHallBaseMsg();
// TrackManager.getInstance().firstApiWithUid();
// 预加载弹窗信息流
// mProgressBar = findViewById(R.id.progressBar);
// mPreContainer = findViewById(R.id.preContainer);
mProgressBar
.
setCompleteNoAnim
();
mProgressBar
.
setCompleteNoAnim
();
mMainHandler
.
postDelayed
(()
->
goToMainActivity
(),
500
);
mMainHandler
.
postDelayed
(()
->
goToMainActivity
(),
500
);
}
else
{
}
else
{
...
@@ -549,13 +559,17 @@ public class SplashActivity extends BaseActivity implements SplashView {
...
@@ -549,13 +559,17 @@ public class SplashActivity extends BaseActivity implements SplashView {
break
;
break
;
case
R
.
id
.
btn_dialogper_next
:
case
R
.
id
.
btn_dialogper_next
:
isClickAgree
=
true
;
isClickAgree
=
true
;
MateTimerManager
.
getInstance
().
init
();
splashPresenter
.
getCloseNeedInitAppsCount
();
splashPresenter
.
getCloseNeedInitAppsCount
();
splashPresenter
.
userLogin
();
splashPresenter
.
userLogin
();
if
(
powerDialog
!=
null
&&
powerDialog
.
isShowing
())
{
if
(
powerDialog
!=
null
&&
powerDialog
.
isShowing
())
{
powerDialog
.
dismiss
();
powerDialog
.
dismiss
();
AppPreferencesManager
.
INSTANCE
.
get
().
put
(
Constant
.
LOAN_PERMISSION_FLAG
,
false
);
AppPreferencesManager
.
INSTANCE
.
get
().
put
(
Constant
.
LOAN_PERMISSION_FLAG
,
false
);
}
}
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_IN_SPLASH_AGREE
.
name
());
if
(
Utils
.
isShowNavBar
(
mContext
))
{
if
(
Utils
.
isShowNavBar
(
mContext
))
{
// 有底部导航栏
// 有底部导航栏
...
...
app/src/main/java/com/mints/fiveworld/ui/fragment/WifiFragment.kt
View file @
b10ac2b7
...
@@ -419,7 +419,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -419,7 +419,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
// 预加载信息流
// 预加载信息流
ExpressManager
.
loadExpress
(
false
,
Constant
.
CARRIER_SAFE_CHECK
)
ExpressManager
.
loadExpress
(
false
,
Constant
.
CARRIER_SAFE_CHECK
)
}
}
AppConfig
.
inAdShowing
=
true
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
bundle
.
putString
(
SafeTestingActivity
.
INCREASE2_TYPE
,
SafeTestingActivity
.
INCREASE2_TYPE
,
...
@@ -437,7 +437,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -437,7 +437,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
// 预加载信息流
// 预加载信息流
ExpressManager
.
loadExpress
(
false
,
Constant
.
CARRIER_SPEED_TEST
)
ExpressManager
.
loadExpress
(
false
,
Constant
.
CARRIER_SPEED_TEST
)
}
}
AppConfig
.
inAdShowing
=
true
readyGo
(
NetTestingActivity
::
class
.
java
)
readyGo
(
NetTestingActivity
::
class
.
java
)
}
}
R
.
id
.
tv_morewifi
->
{
// 更多WIFI
R
.
id
.
tv_morewifi
->
{
// 更多WIFI
...
@@ -450,7 +450,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -450,7 +450,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
}
}
AppConfig
.
isCanBoost
=
true
AppConfig
.
isCanBoost
=
true
AppConfig
.
inAdShowing
=
true
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_TYPE
,
...
@@ -469,7 +469,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -469,7 +469,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
}
}
AppConfig
.
isCanClean
=
true
AppConfig
.
isCanClean
=
true
AppConfig
.
inAdShowing
=
true
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_TYPE
,
...
@@ -488,7 +488,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -488,7 +488,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
}
}
AppConfig
.
isCanSaveBattery
=
true
AppConfig
.
isCanSaveBattery
=
true
AppConfig
.
inAdShowing
=
true
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_TYPE
,
...
@@ -517,6 +517,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -517,6 +517,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
// 预加载信息流
// 预加载信息流
ExpressManager
.
loadExpress
(
false
,
Constant
.
CARRIER_WIFI_BOOST
)
ExpressManager
.
loadExpress
(
false
,
Constant
.
CARRIER_WIFI_BOOST
)
}
}
AppConfig
.
inAdShowing
=
true
readyGo
(
SignalStrengthActivity
::
class
.
java
)
readyGo
(
SignalStrengthActivity
::
class
.
java
)
}
}
...
...
app/src/main/java/com/mints/fiveworld/utils/Utils.java
View file @
b10ac2b7
...
@@ -259,21 +259,11 @@ public final class Utils {
...
@@ -259,21 +259,11 @@ public final class Utils {
* @return true 加载广告
* @return true 加载广告
*/
*/
public
static
boolean
canLoadAd
()
{
public
static
boolean
canLoadAd
()
{
String
channel_name
=
CommonUtils
.
getAppMetaData
(
// 命中黑名单=true 或 应用内广告关闭=false
MintsApplication
.
getContext
(),
if
(
AntiAuditManager
.
Companion
.
getInstance
().
isBlack
()
||
"CHANNEL_NAME"
!
WifiDataManager
.
INSTANCE
.
getAppInAdSwitch
())
{
);
if
(
TextUtils
.
equals
(
"oppo"
,
channel_name
)
||
TextUtils
.
equals
(
"meizu"
,
channel_name
)
||
TextUtils
.
equals
(
"vivo"
,
channel_name
)
||
TextUtils
.
equals
(
"store360"
,
channel_name
)
||
TextUtils
.
equals
(
"huawei"
,
channel_name
)
||
TextUtils
.
equals
(
"xiaomi"
,
channel_name
))
{
if
(
WifiDataManager
.
INSTANCE
.
isBlackOrClose
())
{
return
false
;
return
false
;
}
}
}
return
true
;
return
true
;
}
}
...
...
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