Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_flowbox
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_flowbox
Commits
31e9c71d
Commit
31e9c71d
authored
Jul 26, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
2d35d6ce
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
207 additions
and
165 deletions
+207
-165
MintsApplication.java
app/src/main/java/com/mints/flowbox/MintsApplication.java
+1
-1
AppOutGroMoreCarrierExpressManager.kt
.../flowbox/ad/express/AppOutGroMoreCarrierExpressManager.kt
+9
-15
ExpressManager.kt
.../main/java/com/mints/flowbox/ad/express/ExpressManager.kt
+23
-4
GroMoreCarrierExpressManager.kt
.../mints/flowbox/ad/express/GroMoreCarrierExpressManager.kt
+10
-3
FullGroManager.java
...c/main/java/com/mints/flowbox/ad/full/FullGroManager.java
+1
-5
PreCsjGroMoreVideoAdManager.java
...m/mints/flowbox/ad/video/PreCsjGroMoreVideoAdManager.java
+16
-14
AppConfig.java
app/src/main/java/com/mints/flowbox/common/AppConfig.java
+1
-1
OutAppRouter.kt
...src/main/java/com/mints/flowbox/keepalive/OutAppRouter.kt
+2
-0
AntiAuditManager.kt
...com/mints/flowbox/keepalive/appswitch/AntiAuditManager.kt
+3
-3
WifiDataManager.kt
...in/java/com/mints/flowbox/manager/wifi/WifiDataManager.kt
+47
-11
FoodSubsidyActivity.kt
...ava/com/mints/flowbox/ui/activitys/FoodSubsidyActivity.kt
+10
-10
Increasespeed2Activity.kt
.../com/mints/flowbox/ui/activitys/Increasespeed2Activity.kt
+7
-5
IncreasespeedActivity.kt
...a/com/mints/flowbox/ui/activitys/IncreasespeedActivity.kt
+7
-5
WalkActivity.kt
.../main/java/com/mints/flowbox/ui/activitys/WalkActivity.kt
+8
-9
WaterActivity.kt
...main/java/com/mints/flowbox/ui/activitys/WaterActivity.kt
+8
-9
ApkActivity.kt
...a/com/mints/flowbox/ui/activitys/keepalive/ApkActivity.kt
+2
-4
BoostFastActivity.kt
...mints/flowbox/ui/activitys/keepalive/BoostFastActivity.kt
+4
-5
ScreenActivity.kt
...om/mints/flowbox/ui/activitys/keepalive/ScreenActivity.kt
+14
-9
TriggerActivity.kt
...m/mints/flowbox/ui/activitys/keepalive/TriggerActivity.kt
+4
-6
MainWifiAdapter.kt
...main/java/com/mints/flowbox/ui/adapter/MainWifiAdapter.kt
+4
-4
HomeFragment.kt
...c/main/java/com/mints/flowbox/ui/fragment/HomeFragment.kt
+6
-0
WifiFragment.kt
...c/main/java/com/mints/flowbox/ui/fragment/WifiFragment.kt
+0
-7
IntentUtils.java
...n/java/com/mints/flowbox/utils/keepalive/IntentUtils.java
+11
-23
LockPermissionUtils.java
...om/mints/flowbox/utils/keepalive/LockPermissionUtils.java
+0
-5
AntiShake.java
...java/com/mints/library/utils/nodoubleclick/AntiShake.java
+1
-1
activity_food_subsidy.xml
app/src/main/res/layout/activity_food_subsidy.xml
+1
-1
activity_walk.xml
app/src/main/res/layout/activity_walk.xml
+1
-1
activity_water.xml
app/src/main/res/layout/activity_water.xml
+1
-1
fragment_home.xml
app/src/main/res/layout/fragment_home.xml
+2
-0
fragment_wifi.xml
app/src/main/res/layout/fragment_wifi.xml
+3
-3
No files found.
app/src/main/java/com/mints/flowbox/MintsApplication.java
View file @
31e9c71d
...
...
@@ -186,7 +186,7 @@ public class MintsApplication extends BaseApp {
CoreAdContext
.
Companion
.
setLockerResumeCallback
(
new
Function1
<
Activity
,
Boolean
>()
{
@Override
public
Boolean
invoke
(
Activity
activity
)
{
LogUtil
.
d
(
activity
.
getComponentName
());
LogUtil
.
d
(
"LockerResume -> "
+
activity
.
getComponentName
());
// TODO 这里利用activity实例,载入所有的体外广告,比如全屏视频、开屏等等
return
true
;
}
...
...
app/src/main/java/com/mints/flowbox/ad/express/AppOutGroMoreCarrierExpressManager.kt
View file @
31e9c71d
...
...
@@ -14,15 +14,15 @@ import com.bytedance.msdk.api.*
import
com.bytedance.msdk.api.nativeAd.*
import
com.mints.flowbox.R
import
com.mints.flowbox.MintsApplication
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.manager.CsjGroMoreManager
import
com.mints.flowbox.manager.TrackManager
import
com.mints.flowbox.ui.widgets.seekbar.BubbleUtils
import
com.mints.flowbox.utils.LogUtil
import
com.mints.flowbox.utils.VideoOptionUtil
import
java.util.ArrayList
import
java.util.HashMap
import
com.mints.library.utils.nodoubleclick.AntiShake
import
java.util.*
import
kotlin.random.Random
private
val
TAG
=
AppOutGroMoreCarrierExpressManager
::
class
.
java
.
simpleName
...
...
@@ -50,26 +50,20 @@ class AppOutGroMoreCarrierExpressManager : TTSettingConfigCallback {
mAdStyle
=
AdSlot
.
TYPE_EXPRESS_AD
}
fun
loadADFrameLayout
(
isScreen
:
Boolean
=
false
)
{
this
.
isScreen
=
isScreen
fun
loadADFrameLayout
(
isScreen
:
Boolean
=
false
,
_frameLayout
:
FrameLayout
?
=
null
)
{
if
(
AntiShake
.
check
(
Random
.
nextInt
(
1234
)))
return
// 销毁及移除事件
destroy
()
frameLayout
=
FrameLayout
(
MintsApplication
.
getContext
())
if
(
TTMediationAdSdk
.
configLoadSuccess
()
)
{
loadAd
()
if
(
_frameLayout
!=
null
)
{
this
.
frameLayout
=
_frameLayout
}
else
{
TTMediationAdSdk
.
registerConfigCallback
(
this
)
this
.
frameLayout
=
FrameLayout
(
MintsApplication
.
getContext
()
)
}
}
fun
loadADFrameLayout
(
_framelayout
:
FrameLayout
,
isScreen
:
Boolean
=
false
)
{
this
.
isScreen
=
isScreen
// 销毁及移除事件
destroy
()
this
.
frameLayout
=
_framelayout
if
(
TTMediationAdSdk
.
configLoadSuccess
())
{
loadAd
()
}
else
{
...
...
app/src/main/java/com/mints/flowbox/ad/express/ExpressManager.kt
View file @
31e9c71d
package
com.mints.flowbox.ad.express
import
android.view.ViewGroup
import
android.widget.FrameLayout
import
android.widget.RelativeLayout
import
com.mints.flowbox.common.AppConfig
/**
...
...
@@ -20,6 +22,18 @@ object ExpressManager {
}
}
/**
* 加载应用内信息流
* @param isMain 是否是网赚信息流
*/
fun
loadExpress
(
isMain
:
Boolean
,
_frameLayout
:
FrameLayout
?
=
null
)
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
GroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
(
isMain
,
_frameLayout
)
}
else
{
PreLoadExpressManager
.
loadADFrameLayout
()
}
}
/** 加载应用外信息流 */
fun
loadAppOutExpress
(
isScreen
:
Boolean
=
false
)
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
...
...
@@ -28,9 +42,9 @@ object ExpressManager {
}
/** 加载应用外信息流 */
fun
load
NoAppOutExpress
(
framelayout
:
FrameLayout
,
isScreen
:
Boolean
=
false
)
{
fun
load
AppOutExpress
(
isScreen
:
Boolean
=
false
,
_frameLayout
:
FrameLayout
?
=
null
)
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
AppOutGroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
(
framelayout
,
isScreen
)
AppOutGroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
(
isScreen
,
_frameLayout
)
}
}
...
...
@@ -51,7 +65,12 @@ object ExpressManager {
return
null
}
fun
destroy
()
{
AppOutGroMoreCarrierExpressManager
.
instance
.
destroy
()
val
lp
=
RelativeLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
init
{
lp
.
addRule
(
RelativeLayout
.
CENTER_HORIZONTAL
)
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ad/express/GroMoreCarrierExpressManager.kt
View file @
31e9c71d
...
...
@@ -50,12 +50,17 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
mAdStyle
=
AdSlot
.
TYPE_EXPRESS_AD
}
fun
loadADFrameLayout
(
isMainOrCommon
:
Boolean
)
{
fun
loadADFrameLayout
(
isMainOrCommon
:
Boolean
,
_frameLayout
:
FrameLayout
?
=
null
)
{
isFromMain
=
isMainOrCommon
// 销毁及移除事件
destroy
()
frameLayout
=
FrameLayout
(
MintsApplication
.
getContext
())
if
(
_frameLayout
!=
null
)
{
this
.
frameLayout
=
_frameLayout
}
else
{
this
.
frameLayout
=
FrameLayout
(
MintsApplication
.
getContext
())
}
if
(
TTMediationAdSdk
.
configLoadSuccess
())
{
loadAd
()
...
...
@@ -190,8 +195,10 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
mHandlerThread
=
null
mWorkHandler
?.
removeCallbacksAndMessages
(
null
)
mWorkHandler
=
null
TTMediationAdSdk
.
unregisterConfigCallback
(
this
)
frameLayout
?.
removeAllViews
()
frameLayout
=
null
TTMediationAdSdk
.
unregisterConfigCallback
(
this
)
}
private
fun
createAdView
(
ad
:
TTNativeAd
?):
View
?
{
...
...
app/src/main/java/com/mints/flowbox/ad/full/FullGroManager.java
View file @
31e9c71d
...
...
@@ -19,13 +19,10 @@ import com.mints.flowbox.common.Constant;
import
com.mints.flowbox.manager.CsjGroMoreManager
;
import
com.mints.flowbox.manager.TrackManager
;
import
com.mints.flowbox.manager.UserManager
;
import
com.mints.flowbox.mvp.model.WeightBean
;
import
com.mints.flowbox.utils.LogUtil
;
import
com.mints.flowbox.utils.VideoOptionUtil
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Random
;
/**
* gromore全屏广告
...
...
@@ -137,7 +134,7 @@ public class FullGroManager {
}
private
String
getFullId
()
{
String
id
;
String
id
;
if
(
isMain
)
{
id
=
CsjGroMoreManager
.
INSTANCE
.
getAPP_IN_COMMON_AD_FULL_UNIT_NEW_INTERSTITIAL_ID
();
}
else
{
...
...
@@ -149,7 +146,6 @@ public class FullGroManager {
}
public
void
showFullAd
()
{
if
(
BuildConfig
.
DEBUG
)
{
LogUtil
.
d
(
TAG
,
"showFullAd isLoadSuccess="
+
isLoadSuccess
+
" isReady="
+
mTTFullVideoAd
.
isReady
());
...
...
app/src/main/java/com/mints/flowbox/ad/video/PreCsjGroMoreVideoAdManager.java
View file @
31e9c71d
...
...
@@ -43,8 +43,8 @@ public class PreCsjGroMoreVideoAdManager extends BaseVideoAd {
private
int
curCoin
;
//金币
private
String
extraId
;
//id
private
String
carrierType
;
// 载体
private
long
adLoadTime
=
0
;
// 广告展示时间,45分钟后当前广告失效,重新预加载广告
private
long
adPreingTime
=
0
;
// 防止预加载超时 2分钟
private
long
adLoadTime
=
0
;
// 广告展示时间,45分钟后当前广告失效,重新预加载广告
private
long
adPreingTime
=
0
;
// 防止预加载超时 2分钟
public
static
PreCsjGroMoreVideoAdManager
getInstance
()
{
if
(
_inst
==
null
)
{
...
...
@@ -78,19 +78,21 @@ public class PreCsjGroMoreVideoAdManager extends BaseVideoAd {
*/
public
void
preLoadAd
(
Activity
activity
)
{
this
.
activity
=
new
WeakReference
<>(
activity
);
boolean
isOversped
=
TimeRender
.
isOversped45Min
(
adLoadTime
,
45
);
boolean
isPreingOversped
=
TimeRender
.
isOversped45Min
(
adPreingTime
,
2
);
boolean
isOversped
=
TimeRender
.
isOversped45Min
(
adLoadTime
,
45
);
boolean
isPreingOversped
=
TimeRender
.
isOversped45Min
(
adPreingTime
,
2
);
if
(
BuildConfig
.
DEBUG
)
{
LogUtil
.
d
(
TAG
,
"1、进入预加载 isLoadSuccess="
+
isLoadSuccess
+
" isOversped="
+
isOversped
+
" activity="
+
this
.
activity
.
get
()+
" isPreingOversped="
+
isPreingOversped
);
LogUtil
.
d
(
TAG
,
"1、进入预加载 isLoadSuccess="
+
isLoadSuccess
+
" isOversped="
+
isOversped
+
" activity="
+
this
.
activity
.
get
()
+
" isPreingOversped="
+
isPreingOversped
);
}
// 加载失败/未加载时 或 预加载广告超过45分钟 或预加载超时 才预加载
// 加载失败/未加载时 ==== isLoadSuccess == 0
// (adLoadTime>0&&TimeRender.isOversped45Min(adLoadTime,45) ==== 预加载广告超过45分钟
// (adPreingTime>0&&isPreingOversped&&isLoadSuccess==1) ==== 预加载超时
if
((
isLoadSuccess
==
0
||(
adLoadTime
>
0
&&
isOversped
)||(
adPreingTime
>
0
&&
isPreingOversped
&&
isLoadSuccess
==
1
))
&&
this
.
activity
.
get
()!=
null
)
{
LogUtil
.
d
(
TAG
,
"2、执行预加载去了="
+
isLoadSuccess
);
adPreingTime
=
System
.
currentTimeMillis
();
if
((
isLoadSuccess
==
0
// 加载失败
||
(
adLoadTime
>
0
&&
isOversped
)
// 超过45分钟
||
(
adPreingTime
>
0
&&
isPreingOversped
&&
isLoadSuccess
==
1
))
// 预加载超时
&&
this
.
activity
.
get
()
!=
null
)
{
LogUtil
.
d
(
TAG
,
"2、执行预加载去了="
+
isLoadSuccess
);
adPreingTime
=
System
.
currentTimeMillis
();
isLoadSuccess
=
1
;
if
(
TTMediationAdSdk
.
configLoadSuccess
())
{
...
...
@@ -111,7 +113,7 @@ public class PreCsjGroMoreVideoAdManager extends BaseVideoAd {
*/
public
void
showAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
this
.
activity
=
new
WeakReference
<>(
activity
);
boolean
isOversped
=
TimeRender
.
isOversped45Min
(
adLoadTime
,
45
);
boolean
isOversped
=
TimeRender
.
isOversped45Min
(
adLoadTime
,
45
);
// 若上一个广告还在加载中则返回
if
(
isLoadSuccess
==
1
)
{
ToastUtil
.
show
(
this
.
activity
.
get
(),
"加载太快了,请休息一下吧"
);
...
...
@@ -120,7 +122,7 @@ public class PreCsjGroMoreVideoAdManager extends BaseVideoAd {
if
(
BuildConfig
.
DEBUG
)
{
LogUtil
.
d
(
TAG
,
"4、展示广告LoadSuccess="
+
isLoadSuccess
+
" isReady="
+
mttRewardAd
.
isReady
()
+
" isOversped="
+
isOversped
+
" activity="
+
this
.
activity
.
get
());
LogUtil
.
d
(
TAG
,
"4、展示广告LoadSuccess="
+
isLoadSuccess
+
" isReady="
+
mttRewardAd
.
isReady
()
+
" isOversped="
+
isOversped
+
" activity="
+
this
.
activity
.
get
());
}
// 预加载广告成功 且 预加载广告时长未超过45分钟
...
...
@@ -143,7 +145,7 @@ public class PreCsjGroMoreVideoAdManager extends BaseVideoAd {
vo
.
put
(
"adSource"
,
mttRewardAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"carrierType"
,
carrierType
);
TrackManager
.
getInstance
().
reporGromeEcpm
(
vo
);
}
else
{
}
else
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_GROMORE
,
Constant
.
EVENT_TYPE_ONE
,
"999999"
,
"Cached Fail"
);
LogUtil
.
d
(
TAG
,
"5、展示广告时失败了,广告可能超时45分钟 onError "
);
...
...
@@ -207,7 +209,7 @@ public class PreCsjGroMoreVideoAdManager extends BaseVideoAd {
@Override
public
void
onRewardVideoAdLoad
()
{
isLoadSuccess
=
2
;
adLoadTime
=
System
.
currentTimeMillis
();
adLoadTime
=
System
.
currentTimeMillis
();
if
(
BuildConfig
.
DEBUG
)
{
LogUtil
.
d
(
TAG
,
"3、AdLoad onRewardVideoAdLoad="
+
isLoadSuccess
+
" isReady="
+
mttRewardAd
.
isReady
());
}
...
...
@@ -216,7 +218,7 @@ public class PreCsjGroMoreVideoAdManager extends BaseVideoAd {
@Override
public
void
onRewardVideoCached
()
{
isLoadSuccess
=
2
;
adLoadTime
=
System
.
currentTimeMillis
();
adLoadTime
=
System
.
currentTimeMillis
();
if
(
BuildConfig
.
DEBUG
)
{
LogUtil
.
d
(
TAG
,
"3、Cacheeee onRewardVideoCached="
+
isLoadSuccess
+
" isReady="
+
mttRewardAd
.
isReady
());
}
...
...
app/src/main/java/com/mints/flowbox/common/AppConfig.java
View file @
31e9c71d
...
...
@@ -95,7 +95,7 @@ public class AppConfig {
/**
* gromore 剩余广告播放数
*/
public
static
int
groMoreVideoAdCount
=
0
;
public
static
int
groMoreVideoAdCount
=
2
0
;
/**
* owVideo 剩余广告播放数
*/
...
...
app/src/main/java/com/mints/flowbox/keepalive/OutAppRouter.kt
View file @
31e9c71d
...
...
@@ -52,6 +52,8 @@ object OutAppRouter {
* 展示锁屏页面
*/
fun
showScreenActivity
()
{
ExpressManager
.
loadAppOutExpress
(
true
)
val
intent
=
Intent
(
MintsApplication
.
getContext
(),
ScreenActivity
::
class
.
java
)
if
(!
PhoneBrandUtils
.
isOppo
())
{
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_BROUGHT_TO_FRONT
...
...
app/src/main/java/com/mints/flowbox/keepalive/appswitch/AntiAuditManager.kt
View file @
31e9c71d
...
...
@@ -9,6 +9,8 @@ import com.mints.flowbox.utils.LogUtil
import
com.mints.flowbox.utils.rxutil.CommonRxTask
import
com.mints.flowbox.utils.rxutil.RxjavaUtil
private
val
TAG
=
AntiAuditManager
::
class
.
java
.
simpleName
/**
*
* @author jyx
...
...
@@ -17,8 +19,6 @@ import com.mints.flowbox.utils.rxutil.RxjavaUtil
*/
class
AntiAuditManager
private
constructor
()
{
private
val
TAG
=
AntiAuditManager
::
class
.
java
.
simpleName
companion
object
{
const
val
ONE_DAY
=
60
*
1000
*
60
*
24
// 一天
const
val
N
=
12
// (阈值)
...
...
@@ -33,7 +33,7 @@ class AntiAuditManager private constructor() {
}
}
val
sp
by
lazy
{
AppPreferencesManager
.
get
()
}
private
val
sp
by
lazy
{
AppPreferencesManager
.
get
()
}
/**
* 更新 新安装的apk个数
...
...
app/src/main/java/com/mints/flowbox/manager/wifi/WifiDataManager.kt
View file @
31e9c71d
...
...
@@ -100,14 +100,16 @@ object WifiDataManager {
// 应用总开关
var
APP_OUT_MAIN_SWITCH
=
false
val
sp
by
lazy
{
AppPreferencesManager
.
get
()
}
private
val
sp
by
lazy
{
AppPreferencesManager
.
get
()
}
/**
* 是否显示wifi连接广告
*/
fun
getWifiOn
():
Boolean
{
LogUtil
.
d
(
TAG
,
"wifiOn -> 开启wifi"
)
// 总开关关闭 return
if
(
isBlackOrClose
()
or
!
WIFI_ON_OPEN
)
return
false
if
(
isBlackOrClose
()
||
!
WIFI_ON_OPEN
)
return
false
val
wifiOn
=
sp
.
getInt
(
WIFI_ON
,
0
)
if
(
wifiOn
<
WIFI_ON_TIMES
)
{
...
...
@@ -122,8 +124,10 @@ object WifiDataManager {
* 是否显示wifi断开广告
*/
fun
getWifiOff
():
Boolean
{
LogUtil
.
d
(
TAG
,
"wifiOff -> 断开wifi"
)
// 总开关关闭 return
if
(
isBlackOrClose
()
or
!
WIFI_OFF_OPEN
)
return
false
if
(
isBlackOrClose
()
||
!
WIFI_OFF_OPEN
)
return
false
val
wifiOff
=
sp
.
getInt
(
WIFI_OFF
,
0
)
if
(
wifiOff
<
WIFI_OFF_TIMES
)
{
...
...
@@ -138,8 +142,10 @@ object WifiDataManager {
* 是否显示充电连接广告
*/
fun
getBatteryOn
():
Boolean
{
LogUtil
.
d
(
TAG
,
"batteryOn -> 充电连接"
)
// 总开关关闭 return
if
(
isBlackOrClose
()
or
!
BATTERY_ON_OPEN
)
return
false
if
(
isBlackOrClose
()
||
!
BATTERY_ON_OPEN
)
return
false
val
batteryOn
=
sp
.
getInt
(
BATTERY_ON
,
0
)
if
(
batteryOn
<
BATTERY_ON_TIMES
)
{
...
...
@@ -154,8 +160,10 @@ object WifiDataManager {
* 是否显示断电连接广告
*/
fun
getBatteryOff
():
Boolean
{
LogUtil
.
d
(
TAG
,
"batteryOff -> 充电断开"
)
// 总开关关闭 return
if
(
isBlackOrClose
()
or
!
BATTERY_OFF_OPEN
)
return
false
if
(
isBlackOrClose
()
||
!
BATTERY_OFF_OPEN
)
return
false
val
batteryOff
=
sp
.
getInt
(
BATTERY_OFF
,
0
)
if
(
batteryOff
<
BATTERY_OFF_TIMES
)
{
...
...
@@ -170,8 +178,10 @@ object WifiDataManager {
* 是否锁屏
*/
fun
getLockOn
():
Boolean
{
LogUtil
.
d
(
TAG
,
"lockOn -> 锁屏"
)
// 总开关关闭 return
if
(
isBlackOrClose
()
or
!
LOCK_OPEN
)
return
false
if
(
isBlackOrClose
()
||
!
LOCK_OPEN
)
return
false
val
lockOn
=
sp
.
getInt
(
LOCK_ON
,
0
)
if
(
lockOn
<
LOCK_TIMES
)
{
...
...
@@ -185,8 +195,10 @@ object WifiDataManager {
* 是否挂断电话
*/
fun
getTelephoneOff
():
Boolean
{
LogUtil
.
d
(
TAG
,
"telephoneOff -> 挂断电话"
)
// 总开关关闭 return
if
(
isBlackOrClose
()
or
!
PHONE_OFF_OPEN
)
return
false
if
(
isBlackOrClose
()
||
!
PHONE_OFF_OPEN
)
return
false
val
telephoneOff
=
sp
.
getInt
(
TELEPHONE_OFF
,
0
)
if
(
telephoneOff
<
PHONE_OFF_TIMES
)
{
...
...
@@ -197,11 +209,13 @@ object WifiDataManager {
}
/**
* 是否安装
apk
* 是否安装
APP
*/
fun
getInstallApk
():
Boolean
{
LogUtil
.
d
(
TAG
,
"install -> 安装APP"
)
// 总开关关闭 return
if
(
isBlackOrClose
()
or
!
INSTALL_APK_OPEN
)
return
false
if
(
isBlackOrClose
()
||
!
INSTALL_APK_OPEN
)
return
false
val
install
=
sp
.
getInt
(
INSTALL_APK
,
0
)
if
(
install
<
INSTALL_APK_TIMES
)
{
...
...
@@ -215,8 +229,10 @@ object WifiDataManager {
* 是否卸载APP
*/
fun
getUnInstallApk
():
Boolean
{
LogUtil
.
d
(
TAG
,
"uninstall -> 卸载APP"
)
// 总开关关闭 return
if
(
isBlackOrClose
()
or
!
UNINSTALL_APK_OPEN
)
return
false
if
(
isBlackOrClose
()
||
!
UNINSTALL_APK_OPEN
)
return
false
val
uninstall
=
sp
.
getInt
(
UNINSTALL_APK
,
0
)
if
(
uninstall
<
UNINSTALL_APK_TIMES
)
{
...
...
@@ -230,8 +246,10 @@ object WifiDataManager {
* 是否更新APP
*/
fun
getUpdateApk
():
Boolean
{
LogUtil
.
d
(
TAG
,
"update -> 更新APP"
)
// 总开关关闭 return
if
(
isBlackOrClose
()
or
!
UPDATE_APK_OPEN
)
return
false
if
(
isBlackOrClose
()
||
!
UPDATE_APK_OPEN
)
return
false
val
update
=
sp
.
getInt
(
UPDATE_APK
,
0
)
if
(
update
<
UPDATE_APK_TIMES
)
{
...
...
@@ -245,6 +263,8 @@ object WifiDataManager {
* 定时
*/
fun
getTiming
():
Boolean
{
LogUtil
.
d
(
TAG
,
"timing -> 定时"
)
// 总开关关闭 return
if
(
isBlackOrClose
()
or
!
TIMING_OPEN
)
return
false
...
...
@@ -365,12 +385,28 @@ object WifiDataManager {
}
if
(!
data
.
isOpen
)
{
// 重置总开关
APP_OUT_MAIN_SWITCH
=
false
// 重置分类开关
BATTERY_ON_OPEN
=
false
BATTERY_OFF_OPEN
=
false
WIFI_ON_OPEN
=
false
WIFI_OFF_OPEN
=
false
PHONE_OFF_OPEN
=
false
LOCK_OPEN
=
false
INSTALL_APK_OPEN
=
false
UPDATE_APK_OPEN
=
false
UNINSTALL_APK_OPEN
=
false
TIMING_OPEN
=
false
return
}
APP_OUT_MAIN_SWITCH
=
true
LogUtil
.
d
(
TAG
,
"服务器设置应用外总开关 -> "
+
data
.
isOpen
)
// 充电
if
(
data
.
modules
.
charge
.
isOpen
)
{
BATTERY_ON_OPEN
=
true
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/FoodSubsidyActivity.kt
View file @
31e9c71d
...
...
@@ -5,8 +5,6 @@ import android.view.View
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.flowbox.manager.TtCsjAdManager
import
com.mints.flowbox.mvp.model.MealBean
import
com.mints.flowbox.mvp.presenters.FoodSubsidyPresenter
import
com.mints.flowbox.mvp.views.FoodSubsidyView
...
...
@@ -20,7 +18,8 @@ import kotlinx.android.synthetic.main.activity_food_subsidy.*
* 作者:孟崔广
* 时间:2020/10/13 11:55
*/
class
FoodSubsidyActivity
:
BaseActivity
(),
View
.
OnClickListener
,
FoodSubsidyView
,
StepView
.
StepViewListener
,
MealView
.
MealViewListener
{
class
FoodSubsidyActivity
:
BaseActivity
(),
View
.
OnClickListener
,
FoodSubsidyView
,
StepView
.
StepViewListener
,
MealView
.
MealViewListener
{
private
val
foodSubsidyPresenter
by
lazy
{
FoodSubsidyPresenter
()
}
...
...
@@ -50,7 +49,7 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
super
.
onDestroy
()
svWalk
?.
destoryAnim
()
fl
SubsidykA
d
?.
removeAllViews
()
fl
_a
d
?.
removeAllViews
()
foodSubsidyPresenter
.
detachView
()
}
...
...
@@ -93,14 +92,15 @@ class FoodSubsidyActivity : BaseActivity(), View.OnClickListener, FoodSubsidyVie
}
/**
* 初始化信息iyc
*/
/**初始化信息iyc*/
private
fun
initExpress
()
{
try
{
if
(
flSubsidykAd
!=
null
)
{
flSubsidykAd
.
removeAllViews
()
flSubsidykAd
.
addView
(
ExpressManager
.
getExpressFrameLayout
())
if
(
fl_ad
!=
null
&&
ExpressManager
.
getExpressFrameLayout
()
!=
null
)
{
fl_ad
?.
removeAllViews
()
fl_ad
?.
addView
(
ExpressManager
.
getExpressFrameLayout
(),
ExpressManager
.
lp
)
}
else
{
fl_ad
?.
removeAllViews
()
ExpressManager
.
loadExpress
(
true
,
fl_ad
)
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/Increasespeed2Activity.kt
View file @
31e9c71d
...
...
@@ -17,6 +17,7 @@ import com.mints.flowbox.ui.adapter.IncreaseAdapter
import
com.mints.flowbox.ui.widgets.NumAnimUtil
import
com.mints.flowbox.utils.SpanUtils
import
com.mints.library.utils.GlideUtils
import
kotlinx.android.synthetic.main.activity_increasespeed.*
import
kotlinx.android.synthetic.main.activity_increasespeed2.*
import
kotlinx.android.synthetic.main.activity_increasespeed2.container
import
kotlinx.android.synthetic.main.activity_increasespeed2.containerAnim
...
...
@@ -208,14 +209,15 @@ class Increasespeed2Activity : BaseActivity(), View.OnClickListener {
super
.
onDestroy
()
}
/**
* 初始化信息iyc
*/
/**初始化信息iyc*/
private
fun
initExpress
()
{
try
{
if
(
fl_ad
!=
null
)
{
if
(
fl_ad
!=
null
&&
ExpressManager
.
getExpressFrameLayout
()
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getExpressFrameLayout
())
fl_ad
.
addView
(
ExpressManager
.
getExpressFrameLayout
(),
ExpressManager
.
lp
)
}
else
{
fl_ad
.
removeAllViews
()
ExpressManager
.
loadExpress
(
false
,
fl_ad
)
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/IncreasespeedActivity.kt
View file @
31e9c71d
...
...
@@ -16,6 +16,7 @@ import com.mints.flowbox.ui.activitys.base.BaseActivity
import
com.mints.flowbox.ui.widgets.seekbar.BubbleUtils
import
com.mints.flowbox.utils.SpanUtils
import
com.mints.library.utils.GlideUtils
import
kotlinx.android.synthetic.main.activity_boost_fast.*
import
kotlinx.android.synthetic.main.activity_increasespeed.*
import
kotlinx.android.synthetic.main.activity_increasespeed.container
import
kotlinx.android.synthetic.main.activity_increasespeed.containerAnim
...
...
@@ -262,14 +263,15 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
super
.
onDestroy
()
}
/**
* 初始化信息iyc
*/
/**初始化信息iyc*/
private
fun
initExpress
()
{
try
{
if
(
fl_ad
!=
null
)
{
if
(
fl_ad
!=
null
&&
ExpressManager
.
getExpressFrameLayout
()
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getExpressFrameLayout
())
fl_ad
.
addView
(
ExpressManager
.
getExpressFrameLayout
(),
ExpressManager
.
lp
)
}
else
{
fl_ad
.
removeAllViews
()
ExpressManager
.
loadExpress
(
false
,
fl_ad
)
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/WalkActivity.kt
View file @
31e9c71d
...
...
@@ -5,8 +5,6 @@ import android.view.View
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.flowbox.manager.TtCsjAdManager
import
com.mints.flowbox.mvp.model.WalkBean
import
com.mints.flowbox.mvp.presenters.WalkPresenter
import
com.mints.flowbox.mvp.views.WalkView
...
...
@@ -46,7 +44,7 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
super
.
onDestroy
()
svWalk
?.
destoryAnim
()
fl
WalkA
d
?.
removeAllViews
()
fl
_a
d
?.
removeAllViews
()
walkPresenter
.
detachView
()
}
...
...
@@ -103,14 +101,15 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
ExpressManager
.
loadExpress
(
true
)
}
/**
* 初始化信息iyc
*/
/**初始化信息iyc*/
private
fun
initExpress
()
{
try
{
if
(
flWalkAd
!=
null
)
{
flWalkAd
.
removeAllViews
()
flWalkAd
.
addView
(
ExpressManager
.
getExpressFrameLayout
())
if
(
fl_ad
!=
null
&&
ExpressManager
.
getExpressFrameLayout
()
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getExpressFrameLayout
(),
ExpressManager
.
lp
)
}
else
{
fl_ad
.
removeAllViews
()
ExpressManager
.
loadExpress
(
true
,
fl_ad
)
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/WaterActivity.kt
View file @
31e9c71d
...
...
@@ -5,8 +5,6 @@ import android.view.View
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.flowbox.manager.TtCsjAdManager
import
com.mints.flowbox.mvp.model.WaterBean
import
com.mints.flowbox.mvp.presenters.WaterPresenter
import
com.mints.flowbox.ui.activitys.base.BaseActivity
...
...
@@ -52,7 +50,7 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
// 取消水滴动画
wvWater
?.
destoryAnim
()
wvWater
?.
closeWaterViewTime
()
fl
WaterA
d
?.
removeAllViews
()
fl
_a
d
?.
removeAllViews
()
waterPresenter
.
detachView
()
}
...
...
@@ -108,14 +106,15 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
wvWater
.
setWaterViewListener
(
this
)
}
/**
* 初始化信息iyc
*/
/**初始化信息iyc*/
private
fun
initExpress
()
{
try
{
if
(
flWaterAd
!=
null
)
{
flWaterAd
.
removeAllViews
()
flWaterAd
.
addView
(
ExpressManager
.
getExpressFrameLayout
())
if
(
fl_ad
!=
null
&&
ExpressManager
.
getExpressFrameLayout
()
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getExpressFrameLayout
(),
ExpressManager
.
lp
)
}
else
{
fl_ad
.
removeAllViews
()
ExpressManager
.
loadExpress
(
true
,
fl_ad
)
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/ApkActivity.kt
View file @
31e9c71d
...
...
@@ -19,7 +19,6 @@ import kotlinx.android.synthetic.main.activity_apk.btnClean
import
kotlinx.android.synthetic.main.activity_apk.fl_ad
import
kotlinx.android.synthetic.main.activity_apk.iv_close
import
kotlinx.android.synthetic.main.activity_apk.tvInfo
import
kotlinx.android.synthetic.main.activity_screen.*
import
kotlin.random.Random
/**
...
...
@@ -49,6 +48,7 @@ class ApkActivity : BaseActivity() {
if
(
TextUtils
.
isEmpty
(
mApkPkgName
))
finish
()
initView
()
initExpress
()
}
private
fun
initView
()
{
...
...
@@ -106,8 +106,6 @@ class ApkActivity : BaseActivity() {
override
fun
onResume
()
{
super
.
onResume
()
initExpress
()
btnClean
.
postDelayed
({
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
500
).
repeat
(
10
).
playOn
(
btnClean
)
},
200
)
...
...
@@ -122,7 +120,7 @@ class ApkActivity : BaseActivity() {
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getAppOutExpressFrameLayout
())
}
else
{
ExpressManager
.
load
NoAppOutExpress
(
fl_ad
)
ExpressManager
.
load
AppOutExpress
(
false
,
fl_ad
)
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/BoostFastActivity.kt
View file @
31e9c71d
...
...
@@ -14,6 +14,7 @@ import kotlinx.android.synthetic.main.activity_boost_fast.*
import
kotlinx.android.synthetic.main.activity_boost_fast.fl_ad
import
kotlinx.android.synthetic.main.activity_boost_fast.iv_close
import
kotlinx.android.synthetic.main.activity_screen.*
import
kotlinx.android.synthetic.main.activity_timing.*
import
java.util.*
import
kotlin.random.Random
...
...
@@ -126,17 +127,15 @@ class BoostFastActivity : Activity() {
}
}
/**
* 初始化信息iyc
*/
/**初始化信息iyc*/
private
fun
initExpress
()
{
try
{
if
(
fl_ad
!=
null
&&
ExpressManager
.
getAppOutExpressFrameLayout
()
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getAppOutExpressFrameLayout
())
fl_ad
.
addView
(
ExpressManager
.
getAppOutExpressFrameLayout
()
,
ExpressManager
.
lp
)
}
else
{
fl_ad
.
removeAllViews
()
ExpressManager
.
load
NoAppOutExpress
(
fl_ad
)
ExpressManager
.
load
AppOutExpress
(
false
,
fl_ad
)
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/ScreenActivity.kt
View file @
31e9c71d
...
...
@@ -10,10 +10,12 @@ import com.mints.flowbox.common.Constant
import
com.mints.flowbox.ui.activitys.CleanActivity
import
com.mints.flowbox.ui.activitys.IncreasespeedActivity
import
com.mints.flowbox.ui.activitys.base.OutAppActivity
import
com.mints.flowbox.utils.LogUtil
import
com.mints.flowbox.utils.TimeRender
import
com.mints.flowbox.utils.ToolUtil
import
com.mints.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.activity_screen.*
import
kotlinx.android.synthetic.main.activity_screen.fl_ad
import
java.util.*
class
ScreenActivity
:
OutAppActivity
(),
View
.
OnClickListener
{
...
...
@@ -29,6 +31,10 @@ class ScreenActivity : OutAppActivity(), View.OnClickListener {
)
},
500
)
ExpressManager
.
loadAppOutExpress
(
true
)
LogUtil
.
d
(
TAG_LOG
,
"ScreenActivity -> onCreate "
)
// val thread = TimeThread(tvDate, tvTime)
// thread.start()
...
...
@@ -42,6 +48,7 @@ class ScreenActivity : OutAppActivity(), View.OnClickListener {
override
fun
onResume
()
{
super
.
onResume
()
resetTime
()
LogUtil
.
d
(
TAG_LOG
,
"ScreenActivity -> onResume "
)
}
private
fun
resetTime
()
{
...
...
@@ -86,13 +93,15 @@ class ScreenActivity : OutAppActivity(), View.OnClickListener {
}
}
/**
* 初始化信息iyc
*/
/**初始化信息iyc*/
private
fun
initExpress
()
{
try
{
fl_ad
.
removeAllViews
()
ExpressManager
.
loadNoAppOutExpress
(
fl_ad
,
true
)
if
(
fl_ad
!=
null
&&
ExpressManager
.
getAppOutExpressFrameLayout
()
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getAppOutExpressFrameLayout
(),
ExpressManager
.
lp
)
}
else
{
ExpressManager
.
loadAppOutExpress
(
true
,
fl_ad
)
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
...
...
@@ -100,8 +109,4 @@ class ScreenActivity : OutAppActivity(), View.OnClickListener {
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_screen
override
fun
onDestroy
()
{
ExpressManager
.
destroy
()
super
.
onDestroy
()
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/TriggerActivity.kt
View file @
31e9c71d
...
...
@@ -228,17 +228,15 @@ class TriggerActivity : BaseActivity() {
}
}
/**
* 初始化信息iyc
*/
/**初始化信息iyc*/
private
fun
initExpress
()
{
try
{
if
(
fl_ad
!=
null
&&
ExpressManager
.
getAppOutExpressFrameLayout
()
!=
null
)
{
if
(
ExpressManager
.
getAppOutExpressFrameLayout
()
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getAppOutExpressFrameLayout
())
fl_ad
.
addView
(
ExpressManager
.
getAppOutExpressFrameLayout
()
,
ExpressManager
.
lp
)
}
else
{
fl_ad
.
removeAllViews
()
ExpressManager
.
load
NoAppOutExpress
(
fl_ad
)
ExpressManager
.
load
AppOutExpress
(
false
,
fl_ad
)
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
...
...
app/src/main/java/com/mints/flowbox/ui/adapter/MainWifiAdapter.kt
View file @
31e9c71d
...
...
@@ -64,18 +64,18 @@ class MainWifiAdapter(val context: Context, val taskData: MutableList<WifiListBe
override
fun
onBindViewHolder
(
holder
:
RecyclerView
.
ViewHolder
,
position
:
Int
)
{
if
(
holder
is
EmptyHolder
)
{
if
(
mIsWifiConnected
)
{
if
(
mIsWifiConnected
)
{
// 连接上wifi,但是附近搜索不到wifi
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tvTitle
).
text
=
"已打开WIFI开关"
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv
Title
).
text
=
"附近未发现WIFI,去系统扫描"
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv
Info
).
text
=
"附近未发现WIFI,去系统扫描"
val
btn
=
holder
.
itemView
.
findViewById
<
Button
>(
R
.
id
.
btn
)
btn
.
text
=
"跳转系统"
btn
.
setOnClickListener
{
context
.
startActivity
(
Intent
(
Settings
.
ACTION_WIFI_SETTINGS
))
}
}
else
{
holder
.
itemView
.
findViewById
<
Button
>(
R
.
id
.
btn
)
.
setOnClickListener
{
mOnItemClickListener
?.
onItemClick
(
it
,
position
)
context
.
startActivity
(
Intent
(
Settings
.
ACTION_WIFI_SETTINGS
)
)
}
}
return
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/HomeFragment.kt
View file @
31e9c71d
...
...
@@ -95,6 +95,12 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
private
fun
initView
()
{
if
(
AppConfig
.
FRAGMENT_THREE_SHOW_TYPE
==
3
)
{
ivBanner
.
setImageResource
(
R
.
mipmap
.
bg_banner2
)
tvTitle
.
visibility
=
View
.
GONE
tvContent
.
visibility
=
View
.
GONE
}
wifi_view
.
setCount
(
0
)
if
(
wifiManager
.
isWifiEnable
)
{
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/WifiFragment.kt
View file @
31e9c71d
...
...
@@ -52,8 +52,6 @@ import rx.Observable
import
java.util.*
import
kotlin.random.Random
private
val
TAG
=
WifiFragment
::
class
.
java
.
simpleName
/**
*
* @author jyx
...
...
@@ -610,11 +608,6 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
override
fun
onItemClick
(
view
:
View
?,
position
:
Int
)
{
if
(!
wifiUtils
.
isWifiConnected
(
mContext
))
return
if
(
view
?.
id
==
R
.
id
.
btn
)
{
checkPermission
()
return
}
if
(
mWifiList
[
position
].
isConnected
)
return
val
wifiListBean
=
mWifiList
[
position
]
...
...
app/src/main/java/com/mints/flowbox/utils/keepalive/IntentUtils.java
View file @
31e9c71d
...
...
@@ -23,29 +23,16 @@ public class IntentUtils {
public
static
final
String
TAG
=
"IntentUtils"
;
public
static
void
startScreenActivity
(
Intent
intent
)
{
// if (shouldShowLockerAfterUserPresent()) {
ActivityManagerProxy
.
INSTANCE
.
bringToFront
(
new
BringToFrontListener
()
{
@Override
public
void
onCall
(
@NotNull
ContextLike
contextLike
)
{
contextLike
.
startActivity
(
intent
);
}
@Override
public
void
onResult
(
boolean
b
)
{
}
},
null
);
// } else {
// ActivityManagerProxy.INSTANCE.bringActivityToFront(
// MintsApplication.getContext(),
// ScreenActivity.class,
// intent
// );
// ActivityManagerProxy.INSTANCE.ensureActive();
// }
}
ActivityManagerProxy
.
INSTANCE
.
bringToFront
(
new
BringToFrontListener
()
{
@Override
public
void
onCall
(
@NotNull
ContextLike
contextLike
)
{
contextLike
.
startActivity
(
intent
);
}
public
static
boolean
shouldShowLockerAfterUserPresent
()
{
return
PhoneBrandUtils
.
isOppo
()
&&
PhoneBrandUtils
.
isLockScreenProtected
();
@Override
public
void
onResult
(
boolean
b
)
{
}
},
null
);
}
public
static
void
startActivity3
(
Intent
intent
)
{
...
...
@@ -57,7 +44,8 @@ public class IntentUtils {
}
@Override
public
void
onResult
(
boolean
b
)
{
}
public
void
onResult
(
boolean
b
)
{
}
},
null
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
app/src/main/java/com/mints/flowbox/utils/keepalive/LockPermissionUtils.java
View file @
31e9c71d
...
...
@@ -10,11 +10,6 @@ import android.util.Log;
import
java.lang.reflect.Method
;
/**
* @author jyx
* @date 2021/7/13
* @des
*/
public
class
LockPermissionUtils
{
public
static
final
String
TAG
=
"LockPermissionUtils"
;
...
...
app/src/main/java/com/mints/library/utils/nodoubleclick/AntiShake.java
View file @
31e9c71d
package
com
.
mints
.
library
.
utils
.
nodoubleclick
;
public
class
AntiShake
{
private
static
LimitQueue
<
OneClick
>
queue
=
new
LimitQueue
<>(
20
);
private
static
final
LimitQueue
<
OneClick
>
queue
=
new
LimitQueue
<>(
20
);
public
static
boolean
check
(
Object
o
)
{
String
flag
;
...
...
app/src/main/res/layout/activity_food_subsidy.xml
View file @
31e9c71d
...
...
@@ -42,7 +42,7 @@
</FrameLayout>
<com.mints.flowbox.ui.widgets.RoundRectLayout
android:id=
"@+id/fl
SubsidykA
d"
android:id=
"@+id/fl
_a
d"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
...
...
app/src/main/res/layout/activity_walk.xml
View file @
31e9c71d
...
...
@@ -41,7 +41,7 @@
</FrameLayout>
<com.mints.flowbox.ui.widgets.RoundRectLayout
android:id=
"@+id/fl
WalkA
d"
android:id=
"@+id/fl
_a
d"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
...
...
app/src/main/res/layout/activity_water.xml
View file @
31e9c71d
...
...
@@ -40,7 +40,7 @@
</FrameLayout>
<com.mints.flowbox.ui.widgets.RoundRectLayout
android:id=
"@+id/fl
WaterA
d"
android:id=
"@+id/fl
_a
d"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
...
...
app/src/main/res/layout/fragment_home.xml
View file @
31e9c71d
...
...
@@ -55,11 +55,13 @@
android:paddingEnd=
"10dp"
>
<ImageView
android:id=
"@+id/ivBanner"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/bg_banner"
/>
<TextView
android:id=
"@+id/tvTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
...
...
app/src/main/res/layout/fragment_wifi.xml
View file @
31e9c71d
...
...
@@ -49,7 +49,7 @@
android:layout_height=
"wrap_content"
android:layout_alignStart=
"@id/tv_1"
android:layout_alignBottom=
"@id/ivImg"
android:layout_marginBottom=
"1
5
dp"
android:layout_marginBottom=
"1
6
dp"
android:text=
"您身边的网络专家"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
...
...
@@ -60,7 +60,7 @@
android:layout_height=
"wrap_content"
android:layout_below=
"@id/ivImgHint"
android:layout_alignParentEnd=
"true"
android:layout_marginEnd=
"
2
0dp"
android:layout_marginEnd=
"
3
0dp"
android:src=
"@mipmap/ic_make_money"
/>
<ImageView
...
...
@@ -69,7 +69,7 @@
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"1
0
dp"
android:layout_marginEnd=
"1
5
dp"
android:layout_marginBottom=
"2dp"
android:src=
"@mipmap/ic_make_money_hint"
/>
...
...
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