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
0b3c1526
Commit
0b3c1526
authored
Jul 14, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新应用外信息流展示,添加应用外弹窗权限
parent
030e7d21
Changes
48
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
1406 additions
and
526 deletions
+1406
-526
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+10
-3
MintsApplication.java
app/src/main/java/com/mints/flowbox/MintsApplication.java
+101
-49
AppOutGroMoreCarrierExpressManager.kt
.../flowbox/ad/express/AppOutGroMoreCarrierExpressManager.kt
+6
-4
ExpressManager.kt
.../main/java/com/mints/flowbox/ad/express/ExpressManager.kt
+6
-0
AlarmManager.java
...c/main/java/com/mints/flowbox/keepalive/AlarmManager.java
+42
-16
ScreenWatch.java
...rc/main/java/com/mints/flowbox/keepalive/ScreenWatch.java
+4
-2
CsjGroMoreManager.kt
.../main/java/com/mints/flowbox/manager/CsjGroMoreManager.kt
+2
-4
UserWeight.kt
app/src/main/java/com/mints/flowbox/manager/UserWeight.kt
+30
-27
CleanActivity.kt
...main/java/com/mints/flowbox/ui/activitys/CleanActivity.kt
+13
-7
Increasespeed2Activity.kt
.../com/mints/flowbox/ui/activitys/Increasespeed2Activity.kt
+3
-3
IncreasespeedActivity.kt
...a/com/mints/flowbox/ui/activitys/IncreasespeedActivity.kt
+38
-37
MainActivity.kt
.../main/java/com/mints/flowbox/ui/activitys/MainActivity.kt
+28
-17
ScanActivity.kt
.../main/java/com/mints/flowbox/ui/activitys/ScanActivity.kt
+49
-1
SpeedTestActivity.kt
.../java/com/mints/flowbox/ui/activitys/SpeedTestActivity.kt
+6
-0
OutAppActivity.kt
...ava/com/mints/flowbox/ui/activitys/base/OutAppActivity.kt
+57
-0
ApkActivity.kt
...a/com/mints/flowbox/ui/activitys/keepalive/ApkActivity.kt
+23
-3
BoostActivity.kt
...com/mints/flowbox/ui/activitys/keepalive/BoostActivity.kt
+2
-4
ScreenActivity.kt
...om/mints/flowbox/ui/activitys/keepalive/ScreenActivity.kt
+17
-49
TimingActivity.kt
...om/mints/flowbox/ui/activitys/keepalive/TimingActivity.kt
+191
-0
BonusTaskAdapter.kt
...ain/java/com/mints/flowbox/ui/adapter/BonusTaskAdapter.kt
+1
-1
GvSignAdapter.java
...main/java/com/mints/flowbox/ui/adapter/GvSignAdapter.java
+3
-0
MainWifiAdapter.kt
...main/java/com/mints/flowbox/ui/adapter/MainWifiAdapter.kt
+2
-0
BonusFragment.kt
.../main/java/com/mints/flowbox/ui/fragment/BonusFragment.kt
+5
-15
GetPacketFragment.kt
...n/java/com/mints/flowbox/ui/fragment/GetPacketFragment.kt
+2
-1
HomeFragment.kt
...c/main/java/com/mints/flowbox/ui/fragment/HomeFragment.kt
+22
-45
MyFragment.kt
...src/main/java/com/mints/flowbox/ui/fragment/MyFragment.kt
+24
-24
VideoFragment.kt
.../main/java/com/mints/flowbox/ui/fragment/VideoFragment.kt
+2
-3
WifiFragment.kt
...c/main/java/com/mints/flowbox/ui/fragment/WifiFragment.kt
+42
-25
WifiView.java
app/src/main/java/com/mints/flowbox/ui/widgets/WifiView.java
+6
-1
ForegroundOrBackground.java
.../java/com/mints/flowbox/utils/ForegroundOrBackground.java
+3
-0
TimeThread.java
app/src/main/java/com/mints/flowbox/utils/TimeThread.java
+2
-1
WifiUtils.java
app/src/main/java/com/mints/flowbox/utils/WifiUtils.java
+0
-1
IntentNotificationUtils.kt
.../mints/flowbox/utils/keepalive/IntentNotificationUtils.kt
+0
-0
IntentUtils.java
...n/java/com/mints/flowbox/utils/keepalive/IntentUtils.java
+77
-0
LockPermissionUtils.java
...om/mints/flowbox/utils/keepalive/LockPermissionUtils.java
+19
-68
ScreenLockerUtils.kt
...va/com/mints/flowbox/utils/keepalive/ScreenLockerUtils.kt
+282
-0
loading.gif
app/src/main/res/drawable-xhdpi/loading.gif
+0
-0
bg_gray_circle.xml
app/src/main/res/drawable/bg_gray_circle.xml
+1
-1
activity_aboutus.xml
app/src/main/res/layout/activity_aboutus.xml
+3
-4
activity_apk.xml
app/src/main/res/layout/activity_apk.xml
+53
-16
activity_award.xml
app/src/main/res/layout/activity_award.xml
+1
-0
activity_boost.xml
app/src/main/res/layout/activity_boost.xml
+18
-5
activity_screen.xml
app/src/main/res/layout/activity_screen.xml
+95
-73
activity_timing.xml
app/src/main/res/layout/activity_timing.xml
+102
-0
dialog_power.xml
app/src/main/res/layout/dialog_power.xml
+12
-15
fragment_wifi.xml
app/src/main/res/layout/fragment_wifi.xml
+1
-1
bg_right.png
app/src/main/res/mipmap-xhdpi/bg_right.png
+0
-0
ic_bouns_redbox.png
app/src/main/res/mipmap-xhdpi/ic_bouns_redbox.png
+0
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
0b3c1526
...
@@ -168,21 +168,28 @@
...
@@ -168,21 +168,28 @@
android:launchMode=
"singleInstance"
/>
android:launchMode=
"singleInstance"
/>
<activity
<activity
android:name=
".ui.activitys.ScreenActivity"
android:name=
".ui.activitys.
keepalive.
ScreenActivity"
android:excludeFromRecents=
"true"
android:excludeFromRecents=
"true"
android:exported=
"false"
android:exported=
"false"
android:finishOnTaskLaunch=
"false"
android:finishOnTaskLaunch=
"false"
android:launchMode=
"singleInstance"
android:launchMode=
"singleInstance"
android:theme=
"@style/CustomerTransparentTheme"
/>
android:theme=
"@style/CustomerTransparentTheme"
/>
<activity
<activity
android:name=
".ui.activitys.BoostActivity"
android:name=
".ui.activitys.
keepalive.
BoostActivity"
android:excludeFromRecents=
"true"
android:excludeFromRecents=
"true"
android:exported=
"false"
android:exported=
"false"
android:finishOnTaskLaunch=
"false"
android:finishOnTaskLaunch=
"false"
android:launchMode=
"singleInstance"
android:launchMode=
"singleInstance"
android:theme=
"@style/CustomerTransparentTheme"
/>
android:theme=
"@style/CustomerTransparentTheme"
/>
<activity
<activity
android:name=
".ui.activitys.ApkActivity"
android:name=
".ui.activitys.keepalive.ApkActivity"
android:excludeFromRecents=
"true"
android:exported=
"false"
android:finishOnTaskLaunch=
"false"
android:launchMode=
"singleInstance"
android:theme=
"@style/CustomerTransparentTheme"
/>
<activity
android:name=
".ui.activitys.keepalive.TimingActivity"
android:excludeFromRecents=
"true"
android:excludeFromRecents=
"true"
android:exported=
"false"
android:exported=
"false"
android:finishOnTaskLaunch=
"false"
android:finishOnTaskLaunch=
"false"
...
...
app/src/main/java/com/mints/flowbox/MintsApplication.java
View file @
0b3c1526
This diff is collapsed.
Click to expand it.
app/src/main/java/com/mints/flowbox/ad/express/AppOutGroMoreCarrierExpressManager.kt
View file @
0b3c1526
...
@@ -24,7 +24,7 @@ import com.mints.flowbox.utils.VideoOptionUtil
...
@@ -24,7 +24,7 @@ import com.mints.flowbox.utils.VideoOptionUtil
import
java.util.ArrayList
import
java.util.ArrayList
import
java.util.HashMap
import
java.util.HashMap
private
val
TAG
=
GroMoreCarrierExpressManager
::
class
.
java
.
simpleName
private
val
TAG
=
AppOut
GroMoreCarrierExpressManager
::
class
.
java
.
simpleName
class
AppOutGroMoreCarrierExpressManager
:
TTSettingConfigCallback
{
class
AppOutGroMoreCarrierExpressManager
:
TTSettingConfigCallback
{
...
@@ -69,7 +69,10 @@ class AppOutGroMoreCarrierExpressManager : TTSettingConfigCallback {
...
@@ -69,7 +69,10 @@ class AppOutGroMoreCarrierExpressManager : TTSettingConfigCallback {
private
fun
loadAd
()
{
private
fun
loadAd
()
{
mTTAdNative
=
mTTAdNative
=
TTUnifiedNativeAd
(
MintsApplication
.
getContext
(),
CsjGroMoreManager
.
APP_OUT_AD_UNIT_EXPRESS_ID
)
TTUnifiedNativeAd
(
MintsApplication
.
getContext
(),
CsjGroMoreManager
.
APP_OUT_AD_UNIT_LOCK_EXPRESS_ID
)
//视频声音控制设置
//视频声音控制设置
var
videoOption
:
TTVideoOption
=
VideoOptionUtil
.
getTTVideoOption
()
var
videoOption
:
TTVideoOption
=
VideoOptionUtil
.
getTTVideoOption
()
...
@@ -86,7 +89,6 @@ class AppOutGroMoreCarrierExpressManager : TTSettingConfigCallback {
...
@@ -86,7 +89,6 @@ class AppOutGroMoreCarrierExpressManager : TTSettingConfigCallback {
.
setRequestMultipleImages
(
true
).
isReturnUrlsForImageAssets
=
.
setRequestMultipleImages
(
true
).
isReturnUrlsForImageAssets
=
true
//设置为true,SDK会仅提供Uri字段的值,允许自行决定是否下载实际图片,同时不会提供Drawable字段的值
true
//设置为true,SDK会仅提供Uri字段的值,允许自行决定是否下载实际图片,同时不会提供Drawable字段的值
// 针对Gdt Native自渲染广告,可以自定义gdt logo的布局参数。该参数可选,非必须。
// 针对Gdt Native自渲染广告,可以自定义gdt logo的布局参数。该参数可选,非必须。
val
gdtNativeAdLogUtiloParams
=
FrameLayout
.
LayoutParams
(
val
gdtNativeAdLogUtiloParams
=
FrameLayout
.
LayoutParams
(
BubbleUtils
.
dp2px
(
40
),
BubbleUtils
.
dp2px
(
40
),
...
@@ -150,7 +152,7 @@ class AppOutGroMoreCarrierExpressManager : TTSettingConfigCallback {
...
@@ -150,7 +152,7 @@ class AppOutGroMoreCarrierExpressManager : TTSettingConfigCallback {
vo
[
"ecpm"
]
=
ttNativeAd
.
preEcpm
vo
[
"ecpm"
]
=
ttNativeAd
.
preEcpm
vo
[
"adSource"
]
=
ttNativeAd
.
adNetworkPlatformId
vo
[
"adSource"
]
=
ttNativeAd
.
adNetworkPlatformId
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE1
vo
[
"adType"
]
=
Constant
.
GRO_MORE_ADTYPE1
vo
[
"adid"
]
=
CsjGroMoreManager
.
APP_OUT_AD_UNIT_EXPRESS_ID
vo
[
"adid"
]
=
CsjGroMoreManager
.
APP_OUT_AD_UNIT_
LOCK_
EXPRESS_ID
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
)
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
)
}
}
}
}
...
...
app/src/main/java/com/mints/flowbox/ad/express/ExpressManager.kt
View file @
0b3c1526
...
@@ -8,6 +8,9 @@ import com.mints.flowbox.common.AppConfig
...
@@ -8,6 +8,9 @@ import com.mints.flowbox.common.AppConfig
*/
*/
object
ExpressManager
{
object
ExpressManager
{
/**
* @param isMain 是否是网赚信息流
*/
fun
loadExpress
(
isMain
:
Boolean
)
{
fun
loadExpress
(
isMain
:
Boolean
)
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
GroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
(
isMain
)
GroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
(
isMain
)
...
@@ -18,6 +21,7 @@ object ExpressManager {
...
@@ -18,6 +21,7 @@ object ExpressManager {
}
}
}
}
/** 加载应用外信息流 */
fun
loadAppOutExpress
()
{
fun
loadAppOutExpress
()
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
AppOutGroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
()
AppOutGroMoreCarrierExpressManager
.
instance
.
loadADFrameLayout
()
...
@@ -28,6 +32,7 @@ object ExpressManager {
...
@@ -28,6 +32,7 @@ object ExpressManager {
// }
// }
}
}
/** 获取应用内信息流 */
fun
getExpressFrameLayout
():
FrameLayout
?
{
fun
getExpressFrameLayout
():
FrameLayout
?
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
return
GroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
()
return
GroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
()
...
@@ -37,6 +42,7 @@ object ExpressManager {
...
@@ -37,6 +42,7 @@ object ExpressManager {
}
}
}
}
/** 获取应用外信息流 */
fun
getAppOutExpressFrameLayout
():
FrameLayout
?
{
fun
getAppOutExpressFrameLayout
():
FrameLayout
?
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
if
(
AppConfig
.
groMoreVideoAdCount
>
0
)
{
return
AppOutGroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
()
return
AppOutGroMoreCarrierExpressManager
.
instance
.
getADFrameLayout
()
...
...
app/src/main/java/com/mints/flowbox/keepalive/AlarmManager.java
View file @
0b3c1526
...
@@ -9,9 +9,11 @@ import com.mints.flowbox.MintsApplication;
...
@@ -9,9 +9,11 @@ import com.mints.flowbox.MintsApplication;
import
com.mints.flowbox.ad.express.ExpressManager
;
import
com.mints.flowbox.ad.express.ExpressManager
;
import
com.mints.flowbox.common.AppConfig
;
import
com.mints.flowbox.common.AppConfig
;
import
com.mints.flowbox.manager.TrackManager
;
import
com.mints.flowbox.manager.TrackManager
;
import
com.mints.flowbox.ui.activitys.BoostActivity
;
import
com.mints.flowbox.ui.activitys.keepalive.BoostActivity
;
import
com.mints.flowbox.ui.activitys.keepalive.TimingActivity
;
import
com.mints.flowbox.utils.ForegroundOrBackground
;
import
com.mints.flowbox.utils.ForegroundOrBackground
;
import
com.mints.flowbox.utils.IntentUtils
;
import
com.mints.flowbox.utils.LogUtil
;
import
com.mints.flowbox.utils.keepalive.IntentUtils
;
/**
/**
* 描述:应用外广告定时器
* 描述:应用外广告定时器
...
@@ -24,7 +26,7 @@ public class AlarmManager implements WeakHandler.IHandler {
...
@@ -24,7 +26,7 @@ public class AlarmManager implements WeakHandler.IHandler {
public
static
final
int
WIFI_MINTER
=
3
;
//单位-分钟,wifi页重置
public
static
final
int
WIFI_MINTER
=
3
;
//单位-分钟,wifi页重置
public
static
final
int
USER_ACTIVE_MINTER
=
10
;
//单位-分钟,用户激活接口
public
static
final
int
USER_ACTIVE_MINTER
=
10
;
//单位-分钟,用户激活接口
public
static
final
int
APP_OUT_CLEAR_MINTER
=
1
0
;
//单位-分钟,应用外清理
public
static
final
int
APP_OUT_CLEAR_MINTER
=
1
;
//单位-分钟,应用外清理
public
static
final
long
ONE_MINTER_Interval
=
60
*
1000
;
//60秒
public
static
final
long
ONE_MINTER_Interval
=
60
*
1000
;
//60秒
public
static
final
long
TEN_SECOND_Interval
=
10
*
1000
;
//10秒
public
static
final
long
TEN_SECOND_Interval
=
10
*
1000
;
//10秒
...
@@ -33,6 +35,9 @@ public class AlarmManager implements WeakHandler.IHandler {
...
@@ -33,6 +35,9 @@ public class AlarmManager implements WeakHandler.IHandler {
private
volatile
int
curTime
=
1
;
//每分钟变一次
private
volatile
int
curTime
=
1
;
//每分钟变一次
public
volatile
int
userTime
=
1
;
//应用外用户操作时间
public
volatile
int
userTime
=
1
;
//应用外用户操作时间
// 定时展示页面的类型
public
volatile
int
currentType
=
0
;
private
WeakHandler
mHandler
;
private
WeakHandler
mHandler
;
public
static
AlarmManager
getInstance
()
{
public
static
AlarmManager
getInstance
()
{
...
@@ -69,6 +74,8 @@ public class AlarmManager implements WeakHandler.IHandler {
...
@@ -69,6 +74,8 @@ public class AlarmManager implements WeakHandler.IHandler {
// 防止userTime超出Integer范围
// 防止userTime超出Integer范围
if
(
userTime
<
20
)
userTime
++;
if
(
userTime
<
20
)
userTime
++;
LogUtil
.
d
(
"AAAAAAAAAA"
);
// 固定时间增长
// 固定时间增长
exeActionForTime
(
curTime
);
exeActionForTime
(
curTime
);
// 用户操作按时间增长
// 用户操作按时间增长
...
@@ -90,19 +97,20 @@ public class AlarmManager implements WeakHandler.IHandler {
...
@@ -90,19 +97,20 @@ public class AlarmManager implements WeakHandler.IHandler {
// 应用在前台时,不弹出应用外广告
// 应用在前台时,不弹出应用外广告
if
(
ForegroundOrBackground
.
isForeground2
())
{
if
(
ForegroundOrBackground
.
isForeground2
())
{
this
.
resetUserActionTime
();
return
;
return
;
}
}
// 预加载信息流
this
.
resetUserActionTime
();
ExpressManager
.
INSTANCE
.
loadAppOutExpress
();
showTimingActivity
();
//用户关闭界面后10分钟调用
// // 预加载信息流
Intent
intent
=
new
Intent
(
MintsApplication
.
getContext
(),
BoostActivity
.
class
);
// ExpressManager.INSTANCE.loadAppOutExpress();
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
// //用户关闭界面后10分钟调用
Bundle
bundle
=
new
Bundle
();
// Intent intent = new Intent(MintsApplication.getContext(), BoostActivity.class);
bundle
.
putBoolean
(
BoostActivity
.
IS_FROM_ALARM
,
true
);
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
intent
.
putExtras
(
bundle
);
// Bundle bundle = new Bundle();
IntentUtils
.
startActivity
(
ForegroundOrBackground
.
getMain_activity
(),
intent
);
// bundle.putBoolean(BoostActivity.IS_FROM_ALARM, true);
// intent.putExtras(bundle);
// IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent);
}
}
}
}
...
@@ -114,9 +122,9 @@ public class AlarmManager implements WeakHandler.IHandler {
...
@@ -114,9 +122,9 @@ public class AlarmManager implements WeakHandler.IHandler {
private
void
exeActionForTime
(
int
curTime
)
{
private
void
exeActionForTime
(
int
curTime
)
{
if
(
curTime
%
WIFI_MINTER
==
0
)
{
if
(
curTime
%
WIFI_MINTER
==
0
)
{
//每3分钟 wifi界面功能重置
//每3分钟 wifi界面功能重置
AppConfig
.
isCanBoost
=
true
;
//
AppConfig.isCanBoost = true;
AppConfig
.
isCanClean
=
true
;
//
AppConfig.isCanClean = true;
AppConfig
.
isCanSaveBattery
=
true
;
//
AppConfig.isCanSaveBattery = true;
AppConfig
.
fakeBoostCount
=
0
;
AppConfig
.
fakeBoostCount
=
0
;
AppConfig
.
fakeCleanCount
=
0
;
AppConfig
.
fakeCleanCount
=
0
;
...
@@ -127,6 +135,24 @@ public class AlarmManager implements WeakHandler.IHandler {
...
@@ -127,6 +135,24 @@ public class AlarmManager implements WeakHandler.IHandler {
}
}
}
}
/**
* 展示定时页面
*/
private
void
showTimingActivity
()
{
// 预加载信息流
ExpressManager
.
INSTANCE
.
loadAppOutExpress
();
currentType
++;
if
(
currentType
>
2
)
{
currentType
=
0
;
}
Intent
intent
=
new
Intent
(
MintsApplication
.
getContext
(),
TimingActivity
.
class
);
intent
.
putExtra
(
TimingActivity
.
TIMING_TYPE
,
currentType
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
|
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
);
IntentUtils
.
startActivity
(
ForegroundOrBackground
.
getMain_activity
(),
intent
);
}
/**
/**
* 重置用户操作时长
* 重置用户操作时长
*/
*/
...
...
app/src/main/java/com/mints/flowbox/keepalive/ScreenWatch.java
View file @
0b3c1526
...
@@ -40,6 +40,8 @@ public class ScreenWatch {
...
@@ -40,6 +40,8 @@ public class ScreenWatch {
mScreenStateListener
.
onScreenOn
();
mScreenStateListener
.
onScreenOn
();
}
else
if
(
Intent
.
ACTION_SCREEN_OFF
.
equals
(
intent
.
getAction
()))
{
// 息屏
}
else
if
(
Intent
.
ACTION_SCREEN_OFF
.
equals
(
intent
.
getAction
()))
{
// 息屏
mScreenStateListener
.
onScreenOff
();
mScreenStateListener
.
onScreenOff
();
}
else
if
(
Intent
.
ACTION_USER_PRESENT
.
equals
(
intent
.
getAction
()))
{
// 解锁屏幕
mScreenStateListener
.
onScreenOff
();
}
}
}
}
}
}
...
@@ -75,8 +77,8 @@ public class ScreenWatch {
...
@@ -75,8 +77,8 @@ public class ScreenWatch {
void
onScreenOn
();
void
onScreenOn
();
void
onScreenOff
();
void
onScreenOff
();
//
// public
void onUserPresent();
void
onUserPresent
();
}
}
}
}
app/src/main/java/com/mints/flowbox/manager/CsjGroMoreManager.kt
View file @
0b3c1526
package
com.mints.flowbox.manager
package
com.mints.flowbox.manager
import
android.text.TextUtils
import
com.mints.flowbox.MintsApplication
import
com.mints.flowbox.MintsApplication
import
com.mints.flowbox.manager.ad.TTGroMoreAdManagerHolder
import
com.mints.flowbox.manager.ad.TTGroMoreAdManagerHolder
import
com.mints.flowbox.mvp.model.GroAdcodeBean
import
com.mints.flowbox.mvp.model.GroAdcodeBean
/**
/**
* 穿山甲GroMore
* 穿山甲GroMore
*/
*/
...
@@ -25,12 +23,12 @@ object CsjGroMoreManager {
...
@@ -25,12 +23,12 @@ object CsjGroMoreManager {
* 应用外:
* 应用外:
* 普通:
* 普通:
* 新插屏 -> 946333773
* 新插屏 -> 946333773
* 信息流 -> 94633992
* 信息流 -> 94633
3
992
* 锁屏:
* 锁屏:
* 信息流 -> 946334023
* 信息流 -> 946334023
*/
*/
var
APP_OUT_AD_UNIT_EXPRESS_ID
=
"94633992"
// 应用外普通信息流
var
APP_OUT_AD_UNIT_EXPRESS_ID
=
"94633
3
992"
// 应用外普通信息流
var
APP_OUT_AD_UNIT_LOCK_EXPRESS_ID
=
"946334023"
// 应用外锁屏信息流
var
APP_OUT_AD_UNIT_LOCK_EXPRESS_ID
=
"946334023"
// 应用外锁屏信息流
var
APP_OUT_AD_UNIT_INTERSTITIAL_ID
=
"946333773"
// 应用外插屏
var
APP_OUT_AD_UNIT_INTERSTITIAL_ID
=
"946333773"
// 应用外插屏
...
...
app/src/main/java/com/mints/flowbox/manager/UserWeight.kt
View file @
0b3c1526
...
@@ -26,26 +26,28 @@ object UserWeight {
...
@@ -26,26 +26,28 @@ object UserWeight {
groMoreCount
=
data
.
vedioRules
.
gromorE_VEDIO
.
surplus
groMoreCount
=
data
.
vedioRules
.
gromorE_VEDIO
.
surplus
}
}
videoAdingManager
.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
videoAdingManager
.
initAdWeight
(
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
0
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
0
,
0
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
,
0
,
data
.
vedioRules
.
kS_VEDIO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
,
groMoreRate
,
data
.
vedioRules
.
kS_VEDIO
.
rate
,
data
.
vedioRules
.
oW_VEDIO
.
rate
groMoreRate
,
data
.
vedioRules
.
oW_VEDIO
.
rate
)
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
LogUtil
.
d
(
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} "
+
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} "
+
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} "
+
"shWeight:${0} "
+
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} "
+
"flWeight:${0} "
+
"shWeight:${0} "
+
"groMoreWeight:${groMoreRate} "
+
"flWeight:${0} "
+
"owWeight:${data.vedioRules.oW_VEDIO.rate} "
+
"groMoreWeight:${groMoreRate} "
+
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
"owWeight:${data.vedioRules.oW_VEDIO.rate} "
+
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
)
)
// 广告视频数
// 广告视频数
AppConfig
.
csjVideoAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
csjVideoAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
...
@@ -57,15 +59,16 @@ object UserWeight {
...
@@ -57,15 +59,16 @@ object UserWeight {
AppConfig
.
owVideoAdCount
=
data
.
vedioRules
.
oW_VEDIO
.
surplus
AppConfig
.
owVideoAdCount
=
data
.
vedioRules
.
oW_VEDIO
.
surplus
AppConfig
.
csjFullVedioAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
AppConfig
.
csjFullVedioAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
AppConfig
.
groMoreVideoAdCount
=
groMoreCount
AppConfig
.
groMoreVideoAdCount
=
groMoreCount
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
LogUtil
.
d
(
"ylhCount:${AppConfig.ylhAdCount} "
+
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"csjFullCount:${AppConfig.csjFullVedioAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"shCount:${0} "
+
"csjFullCount:${AppConfig.csjFullVedioAdCount} "
+
"flCount:${0} "
+
"shCount:${0} "
+
"groMoreCount:${AppConfig.groMoreVideoAdCount} "
+
"flCount:${0} "
+
"owCount:${AppConfig.owVideoAdCount} "
+
"groMoreCount:${AppConfig.groMoreVideoAdCount} "
+
"ksCount:${AppConfig.ksVideoAdCount}"
"owCount:${AppConfig.owVideoAdCount} "
+
"ksCount:${AppConfig.ksVideoAdCount}"
)
)
}
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/activitys/CleanActivity.kt
View file @
0b3c1526
...
@@ -254,7 +254,6 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
...
@@ -254,7 +254,6 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
}
}
if
(
taskType
==
0
)
{
if
(
taskType
==
0
)
{
AppConfig
.
isCanClean
=
false
// cleaningOperation(mContext)
// cleaningOperation(mContext)
}
}
...
@@ -279,16 +278,23 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
...
@@ -279,16 +278,23 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
}
}
private
fun
toResult
()
{
private
fun
toResult
()
{
AppConfig
.
isCanClean
=
false
// 预加载信息流
// 预加载信息流
ExpressManager
.
loadExpress
(
false
)
ExpressManager
.
loadExpress
(
false
)
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
if
(
scanMax
==
1
)
{
IncreasespeedActivity
.
INCREASE_TYPE
,
// AppConfig.isCanBoost = false
IncreasespeedActivity
.
INCREASE_CLEAN
bundle
.
putString
(
)
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_BOOST
)
}
else
{
// AppConfig.isCanClean = false
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_CLEAN
)
}
readyGoThenKill
(
IncreasespeedActivity
::
class
.
java
,
bundle
)
readyGoThenKill
(
IncreasespeedActivity
::
class
.
java
,
bundle
)
}
}
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/Increasespeed2Activity.kt
View file @
0b3c1526
...
@@ -49,7 +49,7 @@ class Increasespeed2Activity : BaseActivity(), View.OnClickListener {
...
@@ -49,7 +49,7 @@ class Increasespeed2Activity : BaseActivity(), View.OnClickListener {
private
val
mStringArr1
=
mutableListOf
(
private
val
mStringArr1
=
mutableListOf
(
"检测结果WiFi加密安全性"
,
"检测结果WiFi加密安全性"
,
"检查ARP网络攻击异常"
,
"检查ARP网络攻击异常"
,
"提升DNS劫持安
STEP_Interval
全性"
,
"提升DNS劫持安全性"
,
"部署网页防篡改"
,
"部署网页防篡改"
,
"加固链路,避免SSL中间人攻击"
,
"加固链路,避免SSL中间人攻击"
,
"检测是否钓鱼WiFi"
"检测是否钓鱼WiFi"
...
@@ -105,8 +105,8 @@ class Increasespeed2Activity : BaseActivity(), View.OnClickListener {
...
@@ -105,8 +105,8 @@ class Increasespeed2Activity : BaseActivity(), View.OnClickListener {
}
else
{
}
else
{
containerAnim
.
setBackgroundColor
(
Color
.
parseColor
(
"#8278DC"
))
containerAnim
.
setBackgroundColor
(
Color
.
parseColor
(
"#8278DC"
))
GlideUtils
.
loadImageViewGif
(
this
,
R
.
drawable
.
safe_check
,
iv_gif
)
GlideUtils
.
loadImageViewGif
(
this
,
R
.
drawable
.
safe_check
,
iv_gif
)
mTimerMax
=
10
mTimerMax
=
9
NumAnimUtil
.
startAnim
(
tv_progress
,
100f
,
((
mTimerMax
-
4
)
*
STEP_Interval
))
NumAnimUtil
.
startAnim
(
tv_progress
,
100f
,
((
mTimerMax
-
6
)
*
STEP_Interval
))
}
}
mTimer
=
Timer
()
mTimer
=
Timer
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/IncreasespeedActivity.kt
View file @
0b3c1526
...
@@ -95,56 +95,54 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
...
@@ -95,56 +95,54 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
}
}
})
})
if
(
mIncreaseType
==
INCREASE_BOOST
&&
AppConfig
.
isCanBoost
)
{
//
if (mIncreaseType == INCREASE_BOOST && AppConfig.isCanBoost) {
//
if (mIncreaseType == INCREASE_BOOST) {
if
(
mIncreaseType
==
INCREASE_BOOST
)
{
startTimer
()
startTimer
()
}
else
if
(
mIncreaseType
==
INCREASE_SAVE_ELECTRICITY
&&
AppConfig
.
isCanSaveBattery
)
{
//
} else if (mIncreaseType == INCREASE_SAVE_ELECTRICITY && AppConfig.isCanSaveBattery) {
//
} else if (mIncreaseType == INCREASE_SAVE_ELECTRICITY) {
}
else
if
(
mIncreaseType
==
INCREASE_SAVE_ELECTRICITY
)
{
startTimer
()
startTimer
()
mTimerMax
=
11
mTimerMax
=
11
}
else
if
(
mIncreaseType
==
INCREASE_CLEAN
&&
AppConfig
.
isCanClean
)
{
//
} else if (mIncreaseType == INCREASE_CLEAN && AppConfig.isCanClean) {
//
} else if (mIncreaseType == INCREASE_CLEAN) {
}
else
if
(
mIncreaseType
==
INCREASE_CLEAN
)
{
startTimer
()
startTimer
()
mTimerMax
=
14
mTimerMax
=
14
}
else
{
}
else
{
initView
()
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
// 动画结束后 展示插屏广告
// 动画结束后 展示插屏广告
mWifiAdManager
?.
showInterstitial
()
mWifiAdManager
?.
showInterstitial
()
showFirstGive
()
showFirstGive
()
},
3000
)
},
3000
)
}
}
initView
()
}
}
private
fun
showFirstGive
()
{
private
fun
showFirstGive
()
{
// 新人福利
// 新人福利
if
(
AppConfig
.
isShowFirstGive
)
{
// 游客首次提示1500新人奖励 且 不是分享包
// 游客首次提示1500新人奖励 且 不是分享包
val
channel
=
CommonUtils
.
getAppMetaData
(
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
"CHANNEL_NAME"
)
if
(!
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
)
&&
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
FIRST_VISITOR_FLAG
,
true
)
)
if
(!
TextUtils
.
equals
(
)
{
channel
,
AppPreferencesManager
.
get
().
put
(
Constant
.
FIRST_VISITOR_FLAG
,
false
)
Constant
.
CHANNEL_SHARE
val
bundle
=
Bundle
()
)
&&
AppPreferencesManager
.
get
().
getBoolean
(
bundle
.
putInt
(
Constant
.
FIRST_VISITOR_FLAG
,
Constant
.
MAIN_CUR_COIN
,
true
AppConfig
.
firstGiveCoin
)
)
)
{
bundle
.
putString
(
AppPreferencesManager
.
get
().
put
(
Constant
.
FIRST_VISITOR_FLAG
,
false
)
Constant
.
MAIN_CARRIER_TYPE
,
val
bundle
=
Bundle
()
Constant
.
CARRIER_NEW_VISITOR
bundle
.
putInt
(
)
Constant
.
MAIN_CUR_COIN
,
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
AppConfig
.
firstGiveCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_NEW_VISITOR
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
}
}
}
...
@@ -178,6 +176,8 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
...
@@ -178,6 +176,8 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
runOnUiThread
{
runOnUiThread
{
step
++
step
++
if
(
step
==
mTimerMax
-
2
)
{
if
(
step
==
mTimerMax
-
2
)
{
initView
()
YoYo
.
with
(
Techniques
.
FadeOut
).
duration
(
600
).
playOn
(
containerAnim
)
YoYo
.
with
(
Techniques
.
FadeOut
).
duration
(
600
).
playOn
(
containerAnim
)
if
(
mIncreaseType
==
INCREASE_CLEAN
)
{
if
(
mIncreaseType
==
INCREASE_CLEAN
)
{
// 一键清理
// 一键清理
...
@@ -224,10 +224,10 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
...
@@ -224,10 +224,10 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
infoStr
=
"网速像飞一样快~"
infoStr
=
"网速像飞一样快~"
}
}
INCREASE_BOOST
->
{
INCREASE_BOOST
->
{
AppConfig
.
isCanBoost
=
false
if
(
AppConfig
.
fakeBoostCount
==
0
)
{
if
(
AppConfig
.
fakeBoostCount
==
0
)
{
AppConfig
.
fakeBoostCount
=
10
+
Random
.
nextInt
(
15
)
AppConfig
.
fakeBoostCount
=
10
+
Random
.
nextInt
(
15
)
}
}
// AppConfig.isCanBoost = false
headTitleStr
=
"一键加速"
headTitleStr
=
"一键加速"
titleStr
=
SpanUtils
()
titleStr
=
SpanUtils
()
.
append
(
"运行速度已提升"
)
.
append
(
"运行速度已提升"
)
...
@@ -237,6 +237,7 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
...
@@ -237,6 +237,7 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
infoStr
=
"成功清理完成"
infoStr
=
"成功清理完成"
}
}
INCREASE_CLEAN
->
{
INCREASE_CLEAN
->
{
// AppConfig.isCanClean = false
headTitleStr
=
"一键清理"
headTitleStr
=
"一键清理"
titleStr
=
SpanUtils
()
titleStr
=
SpanUtils
()
.
append
(
"已经清理后台软件"
)
.
append
(
"已经清理后台软件"
)
...
@@ -247,9 +248,9 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
...
@@ -247,9 +248,9 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
}
}
INCREASE_SAVE_ELECTRICITY
->
{
INCREASE_SAVE_ELECTRICITY
->
{
AppConfig
.
isCanSaveBattery
=
false
AppConfig
.
isCanSaveBattery
=
false
if
(
AppConfig
.
fakeBoost
Count
==
0
)
{
// if (AppConfig.fakeSaveBattery
Count == 0) {
AppConfig
.
fakeSaveBatteryCount
=
20
+
Random
.
nextInt
(
40
)
AppConfig
.
fakeSaveBatteryCount
=
20
+
Random
.
nextInt
(
40
)
}
//
}
headTitleStr
=
"超强省电"
headTitleStr
=
"超强省电"
titleStr
=
SpanUtils
()
titleStr
=
SpanUtils
()
.
append
(
"延长待机时间"
)
.
append
(
"延长待机时间"
)
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/MainActivity.kt
View file @
0b3c1526
...
@@ -11,6 +11,7 @@ import androidx.fragment.app.FragmentManager
...
@@ -11,6 +11,7 @@ import androidx.fragment.app.FragmentManager
import
androidx.fragment.app.FragmentTransaction
import
androidx.fragment.app.FragmentTransaction
import
com.mints.flowbox.MintsApplication
import
com.mints.flowbox.MintsApplication
import
com.mints.flowbox.R
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.ad.express.PreLoadExpressManager
import
com.mints.flowbox.ad.express.PreLoadExpressManager
import
com.mints.flowbox.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.flowbox.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.flowbox.ad.video.VideoAdingManager
import
com.mints.flowbox.ad.video.VideoAdingManager
...
@@ -27,8 +28,9 @@ import com.mints.flowbox.ui.activitys.base.BaseActivity
...
@@ -27,8 +28,9 @@ import com.mints.flowbox.ui.activitys.base.BaseActivity
import
com.mints.flowbox.ui.fragment.*
import
com.mints.flowbox.ui.fragment.*
import
com.mints.flowbox.ui.widgets.dialog.DialogListener
import
com.mints.flowbox.ui.widgets.dialog.DialogListener
import
com.mints.flowbox.ui.widgets.dialog.PowerDialog
import
com.mints.flowbox.ui.widgets.dialog.PowerDialog
import
com.mints.flowbox.utils.LogUtil
import
com.mints.flowbox.utils.WifiUtils
import
com.mints.flowbox.utils.WifiUtils
import
com.mints.
library.utils.Common
Utils
import
com.mints.
flowbox.utils.keepalive.ScreenLocker
Utils
import
com.mints.library.utils.GlideUtils
import
com.mints.library.utils.GlideUtils
import
kotlinx.android.synthetic.main.activity_main.*
import
kotlinx.android.synthetic.main.activity_main.*
...
@@ -55,8 +57,16 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
...
@@ -55,8 +57,16 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_main
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_main
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
// 奖励页预加载 信息流广告
ExpressManager
.
loadExpress
(
true
)
PreLoadExpressManager
.
loadADFrameLayout
()
mainPresenter
.
attachView
(
this
)
mainPresenter
.
attachView
(
this
)
LogUtil
.
d
(
"是否有系统锁屏 -> "
+
ScreenLockerUtils
.
hasSystemLockScreen
(
this
))
LogUtil
.
d
(
"是否是OV -> "
+
ScreenLockerUtils
.
isOV
())
LogUtil
.
d
(
"canShowScreenLocker -> "
+
ScreenLockerUtils
.
canShowScreenLocker
(
this
))
if
(
threeFragment
==
null
)
{
if
(
threeFragment
==
null
)
{
threeFragment
=
WifiFragment
()
threeFragment
=
WifiFragment
()
}
}
...
@@ -144,17 +154,17 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
...
@@ -144,17 +154,17 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
}
}
}
}
fun
selectVideo
()
{
//
fun selectVideo() {
twoFragment
?.
let
{
//
twoFragment?.let {
(
it
as
MoneyFragment
).
selectVideo
()
//
(it as MoneyFragment).selectVideo()
}
//
}
}
//
}
fun
selectXmly
()
{
//
fun selectXmly() {
twoFragment
?.
let
{
//
twoFragment?.let {
(
it
as
MoneyFragment
).
selectXmly
()
//
(it as MoneyFragment).selectXmly()
}
//
}
}
//
}
fun
turnDayTask
()
{
fun
turnDayTask
()
{
clickTab4Layout
()
clickTab4Layout
()
...
@@ -190,7 +200,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
...
@@ -190,7 +200,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
fun
clickTab2Layout
()
{
fun
clickTab2Layout
()
{
AppConfig
.
fragmentClickFlag
=
Constant
.
FRAGMENT_CLICK_TWO
AppConfig
.
fragmentClickFlag
=
Constant
.
FRAGMENT_CLICK_TWO
if
(
twoFragment
==
null
)
{
if
(
twoFragment
==
null
)
{
twoFragment
=
Money
Fragment
()
twoFragment
=
Video
Fragment
()
}
}
addOrShowFragment
(
supportFragmentManager
,
twoFragment
!!
,
Constant
.
FRAGMENT_TAG_TWO
)
addOrShowFragment
(
supportFragmentManager
,
twoFragment
!!
,
Constant
.
FRAGMENT_TAG_TWO
)
tab_iv_one
.
isSelected
=
false
tab_iv_one
.
isSelected
=
false
...
@@ -398,7 +408,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
...
@@ -398,7 +408,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
// token失效之后刷新数据
// token失效之后刷新数据
when
(
mRefreshType
)
{
when
(
mRefreshType
)
{
Constant
.
FRAGMENT_CLICK_ONE
->
(
oneFragment
as
HomeFragment
).
refreshData
()
Constant
.
FRAGMENT_CLICK_ONE
->
(
oneFragment
as
HomeFragment
).
refreshData
()
Constant
.
FRAGMENT_CLICK_TWO
->
(
twoFragment
as
MoneyFragment
).
refreshData
()
Constant
.
FRAGMENT_CLICK_TWO
->
{
}
Constant
.
FRAGMENT_CLICK_THREE
->
{
Constant
.
FRAGMENT_CLICK_THREE
->
{
}
}
Constant
.
FRAGMENT_CLICK_FOUR
->
{
Constant
.
FRAGMENT_CLICK_FOUR
->
{
...
@@ -442,10 +453,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
...
@@ -442,10 +453,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
// 是否上报点击广告
// 是否上报点击广告
AppConfig
.
needReportClickAdEvent
=
data
.
isNeedReportClickAdEvent
AppConfig
.
needReportClickAdEvent
=
data
.
isNeedReportClickAdEvent
if
(
data
.
userMsg
.
firstGiveCoin
>
0
)
{
//
if (data.userMsg.firstGiveCoin > 0) {
AppConfig
.
isShowFirstGive
=
true
//
AppConfig.isShowFirstGive = true
AppConfig
.
firstGiveCoin
=
data
.
userMsg
.
firstGiveCoin
//
AppConfig.firstGiveCoin = data.userMsg.firstGiveCoin
}
//
}
// 离线收益
// 离线收益
if
(
data
.
offlineBean
.
offlineIncome
>
0
)
{
if
(
data
.
offlineBean
.
offlineIncome
>
0
)
{
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/ScanActivity.kt
View file @
0b3c1526
package
com.mints.flowbox.ui.activitys
package
com.mints.flowbox.ui.activitys
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.Dialog
import
android.graphics.ImageFormat
import
android.graphics.ImageFormat
import
android.text.TextUtils
import
android.text.TextUtils
import
android.util.Size
import
android.util.Size
...
@@ -13,10 +14,13 @@ import com.google.common.util.concurrent.ListenableFuture
...
@@ -13,10 +14,13 @@ import com.google.common.util.concurrent.ListenableFuture
import
com.google.zxing.BinaryBitmap
import
com.google.zxing.BinaryBitmap
import
com.google.zxing.PlanarYUVLuminanceSource
import
com.google.zxing.PlanarYUVLuminanceSource
import
com.google.zxing.common.HybridBinarizer
import
com.google.zxing.common.HybridBinarizer
import
com.hjq.toast.ToastUtils
import
com.mints.flowbox.R
import
com.mints.flowbox.R
import
com.mints.flowbox.ui.activitys.base.BaseActivity
import
com.mints.flowbox.ui.activitys.base.BaseActivity
import
com.mints.flowbox.ui.widgets.dialog.DialogListener
import
com.mints.flowbox.ui.widgets.dialog.DialogUtils
import
com.mints.flowbox.ui.widgets.dialog.DialogUtils
import
com.mints.flowbox.utils.DecodeCodeTools
import
com.mints.flowbox.utils.DecodeCodeTools
import
com.mints.flowbox.utils.WifiUtils
import
kotlinx.android.synthetic.main.activity_scan.*
import
kotlinx.android.synthetic.main.activity_scan.*
import
java.nio.ByteBuffer
import
java.nio.ByteBuffer
import
java.util.concurrent.Executor
import
java.util.concurrent.Executor
...
@@ -158,7 +162,9 @@ class ScanActivity : BaseActivity(), View.OnClickListener {
...
@@ -158,7 +162,9 @@ class ScanActivity : BaseActivity(), View.OnClickListener {
))
))
)
{
)
{
mQrText
=
result
.
text
mQrText
=
result
.
text
DialogUtils
.
showDialog
(
this
,
mQrText
)
autoConnectWifi
(
mQrText
)
// DialogUtils.showDialog(this, mQrText)
// TODO 只扫描一张
// TODO 只扫描一张
// mIsNextAnalysis = false;
// mIsNextAnalysis = false;
}
}
...
@@ -173,6 +179,48 @@ class ScanActivity : BaseActivity(), View.OnClickListener {
...
@@ -173,6 +179,48 @@ class ScanActivity : BaseActivity(), View.OnClickListener {
}
}
/**
* SAMPLE -> WIFI:T:WPA;S:mints_wifi;P:mints@190419;;
*
*/
private
fun
autoConnectWifi
(
wifiStr
:
String
?)
{
if
(
TextUtils
.
isEmpty
(
wifiStr
))
{
ToastUtils
.
show
(
"无效的WIFI二维码!"
)
return
}
var
ssid
=
""
var
psw
=
""
wifiStr
?.
let
{
if
(!
it
.
contains
(
"WIFI"
)
or
!
it
.
contains
(
"wifi"
))
{
ToastUtils
.
show
(
"无效的WIFI二维码!"
)
return
}
ssid
=
it
.
substring
(
it
.
indexOf
(
"S:"
)
+
2
,
it
.
indexOf
(
";"
,
it
.
indexOf
(
"S:"
)))
psw
=
it
.
substring
(
it
.
indexOf
(
"P:"
)
+
2
,
it
.
indexOf
(
";"
,
it
.
indexOf
(
"P:"
)))
}
if
(
TextUtils
.
isEmpty
(
ssid
)
or
TextUtils
.
isEmpty
(
ssid
))
{
ToastUtils
.
show
(
"无效的WIFI二维码!"
)
return
}
DialogUtils
.
showDialog
(
this
,
"WIFI名称: $ssid\nWIFI密码: $psw"
,
"提示"
,
"连接"
,
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
super
.
onClick
(
dialog
,
v
)
ToastUtils
.
show
(
"正在连接中..."
)
WifiUtils
.
getInstance
(
this
@ScanActivity
).
connectWifiPws
(
ssid
,
psw
)
dialog
?.
dismiss
()
}
})
}
override
fun
onClick
(
v
:
View
?)
{
override
fun
onClick
(
v
:
View
?)
{
}
}
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/SpeedTestActivity.kt
View file @
0b3c1526
...
@@ -134,10 +134,16 @@ class SpeedTestActivity : BaseActivity(), View.OnClickListener {
...
@@ -134,10 +134,16 @@ class SpeedTestActivity : BaseActivity(), View.OnClickListener {
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
super
.
onClick
(
dialog
,
v
)
super
.
onClick
(
dialog
,
v
)
dialog
?.
dismiss
()
dialog
?.
dismiss
()
DownloadApkManager
.
instance
.
destroy
()
mTimer
?.
cancel
()
mTimer
=
null
finish
()
finish
()
}
}
})
})
}
else
{
}
else
{
DownloadApkManager
.
instance
.
destroy
()
mTimer
?.
cancel
()
mTimer
=
null
finish
()
finish
()
}
}
}
}
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/base/OutAppActivity.kt
0 → 100644
View file @
0b3c1526
package
com.mints.flowbox.ui.activitys.base
import
android.app.KeyguardManager
import
android.content.Context
import
android.graphics.Color
import
android.os.Build
import
android.os.Bundle
import
android.util.AttributeSet
import
android.view.View
import
android.view.WindowManager
import
com.mints.flowbox.R
import
com.mints.flowbox.utils.keepalive.ScreenLockerUtils
import
com.mints.library.base.BaseSwipeBackCompatActivity
import
com.mints.library.net.netstatus.NetUtils
/**
* 应用外Activity
*/
abstract
class
OutAppActivity
:
BaseSwipeBackCompatActivity
()
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
// 设置可以显示在锁屏页面之上
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O_MR1
)
{
setShowWhenLocked
(
true
)
// 强制亮屏
// setTurnScreenOn(true)
val
keyguardManager
=
getSystemService
(
Context
.
KEYGUARD_SERVICE
)
as
KeyguardManager
keyguardManager
.
requestDismissKeyguard
(
this
,
null
)
}
ScreenLockerUtils
.
updateWindowFlags
(
this
.
window
.
decorView
)
this
.
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DISMISS_KEYGUARD
or
WindowManager
.
LayoutParams
.
FLAG_SHOW_WHEN_LOCKED
or
WindowManager
.
LayoutParams
.
FLAG_TURN_SCREEN_ON
)
// 设置锁屏页全屏
ScreenLockerUtils
.
makeLockWindowFullScreen
(
this
,
this
.
window
.
attributes
,
true
)
super
.
onCreate
(
savedInstanceState
)
}
override
fun
onNetworkConnected
(
type
:
NetUtils
.
NetType
?)
{}
override
fun
onNetworkDisConnected
()
{}
override
fun
isApplyStatusBarTranslucency
()
=
false
override
fun
toggleOverridePendingTransition
()
=
false
override
fun
getOverridePendingTransitionMode
()
=
TransitionMode
.
FADE
override
fun
toggleIsBack2Left
()
=
false
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{}
override
fun
getLoadingTargetView
()
=
null
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/activitys/ApkActivity.kt
→
app/src/main/java/com/mints/flowbox/ui/activitys/
keepalive/
ApkActivity.kt
View file @
0b3c1526
package
com.mints.flowbox.ui.activitys
package
com.mints.flowbox.ui.activitys
.keepalive
import
android.os.Bundle
import
android.os.Bundle
import
android.text.TextUtils
import
android.text.TextUtils
...
@@ -7,14 +7,20 @@ import androidx.core.content.ContextCompat
...
@@ -7,14 +7,20 @@ import androidx.core.content.ContextCompat
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.daimajia.androidanimations.library.YoYo
import
com.mints.flowbox.R
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.keepalive.AlarmManager
import
com.mints.flowbox.keepalive.AlarmManager
import
com.mints.flowbox.ui.activitys.CleanActivity
import
com.mints.flowbox.ui.activitys.base.BaseActivity
import
com.mints.flowbox.ui.activitys.base.BaseActivity
import
com.mints.flowbox.utils.AppUtil
import
com.mints.flowbox.utils.AppUtil
import
com.mints.flowbox.utils.SpanUtils
import
com.mints.flowbox.utils.SpanUtils
import
com.mints.library.utils.GlideUtils
import
com.mints.library.utils.GlideUtils
import
kotlinx.android.synthetic.main.activity_apk.*
import
kotlinx.android.synthetic.main.activity_apk.*
import
kotlinx.android.synthetic.main.activity_apk.btnClean
import
kotlinx.android.synthetic.main.activity_apk.fl_ad
import
kotlinx.android.synthetic.main.activity_apk.tvInfo
import
kotlinx.android.synthetic.main.activity_boost.iv_close
import
kotlinx.android.synthetic.main.activity_boost.iv_close
import
kotlinx.android.synthetic.main.activity_timing.*
import
kotlin.random.Random
import
kotlin.random.Random
/**
/**
...
@@ -62,7 +68,6 @@ class ApkActivity : BaseActivity() {
...
@@ -62,7 +68,6 @@ class ApkActivity : BaseActivity() {
GlideUtils
.
loadImageView
(
this
,
apkInfo2
.
applicationIcon
,
ivIcon
)
GlideUtils
.
loadImageView
(
this
,
apkInfo2
.
applicationIcon
,
ivIcon
)
tvInfo2
.
visibility
=
View
.
VISIBLE
tvInfo2
.
visibility
=
View
.
VISIBLE
ivIcon
.
visibility
=
View
.
VISIBLE
ivIcon
.
visibility
=
View
.
VISIBLE
}
else
if
(
mApkState
==
2
)
{
}
else
if
(
mApkState
==
2
)
{
// 应用卸载
// 应用卸载
tvTitle
.
text
=
"卸载残留提示"
tvTitle
.
text
=
"卸载残留提示"
...
@@ -105,11 +110,26 @@ class ApkActivity : BaseActivity() {
...
@@ -105,11 +110,26 @@ class ApkActivity : BaseActivity() {
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
initExpress
()
btnClean
.
postDelayed
({
btnClean
.
postDelayed
({
rope
=
YoYo
.
with
(
Techniques
.
Tada
).
duration
(
1000
).
repeat
(
2
).
playOn
(
btnClean
)
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
1000
).
repeat
(
6
).
playOn
(
btnClean
)
},
200
)
},
200
)
}
}
/**
* 初始化信息iyc
*/
private
fun
initExpress
()
{
try
{
if
(
fl_ad
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getAppOutExpressFrameLayout
())
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
override
fun
onDestroy
()
{
override
fun
onDestroy
()
{
rope
?.
stop
()
rope
?.
stop
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/BoostActivity.kt
→
app/src/main/java/com/mints/flowbox/ui/activitys/
keepalive/
BoostActivity.kt
View file @
0b3c1526
package
com.mints.flowbox.ui.activitys
package
com.mints.flowbox.ui.activitys
.keepalive
import
android.app.ActivityManager
import
android.app.ActivityManager
import
android.content.Context
import
android.content.Context
...
@@ -71,7 +71,7 @@ class BoostActivity : BaseActivity() {
...
@@ -71,7 +71,7 @@ class BoostActivity : BaseActivity() {
try
{
try
{
if
(
fl_ad
!=
null
)
{
if
(
fl_ad
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getExpressFrameLayout
())
fl_ad
.
addView
(
ExpressManager
.
get
AppOut
ExpressFrameLayout
())
}
}
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
e
.
printStackTrace
()
...
@@ -79,8 +79,6 @@ class BoostActivity : BaseActivity() {
...
@@ -79,8 +79,6 @@ class BoostActivity : BaseActivity() {
}
}
private
fun
cleanMemory
()
{
private
fun
cleanMemory
()
{
ExpressManager
.
loadAppOutExpress
()
ccav_speed
.
startAnimation
()
ccav_speed
.
startAnimation
()
Handler
(
Looper
.
getMainLooper
()).
postDelayed
(
Handler
(
Looper
.
getMainLooper
()).
postDelayed
(
{
{
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/ScreenActivity.kt
→
app/src/main/java/com/mints/flowbox/ui/activitys/
keepalive/
ScreenActivity.kt
View file @
0b3c1526
package
com.mints.flowbox.ui.activitys
package
com.mints.flowbox.ui.activitys
.keepalive
import
android.app.KeyguardManager
import
android.app.WallpaperManager
import
android.content.Context
import
android.graphics.Color
import
android.graphics.drawable.Drawable
import
android.os.*
import
android.os.*
import
android.view.View
import
android.view.View
import
android.view.WindowManager
import
com.mints.flowbox.R
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.common.Constant
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.TimeThread
import
com.mints.flowbox.utils.TimeThread
import
com.mints.flowbox.utils.ToolUtil
import
com.mints.flowbox.utils.ToolUtil
import
com.mints.library.base.BaseSwipeBackCompatActivity
import
com.mints.library.net.netstatus.NetUtils
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.mints.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.activity_screen.*
import
kotlinx.android.synthetic.main.activity_screen.*
class
ScreenActivity
:
BaseSwipeBackCompatActivity
(),
View
.
OnClickListener
{
class
ScreenActivity
:
OutAppActivity
(),
View
.
OnClickListener
{
var
mKeyguard
:
KeyguardManager
?
=
null
var
mKeylock
:
KeyguardManager
.
KeyguardLock
?
=
null
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
// 设置可以显示在锁屏页面之上
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O_MR1
)
{
setShowWhenLocked
(
true
)
// 强制亮屏
// setTurnScreenOn(true)
val
keyguardManager
=
getSystemService
(
Context
.
KEYGUARD_SERVICE
)
as
KeyguardManager
keyguardManager
.
requestDismissKeyguard
(
this
,
null
)
}
this
.
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DISMISS_KEYGUARD
or
WindowManager
.
LayoutParams
.
FLAG_SHOW_WHEN_LOCKED
or
WindowManager
.
LayoutParams
.
FLAG_TURN_SCREEN_ON
)
super
.
onCreate
(
savedInstanceState
)
}
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
ExpressManager
.
loadAppOutExpress
()
try
{
val
wallpaperManager
=
WallpaperManager
.
getInstance
(
this
)
val
wallpaperDrawable
:
Drawable
=
wallpaperManager
.
drawable
container
.
background
=
wallpaperDrawable
}
catch
(
e
:
java
.
lang
.
Exception
)
{
e
.
printStackTrace
()
container
.
setBackgroundColor
(
Color
.
BLACK
)
}
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
mHelper
.
swipeBackLayout
.
setEdgeSize
(
ToolUtil
.
getScreenWidth
(
this
))
mHelper
.
swipeBackLayout
.
setEdgeSize
(
ToolUtil
.
getScreenWidth
(
this
))
...
@@ -68,9 +54,6 @@ class ScreenActivity : BaseSwipeBackCompatActivity(), View.OnClickListener {
...
@@ -68,9 +54,6 @@ class ScreenActivity : BaseSwipeBackCompatActivity(), View.OnClickListener {
override
fun
onClick
(
v
:
View
?)
{
override
fun
onClick
(
v
:
View
?)
{
if
(
AntiShake
.
check
(
v
?.
id
))
return
if
(
AntiShake
.
check
(
v
?.
id
))
return
// 预加载信息流
ExpressManager
.
loadExpress
(
false
)
when
(
v
?.
id
)
{
when
(
v
?.
id
)
{
R
.
id
.
tvBoost
->
{
R
.
id
.
tvBoost
->
{
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
...
@@ -106,28 +89,13 @@ class ScreenActivity : BaseSwipeBackCompatActivity(), View.OnClickListener {
...
@@ -106,28 +89,13 @@ class ScreenActivity : BaseSwipeBackCompatActivity(), View.OnClickListener {
try
{
try
{
if
(
fl_ad
!=
null
)
{
if
(
fl_ad
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getExpressFrameLayout
())
fl_ad
.
addView
(
ExpressManager
.
get
AppOut
ExpressFrameLayout
())
}
}
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
e
.
printStackTrace
()
}
}
}
}
override
fun
onNetworkConnected
(
type
:
NetUtils
.
NetType
?)
{}
override
fun
onNetworkDisConnected
()
{}
override
fun
isApplyStatusBarTranslucency
()
=
false
override
fun
toggleOverridePendingTransition
()
=
false
override
fun
getOverridePendingTransitionMode
()
=
TransitionMode
.
FADE
override
fun
toggleIsBack2Left
()
=
false
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_screen
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_screen
override
fun
getLoadingTargetView
()
=
null
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/TimingActivity.kt
0 → 100644
View file @
0b3c1526
package
com.mints.flowbox.ui.activitys.keepalive
import
android.os.Bundle
import
androidx.core.content.ContextCompat
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.keepalive.AlarmManager
import
com.mints.flowbox.ui.activitys.IncreasespeedActivity
import
com.mints.flowbox.ui.activitys.SpeedFastActivity
import
com.mints.flowbox.ui.activitys.SpeedTestActivity
import
com.mints.flowbox.ui.activitys.base.BaseActivity
import
com.mints.flowbox.utils.SpanUtils
import
com.mints.flowbox.utils.SystemUtils
import
kotlinx.android.synthetic.main.activity_timing.*
import
kotlinx.android.synthetic.main.activity_timing.fl_ad
import
kotlinx.android.synthetic.main.activity_timing.iv_close
import
kotlin.random.Random
/**
*
* 描述:定时或具体操作弹出的activity
*/
class
TimingActivity
:
BaseActivity
()
{
companion
object
{
const
val
TIMING_TYPE
=
"TIMING_TYPE"
const
val
TIMING_TYPE_BOOST
=
0
// 加速
const
val
TIMING_TYPE_CLEAN
=
1
// 清理
const
val
TIMING_TYPE_SAVE_ELE
=
2
// 省电
const
val
TIMING_TYPE_WIFI_BOOST
=
3
// 信号增强
const
val
TIMING_TYPE_SPEED_TEST
=
4
// 网络测速
}
/**
* 0-加速 1-清理 2-省电
* 3-wifi加速 4-网络测速
*
*/
private
var
mType
=
0
private
var
rope
:
YoYo
.
YoYoString
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_timing
override
fun
initViewsAndEvents
()
{
iv_close
.
setOnClickListener
{
finish
()
overridePendingTransition
(
0
,
0
)
}
initView
()
}
private
fun
initView
()
{
when
(
mType
)
{
TIMING_TYPE_BOOST
->
{
// 加速
val
usedPercentValue
=
SystemUtils
.
getUsedPercentValue
(
mContext
)
tvInfo
.
text
=
SpanUtils
()
.
append
(
"内存占用"
)
.
setForegroundColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
gray
))
.
append
(
"${usedPercentValue}%"
)
.
setForegroundColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
red
))
.
create
()
btnClean
.
text
=
"立即加速"
}
TIMING_TYPE_CLEAN
->
{
// 清理
tvInfo
.
text
=
SpanUtils
()
.
append
(
"大量文件"
)
.
setForegroundColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
red
))
.
append
(
"待清理"
)
.
setForegroundColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
gray
))
.
create
()
btnClean
.
text
=
"立即清理"
}
TIMING_TYPE_SAVE_ELE
->
{
// 省电
if
(
AppConfig
.
fakeSaveBatteryCount
==
0
)
{
AppConfig
.
fakeSaveBatteryCount
=
1
+
Random
.
nextInt
(
8
)
}
tvInfo
.
text
=
SpanUtils
()
.
append
(
"检测到"
)
.
append
(
"${AppConfig.fakeSaveBatteryCount}个"
)
.
setForegroundColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
red
))
.
append
(
"应用耗电"
)
.
setForegroundColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
gray
))
.
create
()
btnClean
.
text
=
"立即省电"
}
TIMING_TYPE_WIFI_BOOST
->
{
// 信号增强
tvInfo
.
text
=
SpanUtils
()
.
append
(
"信号增强"
)
.
create
()
btnClean
.
text
=
"信号增强"
}
TIMING_TYPE_SPEED_TEST
->
{
// 网络测速
tvInfo
.
text
=
SpanUtils
()
.
append
(
"网络测速"
)
.
create
()
btnClean
.
text
=
"网络测速"
}
}
btnClean
.
setOnClickListener
{
val
bundle
=
Bundle
()
when
(
mType
)
{
TIMING_TYPE_BOOST
->
{
// 加速
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_BOOST
)
}
TIMING_TYPE_CLEAN
->
{
// 清理
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_CLEAN
)
}
TIMING_TYPE_SAVE_ELE
->
{
// 省电
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_SAVE_ELECTRICITY
)
}
TIMING_TYPE_WIFI_BOOST
->
{
// 信号增强
readyGo
(
SpeedFastActivity
::
class
.
java
)
return
@setOnClickListener
}
TIMING_TYPE_SPEED_TEST
->
{
// 省电
readyGo
(
SpeedTestActivity
::
class
.
java
)
return
@setOnClickListener
}
}
readyGoThenKill
(
IncreasespeedActivity
::
class
.
java
,
bundle
)
}
}
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
mType
=
it
.
getInt
(
TIMING_TYPE
,
0
)
}
}
/**
* 初始化信息iyc
*/
private
fun
initExpress
()
{
try
{
if
(
fl_ad
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getAppOutExpressFrameLayout
())
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
override
fun
isApplyKitKatTranslucency
()
=
true
override
fun
finish
()
{
super
.
finish
()
AlarmManager
.
getInstance
().
resetUserActionTime
()
}
override
fun
onResume
()
{
super
.
onResume
()
initExpress
()
btnClean
.
postDelayed
({
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
1000
).
repeat
(
6
).
playOn
(
btnClean
)
},
200
)
}
override
fun
onDestroy
()
{
rope
?.
stop
()
rope
=
null
super
.
onDestroy
()
}
override
fun
onBackPressed
()
{
// 屏蔽返回键
// super.onBackPressed()
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/adapter/BonusTaskAdapter.kt
View file @
0b3c1526
...
@@ -58,7 +58,7 @@ class BonusTaskAdapter(
...
@@ -58,7 +58,7 @@ class BonusTaskAdapter(
holder
.
itemTaskPb
.
progress
=
taskBean
.
complete
holder
.
itemTaskPb
.
progress
=
taskBean
.
complete
holder
.
itemTaskPb
.
max
=
taskBean
.
need
holder
.
itemTaskPb
.
max
=
taskBean
.
need
if
(
taskBean
.
otherConfig
!=
null
){
if
(
taskBean
.
otherConfig
!=
null
)
{
}
}
...
...
app/src/main/java/com/mints/flowbox/ui/adapter/GvSignAdapter.java
View file @
0b3c1526
...
@@ -74,6 +74,9 @@ public class GvSignAdapter extends BaseAdapter {
...
@@ -74,6 +74,9 @@ public class GvSignAdapter extends BaseAdapter {
if
(
TextUtils
.
equals
(
itemData
.
getStatus
(),
"lock"
))
{
if
(
TextUtils
.
equals
(
itemData
.
getStatus
(),
"lock"
))
{
viewHolder
.
ic_my_icon
.
setImageResource
(
R
.
mipmap
.
ic_bouns_redbox_lock
);
viewHolder
.
ic_my_icon
.
setImageResource
(
R
.
mipmap
.
ic_bouns_redbox_lock
);
viewHolder
.
tv_day
.
setTextColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
color_FF2326
));
viewHolder
.
tv_day
.
setTextColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
color_FF2326
));
}
else
if
(
TextUtils
.
equals
(
itemData
.
getStatus
(),
"open"
))
{
viewHolder
.
ic_my_icon
.
setImageResource
(
R
.
mipmap
.
ic_bouns_redbox
);
viewHolder
.
tv_day
.
setTextColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
color_FF2326
));
}
else
{
}
else
{
viewHolder
.
ic_my_icon
.
setImageResource
(
R
.
mipmap
.
ic_bouns_redbox_normal
);
viewHolder
.
ic_my_icon
.
setImageResource
(
R
.
mipmap
.
ic_bouns_redbox_normal
);
viewHolder
.
tv_day
.
setTextColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
gray
));
viewHolder
.
tv_day
.
setTextColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
gray
));
...
...
app/src/main/java/com/mints/flowbox/ui/adapter/MainWifiAdapter.kt
View file @
0b3c1526
...
@@ -29,6 +29,8 @@ class MainWifiAdapter(val context: Context, val taskData: MutableList<WifiListBe
...
@@ -29,6 +29,8 @@ class MainWifiAdapter(val context: Context, val taskData: MutableList<WifiListBe
mOnItemClickListener
=
onItemClickListener
mOnItemClickListener
=
onItemClickListener
}
}
// fun set
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
{
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
{
if
(
viewType
==
FriendsInvitedAdapter
.
HOLDER_TYPE_EMPTY
)
{
if
(
viewType
==
FriendsInvitedAdapter
.
HOLDER_TYPE_EMPTY
)
{
val
emptyView
=
val
emptyView
=
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/BonusFragment.kt
View file @
0b3c1526
...
@@ -127,10 +127,14 @@ class BonusFragment : BaseFragment(), OnItemChildClickListener, BonusView, View.
...
@@ -127,10 +127,14 @@ class BonusFragment : BaseFragment(), OnItemChildClickListener, BonusView, View.
return
return
}
}
if
(
dataList
[
position
].
complete
>=
dataList
[
position
].
need
)
return
when
(
view
?.
id
)
{
when
(
view
?.
id
)
{
R
.
id
.
item_task_click
->
{
R
.
id
.
item_task_click
->
{
when
(
dataList
[
position
].
carrierType
)
{
when
(
dataList
[
position
].
carrierType
)
{
BonusTaskAdapter
.
CHALLENGE_VEDIO
->
{
BonusTaskAdapter
.
CHALLENGE_VEDIO
->
{
// 看视频
// 看视频
if
(
dataList
[
position
].
otherConfig
!=
null
)
{
if
(
dataList
[
position
].
otherConfig
!=
null
)
{
awardVedio
(
awardVedio
(
...
@@ -150,7 +154,7 @@ class BonusFragment : BaseFragment(), OnItemChildClickListener, BonusView, View.
...
@@ -150,7 +154,7 @@ class BonusFragment : BaseFragment(), OnItemChildClickListener, BonusView, View.
readyGo
(
WrapperActivity
::
class
.
java
,
bundle
)
readyGo
(
WrapperActivity
::
class
.
java
,
bundle
)
}
}
BonusTaskAdapter
.
CHALLENGE_SHAREFRIEND
->
{
BonusTaskAdapter
.
CHALLENGE_SHAREFRIEND
->
{
// 邀请好友
if
(
dataList
[
position
].
otherConfig
!=
null
)
{
if
(
dataList
[
position
].
otherConfig
!=
null
)
{
when
(
dataList
[
position
].
otherConfig
.
status
)
{
when
(
dataList
[
position
].
otherConfig
.
status
)
{
0
,
2
->
{
0
,
2
->
{
...
@@ -162,20 +166,6 @@ class BonusFragment : BaseFragment(), OnItemChildClickListener, BonusView, View.
...
@@ -162,20 +166,6 @@ class BonusFragment : BaseFragment(), OnItemChildClickListener, BonusView, View.
shareImgDialog
()
shareImgDialog
()
}
}
1
->
{
1
->
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
dataList
[
position
].
otherConfig
.
coin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CHALLENGE_SHAREFRIEND
)
bundle
.
putString
(
Constant
.
MAIN_EXTRA_ID
,
dataList
[
position
].
otherConfig
.
doubleCoin
.
toString
()
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
}
}
}
}
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/GetPacketFragment.kt
View file @
0b3c1526
...
@@ -78,7 +78,8 @@ class GetPacketFragment : BaseFragment(), GetPacketView, View.OnClickListener {
...
@@ -78,7 +78,8 @@ class GetPacketFragment : BaseFragment(), GetPacketView, View.OnClickListener {
// 看视频
// 看视频
(
requireActivity
()
as
MainActivity
).
clickTab2Layout
()
(
requireActivity
()
as
MainActivity
).
clickTab2Layout
()
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
(
requireActivity
()
as
MainActivity
).
selectVideo
()
// (requireActivity() as MainActivity).selectVideo()
(
requireActivity
()
as
MainActivity
).
clickTab2Layout
()
},
200
)
},
200
)
}
}
R
.
id
.
btn_invite
->
{
R
.
id
.
btn_invite
->
{
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/HomeFragment.kt
View file @
0b3c1526
package
com.mints.flowbox.ui.fragment
package
com.mints.flowbox.ui.fragment
import
android.Manifest
import
android.Manifest
import
android.app.Dialog
import
android.os.Bundle
import
android.os.Bundle
import
android.text.TextUtils
import
android.text.TextUtils
import
android.view.LayoutInflater
import
android.view.LayoutInflater
...
@@ -10,7 +9,6 @@ import android.widget.AdapterView
...
@@ -10,7 +9,6 @@ import android.widget.AdapterView
import
android.widget.GridView
import
android.widget.GridView
import
com.mints.flowbox.R
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.ad.express.PreLoadExpressManager
import
com.mints.flowbox.ad.video.VideoAdingManager
import
com.mints.flowbox.ad.video.VideoAdingManager
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.common.Constant
...
@@ -24,9 +22,8 @@ import com.mints.flowbox.ui.adapter.GvMyAdapter
...
@@ -24,9 +22,8 @@ import com.mints.flowbox.ui.adapter.GvMyAdapter
import
com.mints.flowbox.ui.adapter.ViewPagerAdapter
import
com.mints.flowbox.ui.adapter.ViewPagerAdapter
import
com.mints.flowbox.ui.fragment.base.BaseFragment
import
com.mints.flowbox.ui.fragment.base.BaseFragment
import
com.mints.flowbox.ui.widgets.WifiView
import
com.mints.flowbox.ui.widgets.WifiView
import
com.mints.flowbox.ui.widgets.dialog.DialogListener
import
com.mints.flowbox.ui.widgets.dialog.DialogUtils
import
com.mints.flowbox.utils.WifiUtils
import
com.mints.flowbox.utils.WifiUtils
import
com.mints.library.net.netstatus.NetUtils
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.rd.animation.type.AnimationType
import
com.rd.animation.type.AnimationType
import
com.tbruyelle.rxpermissions.RxPermissions
import
com.tbruyelle.rxpermissions.RxPermissions
...
@@ -71,9 +68,6 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
...
@@ -71,9 +68,6 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
/** 初始化 */
/** 初始化 */
private
fun
init
()
{
private
fun
init
()
{
// 奖励页预加载 信息流广告
PreLoadExpressManager
.
loadADFrameLayout
()
// 打开激活
// 打开激活
uploadDeviceInfo
()
uploadDeviceInfo
()
}
}
...
@@ -118,22 +112,14 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
...
@@ -118,22 +112,14 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
super
.
onResume
()
super
.
onResume
()
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_ONE
)
{
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_ONE
)
{
refreshData
()
refreshData
()
if
(
bubbleCount
==
0
)
{
wifi_view
.
wifiOn
()
wifi_view
.
wifiOnAndNoBonus
()
tvContent
.
text
=
"连续签到可得${AppConfig.HOME_BANNER_SIGN_GIVECASH}元红包"
}
else
{
wifi_view
.
wifiOn
()
}
tvContent
.
text
=
"每天签到最高可得${AppConfig.HOME_BANNER_SIGN_GIVECASH}元红包"
}
}
}
}
override
fun
onPause
()
{
override
fun
onPause
()
{
super
.
onPause
()
super
.
onPause
()
if
(
bubbleCount
==
0
)
{
wifi_view
.
wifiOff
()
wifi_view
.
wifiOnAndNoBonus
()
}
else
{
wifi_view
.
wifiOff
()
}
}
}
/** 刷新数据 **/
/** 刷新数据 **/
...
@@ -159,20 +145,12 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
...
@@ -159,20 +145,12 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_home
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_home
override
fun
onWifiOpen
()
{
override
fun
onWifiOpen
()
{
if
(
bubbleCount
==
0
)
{
wifi_view
.
wifiOn
()
wifi_view
.
wifiOnAndNoBonus
()
}
else
{
wifi_view
.
wifiOn
()
}
bg_view
.
setBackgroundResource
(
R
.
mipmap
.
bg_home_enable
)
bg_view
.
setBackgroundResource
(
R
.
mipmap
.
bg_home_enable
)
}
}
override
fun
onWifiClose
()
{
override
fun
onWifiClose
()
{
if
(
bubbleCount
==
0
)
{
wifi_view
.
wifiOff
()
wifi_view
.
wifiOnAndNoBonus
()
}
else
{
wifi_view
.
wifiOff
()
}
bg_view
.
setBackgroundResource
(
R
.
mipmap
.
bg_home_unenable
)
bg_view
.
setBackgroundResource
(
R
.
mipmap
.
bg_home_unenable
)
}
}
...
@@ -182,21 +160,11 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
...
@@ -182,21 +160,11 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
when
(
v
?.
id
)
{
when
(
v
?.
id
)
{
// 网络测速
// 网络测速
R
.
id
.
btn_speed_test
->
{
R
.
id
.
btn_speed_test
->
{
if
(
wifiManager
.
isWifiEnable
)
{
if
(!
NetUtils
.
isNetworkConnected
(
context
))
{
readyGo
(
SpeedTestActivity
::
class
.
java
)
showToast
(
"网络异常,请检测网络"
)
}
else
{
return
DialogUtils
.
showDialog
(
requireActivity
(),
"当前不是Wifi网络,是否还需要进行网络测速?"
,
"提示"
,
"确定"
,
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
super
.
onClick
(
dialog
,
v
)
}
})
}
}
readyGo
(
SpeedTestActivity
::
class
.
java
)
}
}
// 内存清理
// 内存清理
R
.
id
.
btn_clean
->
{
R
.
id
.
btn_clean
->
{
...
@@ -206,12 +174,17 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
...
@@ -206,12 +174,17 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
if
(
granted
)
{
if
(
granted
)
{
readyGo
(
CleanActivity
::
class
.
java
)
readyGo
(
CleanActivity
::
class
.
java
)
}
else
{
}
else
{
showMissingPermissionDialog
(
"
定位
"
)
showMissingPermissionDialog
(
"
存储
"
)
}
}
}
}
}
}
// 扫一扫
// 扫一扫
R
.
id
.
btn_scan
->
{
R
.
id
.
btn_scan
->
{
if
(!
NetUtils
.
isNetworkConnected
(
context
))
{
showToast
(
"网络异常,请检测网络"
)
return
}
RxPermissions
(
requireActivity
())
RxPermissions
(
requireActivity
())
.
request
(
Manifest
.
permission
.
CAMERA
)
.
request
(
Manifest
.
permission
.
CAMERA
)
.
subscribe
{
granted
:
Boolean
->
.
subscribe
{
granted
:
Boolean
->
...
@@ -224,9 +197,13 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
...
@@ -224,9 +197,13 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
}
}
// wifi提速
// wifi提速
R
.
id
.
btn_speed_fast
->
{
R
.
id
.
btn_speed_fast
->
{
if
(!
NetUtils
.
isNetworkConnected
(
context
))
{
showToast
(
"网络异常,请检测网络"
)
return
}
// 预加载信息流
// 预加载信息流
ExpressManager
.
loadExpress
(
false
)
ExpressManager
.
loadExpress
(
false
)
readyGo
(
SpeedFastActivity
::
class
.
java
)
readyGo
(
SpeedFastActivity
::
class
.
java
)
}
}
// 跳转福利页面
// 跳转福利页面
...
@@ -261,7 +238,7 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
...
@@ -261,7 +238,7 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
override
fun
getBubbleSuc
(
count
:
Int
,
coin
:
Int
)
{
override
fun
getBubbleSuc
(
count
:
Int
,
coin
:
Int
)
{
bubbleCount
=
count
bubbleCount
=
count
bubbleCoin
=
coin
bubbleCoin
=
coin
wifi_view
.
setCount
(
c
ount
)
wifi_view
.
setCount
(
bubbleC
ount
)
if
(
wifiManager
.
isWifiEnable
)
{
if
(
wifiManager
.
isWifiEnable
)
{
bg_view
.
setBackgroundResource
(
R
.
mipmap
.
bg_home_enable
)
bg_view
.
setBackgroundResource
(
R
.
mipmap
.
bg_home_enable
)
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/MyFragment.kt
View file @
0b3c1526
...
@@ -377,7 +377,6 @@ class MyFragment : BaseFragment(),
...
@@ -377,7 +377,6 @@ class MyFragment : BaseFragment(),
val
activity
:
MainActivity
?
=
activity
as
MainActivity
?
val
activity
:
MainActivity
?
=
activity
as
MainActivity
?
activity
?.
let
{
activity
?.
let
{
it
.
clickTab2Layout
()
it
.
clickTab2Layout
()
it
.
selectVideo
()
}
}
}
}
1
->
{
1
->
{
...
@@ -459,29 +458,29 @@ class MyFragment : BaseFragment(),
...
@@ -459,29 +458,29 @@ class MyFragment : BaseFragment(),
awardVedio
(
taskBean
.
otherConfig
.
coin
,
Constant
.
CARRIER_VERSUS_VIDEO
)
awardVedio
(
taskBean
.
otherConfig
.
coin
,
Constant
.
CARRIER_VERSUS_VIDEO
)
}
}
}
}
MainMyAdapter
.
TO_XMLY
->
{
//
MainMyAdapter.TO_XMLY -> {
if
(
taskBean
.
otherConfig
!=
null
)
{
//
if (taskBean.otherConfig != null) {
when
(
taskBean
.
otherConfig
.
status
)
{
//
when (taskBean.otherConfig.status) {
0
,
2
->
{
//
0, 2 -> {
val
activity
:
MainActivity
?
=
activity
as
MainActivity
?
//
val activity: MainActivity? = activity as MainActivity?
activity
?.
let
{
//
activity?.let {
it
.
clickTab1Layout
()
//
it.clickTab1Layout()
it
.
selectXmly
()
//
it.selectXmly()
}
//
}
}
//
}
1
->
{
//
1 -> {
val
bundle
=
Bundle
()
//
val bundle = Bundle()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
taskBean
.
otherConfig
.
coin
)
//
bundle.putInt(Constant.MAIN_CUR_COIN, taskBean.otherConfig.coin)
bundle
.
putString
(
//
bundle.putString(
Constant
.
MAIN_CARRIER_TYPE
,
//
Constant.MAIN_CARRIER_TYPE,
Constant
.
CARRIER_XMLY_CHALLENGE
//
Constant.CARRIER_XMLY_CHALLENGE
)
//
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
//
readyGo(AwardActivity::class.java, bundle)
}
//
}
}
//
}
}
//
}
//
}
//
}
MainMyAdapter
.
TO_DOWNLOADS
->
{
MainMyAdapter
.
TO_DOWNLOADS
->
{
if
(
taskBean
.
otherConfig
!=
null
)
{
if
(
taskBean
.
otherConfig
!=
null
)
{
when
(
taskBean
.
otherConfig
.
status
)
{
when
(
taskBean
.
otherConfig
.
status
)
{
...
@@ -698,6 +697,7 @@ class MyFragment : BaseFragment(),
...
@@ -698,6 +697,7 @@ class MyFragment : BaseFragment(),
}
}
private
fun
initManager
()
{
private
fun
initManager
()
{
BannerManager
.
instance
.
init
()
videoAdingManager
=
VideoAdingManager
.
getInstance
(
activity
)
videoAdingManager
=
VideoAdingManager
.
getInstance
(
activity
)
}
}
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/VideoFragment.kt
View file @
0b3c1526
...
@@ -33,7 +33,6 @@ import com.yilan.sdk.ui.little.YLLittleVideoFragment
...
@@ -33,7 +33,6 @@ import com.yilan.sdk.ui.little.YLLittleVideoFragment
import
com.yilan.sdk.ylad.YLAdListener
import
com.yilan.sdk.ylad.YLAdListener
import
kotlinx.android.synthetic.main.layout_red_bag.*
import
kotlinx.android.synthetic.main.layout_red_bag.*
import
kotlinx.android.synthetic.main.layout_red_box.*
import
kotlinx.android.synthetic.main.layout_red_box.*
import
net.grandcentrix.tray.AppPreferences
private
val
TAG
=
VideoFragment
::
class
.
java
.
simpleName
private
val
TAG
=
VideoFragment
::
class
.
java
.
simpleName
...
@@ -301,14 +300,14 @@ class VideoFragment : BaseFragment(), VideoView, View.OnClickListener {
...
@@ -301,14 +300,14 @@ class VideoFragment : BaseFragment(), VideoView, View.OnClickListener {
LinearLayout
.
LayoutParams
.
WRAP_CONTENT
,
LinearLayout
.
LayoutParams
.
WRAP_CONTENT
,
LinearLayout
.
LayoutParams
.
WRAP_CONTENT
LinearLayout
.
LayoutParams
.
WRAP_CONTENT
)
)
params
.
setMargins
(
0
,
0
,
0
,
BubbleUtils
.
dp2px
(
41
0
))
params
.
setMargins
(
0
,
0
,
0
,
BubbleUtils
.
dp2px
(
28
0
))
cdvvYilanTime
.
layoutParams
=
params
cdvvYilanTime
.
layoutParams
=
params
val
paramsRedBox
=
FrameLayout
.
LayoutParams
(
val
paramsRedBox
=
FrameLayout
.
LayoutParams
(
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
,
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
,
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
)
)
paramsRedBox
.
setMargins
(
0
,
BubbleUtils
.
dp2px
(
4
0
),
BubbleUtils
.
dp2px
(
10
),
0
)
paramsRedBox
.
setMargins
(
0
,
BubbleUtils
.
dp2px
(
12
0
),
BubbleUtils
.
dp2px
(
10
),
0
)
paramsRedBox
.
gravity
=
Gravity
.
END
paramsRedBox
.
gravity
=
Gravity
.
END
rl_fragment_main_redbox
.
layoutParams
=
paramsRedBox
rl_fragment_main_redbox
.
layoutParams
=
paramsRedBox
cdvvYilanTime
.
setOnClickListener
(
this
)
cdvvYilanTime
.
setOnClickListener
(
this
)
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/WifiFragment.kt
View file @
0b3c1526
...
@@ -20,11 +20,9 @@ import com.daimajia.androidanimations.library.Techniques
...
@@ -20,11 +20,9 @@ import com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.daimajia.androidanimations.library.YoYo
import
com.hjq.toast.ToastUtils
import
com.hjq.toast.ToastUtils
import
com.mints.flowbox.R
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.banner.BannerManager
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.manager.TtCsjAdManager
import
com.mints.flowbox.manager.UserManager
import
com.mints.flowbox.manager.UserManager
import
com.mints.flowbox.manager.wifi.WifiStateManager
import
com.mints.flowbox.manager.wifi.WifiStateManager
import
com.mints.flowbox.mvp.model.WifiListBean
import
com.mints.flowbox.mvp.model.WifiListBean
...
@@ -37,6 +35,7 @@ import com.mints.flowbox.ui.widgets.dialog.DialogUtils
...
@@ -37,6 +35,7 @@ import com.mints.flowbox.ui.widgets.dialog.DialogUtils
import
com.mints.flowbox.ui.widgets.dialog.WifiConnectDialog
import
com.mints.flowbox.ui.widgets.dialog.WifiConnectDialog
import
com.mints.flowbox.ui.widgets.seekbar.BubbleUtils
import
com.mints.flowbox.ui.widgets.seekbar.BubbleUtils
import
com.mints.flowbox.utils.*
import
com.mints.flowbox.utils.*
import
com.mints.flowbox.utils.keepalive.IntentUtils
import
com.mints.library.net.netstatus.NetUtils
import
com.mints.library.net.netstatus.NetUtils
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.tbruyelle.rxpermissions.RxPermissions
import
com.tbruyelle.rxpermissions.RxPermissions
...
@@ -79,6 +78,8 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -79,6 +78,8 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_THREE
)
{
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_THREE
)
{
// 校验是否开启定位信息开关
if
(
PermissionUtils
.
isOpenGps
(
requireContext
()))
{
if
(
PermissionUtils
.
isOpenGps
(
requireContext
()))
{
loadWifiData
()
loadWifiData
()
}
else
{
}
else
{
...
@@ -86,8 +87,8 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -86,8 +87,8 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
}
}
// 防止banner刷新太快
// 防止banner刷新太快
if
(
AntiShake
.
check
(
fl_wifi_banner
?.
id
))
return
//
if (AntiShake.check(fl_wifi_banner?.id)) return
BannerManager
.
instance
.
getTtBanner
(
TtCsjAdManager
.
TT_AD_BANNER_MY
,
fl_wifi_banner
)
//
BannerManager.instance.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_wifi_banner)
if
(!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
userID
))
{
if
(!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
userID
))
{
(
requireActivity
()
as
MainActivity
).
refreshHall
()
(
requireActivity
()
as
MainActivity
).
refreshHall
()
...
@@ -98,7 +99,8 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -98,7 +99,8 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
}
}
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
BannerManager
.
instance
.
init
()
// Banner信息流初始化
// BannerManager.instance.init()
initRecy
()
initRecy
()
initView
()
initView
()
...
@@ -109,7 +111,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -109,7 +111,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
@SuppressLint
(
"SetTextI18n"
)
@SuppressLint
(
"SetTextI18n"
)
private
fun
loadWifiData
()
{
private
fun
loadWifiData
()
{
btn_signal
.
postDelayed
({
btn_signal
.
postDelayed
({
rope
=
YoYo
.
with
(
Techniques
.
Tada
).
duration
(
1000
).
repeat
(-
1
).
playOn
(
btn_signal
)
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
1000
).
repeat
(-
1
).
playOn
(
btn_signal
)
},
200
)
},
200
)
if
(
wifiUtils
.
isWifiEnable
)
{
if
(
wifiUtils
.
isWifiEnable
)
{
...
@@ -240,7 +242,9 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -240,7 +242,9 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
}
}
if
(
AppConfig
.
isCanSaveBattery
)
{
if
(
AppConfig
.
isCanSaveBattery
)
{
AppConfig
.
fakeSaveBatteryCount
=
1
+
Random
.
nextInt
(
8
)
if
(
AppConfig
.
fakeSaveBatteryCount
==
0
)
{
AppConfig
.
fakeSaveBatteryCount
=
1
+
Random
.
nextInt
(
8
)
}
tv_save_battery
.
text
=
SpanUtils
()
tv_save_battery
.
text
=
SpanUtils
()
.
append
(
"超强省电\n"
)
.
append
(
"超强省电\n"
)
.
append
(
"${AppConfig.fakeSaveBatteryCount}个"
)
.
append
(
"${AppConfig.fakeSaveBatteryCount}个"
)
...
@@ -253,7 +257,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -253,7 +257,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
}
else
{
}
else
{
tv_save_battery
.
text
=
SpanUtils
()
tv_save_battery
.
text
=
SpanUtils
()
.
append
(
"超强省电\n"
)
.
append
(
"超强省电\n"
)
.
append
(
"延长
时间
"
)
.
append
(
"延长
待机
"
)
.
setForegroundColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
gray
))
.
setForegroundColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
gray
))
.
setFontSize
(
BubbleUtils
.
sp2px
(
10
))
.
setFontSize
(
BubbleUtils
.
sp2px
(
10
))
.
append
(
"${AppConfig.fakeSaveBatteryCount}分钟"
)
.
append
(
"${AppConfig.fakeSaveBatteryCount}分钟"
)
...
@@ -375,15 +379,23 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -375,15 +379,23 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
readyGo
(
IncreasespeedActivity
::
class
.
java
)
readyGo
(
IncreasespeedActivity
::
class
.
java
)
}
}
R
.
id
.
tv_clean
->
{
// 一键清理
R
.
id
.
tv_clean
->
{
// 一键清理
// 预加载信息流
RxPermissions
(
requireActivity
())
ExpressManager
.
loadExpress
(
false
)
.
request
(
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
.
subscribe
{
granted
:
Boolean
->
val
bundle
=
Bundle
()
if
(
granted
)
{
bundle
.
putString
(
// 预加载信息流
IncreasespeedActivity
.
INCREASE_TYPE
,
ExpressManager
.
loadExpress
(
false
)
IncreasespeedActivity
.
INCREASE_CLEAN
)
val
bundle
=
Bundle
()
readyGo
(
IncreasespeedActivity
::
class
.
java
,
bundle
)
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_CLEAN
)
readyGo
(
IncreasespeedActivity
::
class
.
java
,
bundle
)
}
else
{
showMissingPermissionDialog
(
"存储"
)
}
}
}
}
R
.
id
.
tv_save_battery
->
{
// 超强省电
R
.
id
.
tv_save_battery
->
{
// 超强省电
// 预加载信息流
// 预加载信息流
...
@@ -397,10 +409,10 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -397,10 +409,10 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
readyGo
(
IncreasespeedActivity
::
class
.
java
,
bundle
)
readyGo
(
IncreasespeedActivity
::
class
.
java
,
bundle
)
}
}
R
.
id
.
btn_signal
->
{
// 信号增强
R
.
id
.
btn_signal
->
{
// 信号增强
if
(
PermissionUtils
.
check
Permission
(
if
(
ActivityCompat
.
checkSelf
Permission
(
mContext
,
requireActivity
()
,
Manifest
.
permission
.
ACCESS_
COARS
E_LOCATION
Manifest
.
permission
.
ACCESS_
FIN
E_LOCATION
)
)
!=
PackageManager
.
PERMISSION_GRANTED
)
{
)
{
checkPermission
()
checkPermission
()
return
return
...
@@ -444,11 +456,15 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -444,11 +456,15 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
RxPermissions
(
activity
!!
)
RxPermissions
(
activity
!!
)
.
request
(
.
request
(
Manifest
.
permission
.
ACCESS_FINE_LOCATION
,
Manifest
.
permission
.
ACCESS_FINE_LOCATION
,
Manifest
.
permission
.
ACCESS_BACKGROUND_LOCATION
Manifest
.
permission
.
ACCESS_BACKGROUND_LOCATION
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
)
}
else
{
}
else
{
RxPermissions
(
activity
!!
)
RxPermissions
(
activity
!!
)
.
request
(
Manifest
.
permission
.
ACCESS_FINE_LOCATION
)
.
request
(
Manifest
.
permission
.
ACCESS_FINE_LOCATION
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
}
}
request
.
subscribe
{
granted
:
Boolean
->
request
.
subscribe
{
granted
:
Boolean
->
if
(
granted
)
{
if
(
granted
)
{
...
@@ -467,7 +483,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -467,7 +483,7 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
},
1000
)
},
1000
)
}
else
{
}
else
{
showMissingPermissionDialog
(
"位置"
)
showMissingPermissionDialog
(
"位置
,存储
"
)
}
}
}
}
}
}
...
@@ -532,12 +548,13 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
...
@@ -532,12 +548,13 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
loadWifiData
()
loadWifiData
()
}
}
/** wifi关闭 */
override
fun
onWifiClose
()
{
override
fun
onWifiClose
()
{
loadWifiData
()
loadWifiData
()
}
}
override
fun
onDestroy
()
{
override
fun
onDestroy
()
{
fl_wifi_banner
?.
removeAllViews
()
//
fl_wifi_banner?.removeAllViews()
super
.
onDestroy
()
super
.
onDestroy
()
}
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/widgets/WifiView.java
View file @
0b3c1526
...
@@ -129,6 +129,11 @@ public class WifiView extends FrameLayout implements View.OnClickListener {
...
@@ -129,6 +129,11 @@ public class WifiView extends FrameLayout implements View.OnClickListener {
}
}
public
void
wifiOn
()
{
public
void
wifiOn
()
{
if
(
mCount
==
0
)
{
wifiOnAndNoBonus
();
return
;
}
progressBar
.
resumeAnim
();
progressBar
.
resumeAnim
();
setTitle
(
"WIFI已连接"
);
setTitle
(
"WIFI已连接"
);
...
@@ -153,7 +158,7 @@ public class WifiView extends FrameLayout implements View.OnClickListener {
...
@@ -153,7 +158,7 @@ public class WifiView extends FrameLayout implements View.OnClickListener {
setTitle
(
"WIFI已连接"
);
setTitle
(
"WIFI已连接"
);
tvInfo
.
setText
(
"今日流量补贴金额已达到上限"
);
tvInfo
.
setText
(
"今日流量补贴金额已达到上限"
);
progressBar
.
setComplete
(
);
progressBar
.
post
(()
->
progressBar
.
setComplete
()
);
}
}
public
void
wifiOff
()
{
public
void
wifiOff
()
{
...
...
app/src/main/java/com/mints/flowbox/utils/ForegroundOrBackground.java
View file @
0b3c1526
...
@@ -100,6 +100,9 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
...
@@ -100,6 +100,9 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
public
void
onActivityCreated
(
Activity
activity
,
Bundle
savedInstanceState
)
{
public
void
onActivityCreated
(
Activity
activity
,
Bundle
savedInstanceState
)
{
if
(
activity
==
null
)
if
(
activity
==
null
)
return
;
return
;
app_activity
=
new
WeakReference
<>(
activity
);
if
(
TextUtils
.
equals
(
activity
.
getClass
().
getSimpleName
(),
"MainActivity"
))
{
if
(
TextUtils
.
equals
(
activity
.
getClass
().
getSimpleName
(),
"MainActivity"
))
{
main_activity
=
new
WeakReference
<>(
activity
);
main_activity
=
new
WeakReference
<>(
activity
);
}
}
...
...
app/src/main/java/com/mints/flowbox/utils/TimeThread.java
View file @
0b3c1526
package
com
.
mints
.
flowbox
.
utils
;
package
com
.
mints
.
flowbox
.
utils
;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.os.Message
;
import
android.os.Message
;
import
android.widget.TextView
;
import
android.widget.TextView
;
...
@@ -30,7 +31,7 @@ public class TimeThread extends Thread {
...
@@ -30,7 +31,7 @@ public class TimeThread extends Thread {
}
}
}
}
private
Handler
mHandler
=
new
Handler
()
{
private
Handler
mHandler
=
new
Handler
(
Looper
.
getMainLooper
()
)
{
@Override
@Override
public
void
handleMessage
(
Message
msg
)
{
public
void
handleMessage
(
Message
msg
)
{
super
.
handleMessage
(
msg
);
super
.
handleMessage
(
msg
);
...
...
app/src/main/java/com/mints/flowbox/utils/WifiUtils.java
View file @
0b3c1526
...
@@ -2,7 +2,6 @@ package com.mints.flowbox.utils;
...
@@ -2,7 +2,6 @@ package com.mints.flowbox.utils;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
import
android.location.LocationManager
;
import
android.net.ConnectivityManager
;
import
android.net.ConnectivityManager
;
import
android.net.NetworkInfo
;
import
android.net.NetworkInfo
;
import
android.net.wifi.ScanResult
;
import
android.net.wifi.ScanResult
;
...
...
app/src/main/java/com/mints/flowbox/utils/IntentNotificationUtils.kt
→
app/src/main/java/com/mints/flowbox/utils/
keepalive/
IntentNotificationUtils.kt
View file @
0b3c1526
File moved
app/src/main/java/com/mints/flowbox/utils/keepalive/IntentUtils.java
0 → 100644
View file @
0b3c1526
package
com
.
mints
.
flowbox
.
utils
.
keepalive
;
import
android.app.Activity
;
import
android.app.ActivityManager
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Build
;
import
android.provider.Settings
;
import
com.mints.flowbox.MintsApplication
;
import
com.mints.flowbox.utils.NotificationUtils
;
import
net.phone.PhoneBrandUtils
;
import
java.util.List
;
/**
* @author jyx
* @date 2021/7/10
* @des
*/
public
class
IntentUtils
{
public
static
final
String
TAG
=
"IntentUtils"
;
public
static
void
startActivity
(
Activity
activity
,
Intent
intent
)
{
if
(
PhoneBrandUtils
.
isXiaomi
()
|
PhoneBrandUtils
.
isVivo
()
|
PhoneBrandUtils
.
isOppo
())
{
if
(!
isRunningForeground
(
activity
))
{
// if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
moveToFront
(
activity
);
MintsApplication
.
getContext
().
startActivity
(
intent
);
activity
.
moveTaskToBack
(
true
);
// } else {
// NotificationUtils.INSTANCE.sendNotificationFullScreen(activity, "", "", intent);
// }
}
else
{
MintsApplication
.
getContext
().
startActivity
(
intent
);
}
}
else
{
MintsApplication
.
getContext
().
startActivity
(
intent
);
}
}
public
static
Boolean
isRunningForeground
(
Activity
activity
)
{
ActivityManager
activityManager
=
(
ActivityManager
)
activity
.
getSystemService
(
Context
.
ACTIVITY_SERVICE
);
List
<
ActivityManager
.
RunningTaskInfo
>
taskInfoList
=
activityManager
.
getRunningTasks
(
1
);
for
(
ActivityManager
.
RunningTaskInfo
taskInfo
:
taskInfoList
)
{
if
(
taskInfo
.
baseActivity
.
getPackageName
().
equals
(
activity
.
getPackageName
()))
{
return
true
;
}
}
return
false
;
}
public
static
void
moveToFront
(
Context
context
)
{
ActivityManager
activityManager
=
(
ActivityManager
)
context
.
getSystemService
(
Context
.
ACTIVITY_SERVICE
);
List
<
ActivityManager
.
RunningTaskInfo
>
taskInfoList
=
activityManager
.
getRunningTasks
(
1
);
for
(
ActivityManager
.
RunningTaskInfo
taskInfo
:
taskInfoList
)
{
//遍历找到本应用的 task,并将它切换到前台
if
(
taskInfo
.
baseActivity
.
getPackageName
().
equals
(
context
.
getPackageName
()))
{
activityManager
.
moveTaskToFront
(
taskInfo
.
id
,
0
);
return
;
}
}
}
/**
* 跳转GPS设置
*/
public
static
void
openGPSSettings
(
Context
context
)
{
Intent
intent
=
new
Intent
(
Settings
.
ACTION_LOCATION_SOURCE_SETTINGS
);
context
.
startActivity
(
intent
);
}
}
app/src/main/java/com/mints/flowbox/utils/
Intent
Utils.java
→
app/src/main/java/com/mints/flowbox/utils/
keepalive/LockPermission
Utils.java
View file @
0b3c1526
package
com
.
mints
.
flowbox
.
utils
;
package
com
.
mints
.
flowbox
.
utils
.
keepalive
;
import
android.app.Activity
;
import
android.app.ActivityManager
;
import
android.app.AppOpsManager
;
import
android.app.AppOpsManager
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.database.Cursor
;
import
android.database.Cursor
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Build
;
import
android.provider.Settings
;
import
android.provider.Settings
;
import
android.util.Log
;
import
android.util.Log
;
import
com.mints.flowbox.MintsApplication
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.util.List
;
/**
/**
* @author jyx
* @author jyx
* @date 2021/7/1
0
* @date 2021/7/1
3
* @des
* @des
*/
*/
public
class
Intent
Utils
{
public
class
LockPermission
Utils
{
public
static
final
String
TAG
=
"
Intent
Utils"
;
public
static
final
String
TAG
=
"
LockPermission
Utils"
;
/**
/**
* 小米后台弹出界面权限检测
* 小米后台弹出界面权限检测
...
@@ -35,7 +29,7 @@ public class IntentUtils {
...
@@ -35,7 +29,7 @@ public class IntentUtils {
AppOpsManager
ops
=
(
AppOpsManager
)
context
.
getSystemService
(
Context
.
APP_OPS_SERVICE
);
AppOpsManager
ops
=
(
AppOpsManager
)
context
.
getSystemService
(
Context
.
APP_OPS_SERVICE
);
try
{
try
{
int
op
=
10021
;
int
op
=
10021
;
Method
method
=
ops
.
getClass
().
getMethod
(
"checkOpNoThrow"
,
new
Class
[]{
int
.
class
,
int
.
class
,
String
.
class
}
);
Method
method
=
ops
.
getClass
().
getMethod
(
"checkOpNoThrow"
,
int
.
class
,
int
.
class
,
String
.
class
);
Integer
result
=
(
Integer
)
method
.
invoke
(
ops
,
op
,
android
.
os
.
Process
.
myUid
(),
context
.
getPackageName
());
Integer
result
=
(
Integer
)
method
.
invoke
(
ops
,
op
,
android
.
os
.
Process
.
myUid
(),
context
.
getPackageName
());
return
result
==
AppOpsManager
.
MODE_ALLOWED
;
return
result
==
AppOpsManager
.
MODE_ALLOWED
;
...
@@ -53,13 +47,14 @@ public class IntentUtils {
...
@@ -53,13 +47,14 @@ public class IntentUtils {
*/
*/
public
static
boolean
canShowLockView
(
Context
context
)
{
public
static
boolean
canShowLockView
(
Context
context
)
{
AppOpsManager
ops
=
null
;
AppOpsManager
ops
=
null
;
ops
=
(
AppOpsManager
)
context
.
getSystemService
(
Context
.
APP_OPS_SERVICE
);
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
android
.
os
.
Build
.
VERSION_CODES
.
KITKAT
)
{
ops
=
(
AppOpsManager
)
context
.
getSystemService
(
Context
.
APP_OPS_SERVICE
);
}
try
{
try
{
int
op
=
10020
;
// >= 23
int
op
=
10020
;
// >= 23
// ops.checkOpNoThrow(op, uid, packageName)
// ops.checkOpNoThrow(op, uid, packageName)
Method
method
=
ops
.
getClass
().
getMethod
(
"checkOpNoThrow"
,
new
Class
[]
Method
method
=
ops
.
getClass
().
getMethod
(
"checkOpNoThrow"
,
{
int
.
class
,
int
.
class
,
String
.
class
}
int
.
class
,
int
.
class
,
String
.
class
);
);
Integer
result
=
(
Integer
)
method
.
invoke
(
ops
,
op
,
android
.
os
.
Process
.
myUid
(),
context
.
getPackageName
());
Integer
result
=
(
Integer
)
method
.
invoke
(
ops
,
op
,
android
.
os
.
Process
.
myUid
(),
context
.
getPackageName
());
return
result
==
AppOpsManager
.
MODE_ALLOWED
;
return
result
==
AppOpsManager
.
MODE_ALLOWED
;
...
@@ -71,7 +66,7 @@ public class IntentUtils {
...
@@ -71,7 +66,7 @@ public class IntentUtils {
}
}
/**
/**
* 判断vivo后台弹出界面
false未开启 true
开启
* 判断vivo后台弹出界面
1未开启 0
开启
*
*
* @param context
* @param context
* @return
* @return
...
@@ -102,12 +97,12 @@ public class IntentUtils {
...
@@ -102,12 +97,12 @@ public class IntentUtils {
}
}
/**
/**
* 判断vivo锁屏显示
1未开启 0开启
* 判断vivo锁屏显示
*
*
* @param context
* @param context
* @return
* @return
*/
*/
public
static
int
getVivoLockStatus
(
Context
context
)
{
public
static
boolean
getVivoLockStatus
(
Context
context
)
{
String
packageName
=
context
.
getPackageName
();
String
packageName
=
context
.
getPackageName
();
Uri
uri2
=
Uri
.
parse
(
"content://com.vivo.permissionmanager.provider.permission/control_locked_screen_action"
);
Uri
uri2
=
Uri
.
parse
(
"content://com.vivo.permissionmanager.provider.permission/control_locked_screen_action"
);
String
selection
=
"pkgname = ?"
;
String
selection
=
"pkgname = ?"
;
...
@@ -120,67 +115,23 @@ public class IntentUtils {
...
@@ -120,67 +115,23 @@ public class IntentUtils {
if
(
cursor
.
moveToFirst
())
{
if
(
cursor
.
moveToFirst
())
{
int
currentmode
=
cursor
.
getInt
(
cursor
.
getColumnIndex
(
"currentstate"
));
int
currentmode
=
cursor
.
getInt
(
cursor
.
getColumnIndex
(
"currentstate"
));
cursor
.
close
();
cursor
.
close
();
return
currentmode
;
return
currentmode
==
0
;
}
else
{
}
else
{
cursor
.
close
();
cursor
.
close
();
return
1
;
return
false
;
}
}
}
}
}
catch
(
Throwable
throwable
)
{
}
catch
(
Throwable
throwable
)
{
throwable
.
printStackTrace
();
throwable
.
printStackTrace
();
}
}
return
1
;
}
public
static
void
startActivity
(
Activity
activity
,
Intent
intent
)
{
if
(
isAllowedBackPopPermission
(
activity
)
|
getvivoBgStartActivityPermissionStatus
(
activity
))
{
if
(!
isRunningForeground
(
activity
))
{
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
Q
)
{
moveToFront
(
activity
);
MintsApplication
.
getContext
().
startActivity
(
intent
);
activity
.
moveTaskToBack
(
true
);
}
else
{
NotificationUtils
.
INSTANCE
.
sendNotificationFullScreen
(
activity
,
""
,
""
,
intent
);
}
}
else
{
MintsApplication
.
getContext
().
startActivity
(
intent
);
}
}
else
{
MintsApplication
.
getContext
().
startActivity
(
intent
);
}
}
public
static
Boolean
isRunningForeground
(
Activity
activity
)
{
ActivityManager
activityManager
=
(
ActivityManager
)
activity
.
getSystemService
(
Context
.
ACTIVITY_SERVICE
);
List
<
ActivityManager
.
RunningTaskInfo
>
taskInfoList
=
activityManager
.
getRunningTasks
(
1
);
for
(
ActivityManager
.
RunningTaskInfo
taskInfo
:
taskInfoList
)
{
if
(
taskInfo
.
baseActivity
.
getPackageName
().
equals
(
activity
.
getPackageName
()))
{
return
true
;
}
}
return
false
;
return
false
;
}
}
public
static
void
moveToFront
(
Context
context
)
{
public
static
boolean
getOppoLockStatus
(
Context
context
)
{
ActivityManager
activityManager
=
(
ActivityManager
)
context
.
getSystemService
(
Context
.
ACTIVITY_SERVICE
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
)
{
List
<
ActivityManager
.
RunningTaskInfo
>
taskInfoList
=
activityManager
.
getRunningTasks
(
20
);
return
Settings
.
canDrawOverlays
(
context
);
for
(
ActivityManager
.
RunningTaskInfo
taskInfo
:
taskInfoList
)
{
//遍历找到本应用的 task,并将它切换到前台
if
(
taskInfo
.
baseActivity
.
getPackageName
().
equals
(
context
.
getPackageName
()))
{
activityManager
.
moveTaskToFront
(
taskInfo
.
id
,
0
);
return
;
}
}
}
}
/**
return
true
;
* 跳转GPS设置
*/
public
static
void
openGPSSettings
(
Context
context
)
{
Intent
intent
=
new
Intent
(
Settings
.
ACTION_LOCATION_SOURCE_SETTINGS
);
context
.
startActivity
(
intent
);
}
}
}
}
app/src/main/java/com/mints/flowbox/utils/keepalive/ScreenLockerUtils.kt
0 → 100644
View file @
0b3c1526
This diff is collapsed.
Click to expand it.
app/src/main/res/drawable-xhdpi/loading.gif
0 → 100644
View file @
0b3c1526
209 KB
app/src/main/res/drawable/bg_gray_circle.xml
View file @
0b3c1526
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<gradient
<gradient
android:angle=
"
27
0"
android:angle=
"
9
0"
android:endColor=
"#C9C3FF"
android:endColor=
"#C9C3FF"
android:startColor=
"#AFA6FF"
/>
android:startColor=
"#AFA6FF"
/>
...
...
app/src/main/res/layout/activity_aboutus.xml
View file @
0b3c1526
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:background=
"@color/white"
...
@@ -68,7 +67,7 @@
...
@@ -68,7 +67,7 @@
android:layout_marginRight=
"2dp"
android:layout_marginRight=
"2dp"
android:padding=
"5dp"
android:padding=
"5dp"
android:text=
"@string/register_name"
android:text=
"@string/register_name"
android:textColor=
"@color/color_
FF9837
"
android:textColor=
"@color/color_
main
"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
<View
<View
...
@@ -76,7 +75,7 @@
...
@@ -76,7 +75,7 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"5dp"
android:layout_marginTop=
"5dp"
android:layout_marginBottom=
"5dp"
android:layout_marginBottom=
"5dp"
android:background=
"@color/color_
FF9837
"
/>
android:background=
"@color/color_
main
"
/>
<TextView
<TextView
android:id=
"@+id/tvAboutasPolicy"
android:id=
"@+id/tvAboutasPolicy"
...
@@ -85,7 +84,7 @@
...
@@ -85,7 +84,7 @@
android:layout_marginLeft=
"2dp"
android:layout_marginLeft=
"2dp"
android:padding=
"5dp"
android:padding=
"5dp"
android:text=
"隐私政策"
android:text=
"隐私政策"
android:textColor=
"@color/color_
FF9837
"
android:textColor=
"@color/color_
main
"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
</LinearLayout>
</LinearLayout>
...
...
app/src/main/res/layout/activity_apk.xml
View file @
0b3c1526
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<
Frame
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_20000000"
>
android:background=
"@color/color_10000000"
android:orientation=
"vertical"
>
<androidx.appcompat.widget.LinearLayoutCompat
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width=
"
300dp
"
android:layout_width=
"
match_parent
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_gravity=
"center"
android:layout_marginStart=
"15dp"
android:layout_marginTop=
"120dp"
android:layout_marginEnd=
"15dp"
android:background=
"@drawable/shape_bg_write"
android:background=
"@drawable/shape_bg_write"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:visibility=
"visible"
>
android:visibility=
"visible"
>
<ImageView
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/iv_close"
android:layout_width=
"match_parent"
android:layout_width=
"20dp"
android:layout_height=
"wrap_content"
android:layout_height=
"20dp"
android:layout_marginTop=
"10dp"
android:layout_alignParentEnd=
"true"
android:orientation=
"horizontal"
>
android:layout_gravity=
"end"
android:layout_margin=
"10dp"
<TextView
android:src=
"@mipmap/ic_close"
android:layout_width=
"0dp"
app:layout_constraintEnd_toEndOf=
"parent"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toTopOf=
"parent"
/>
android:layout_gravity=
"end"
android:layout_marginStart=
"10dp"
android:layout_weight=
"1"
android:drawableStart=
"@drawable/ic_launcher_main_mini"
android:drawablePadding=
"5dp"
android:gravity=
"center_vertical"
android:padding=
"5dp"
android:text=
"@string/appName"
android:textColor=
"@color/black"
/>
<ImageView
android:id=
"@+id/iv_close"
android:layout_width=
"22dp"
android:layout_height=
"22dp"
android:layout_alignParentEnd=
"true"
android:layout_gravity=
"end|center_vertical"
android:layout_marginEnd=
"10dp"
android:src=
"@mipmap/ic_close"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
<TextView
android:id=
"@+id/tvTitle"
android:id=
"@+id/tvTitle"
...
@@ -30,7 +55,6 @@
...
@@ -30,7 +55,6 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"-20dp"
android:text=
"安装包卸载"
android:text=
"安装包卸载"
android:textColor=
"@color/black"
android:textColor=
"@color/black"
android:textSize=
"18sp"
android:textSize=
"18sp"
...
@@ -89,7 +113,10 @@
...
@@ -89,7 +113,10 @@
android:id=
"@+id/btnClean"
android:id=
"@+id/btnClean"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_height=
"40dp"
android:layout_margin=
"15dp"
android:layout_marginStart=
"20dp"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"20dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/shape_green_light"
android:background=
"@drawable/shape_green_light"
android:text=
"立即清理"
android:text=
"立即清理"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
...
@@ -101,4 +128,14 @@
...
@@ -101,4 +128,14 @@
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</FrameLayout>
<com.mints.flowbox.ui.widgets.RoundRectLayout
\ No newline at end of file
android:id=
"@+id/fl_ad"
android:layout_width=
"360dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"15dp"
android:background=
"@drawable/shape_gold_card"
android:elevation=
"2dip"
android:gravity=
"center"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/activity_award.xml
View file @
0b3c1526
...
@@ -64,6 +64,7 @@
...
@@ -64,6 +64,7 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"4dp"
android:background=
"@drawable/shape_btn_gold_left"
android:background=
"@drawable/shape_btn_gold_left"
android:drawablePadding=
"4dp"
android:drawablePadding=
"4dp"
android:gravity=
"center"
android:gravity=
"center"
...
...
app/src/main/res/layout/activity_boost.xml
View file @
0b3c1526
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/
transparent
"
>
android:background=
"@color/
color_10000000
"
>
<com.mints.flowbox.ui.widgets.CircleCleanAnimationView
<com.mints.flowbox.ui.widgets.CircleCleanAnimationView
android:id=
"@+id/ccav_speed"
android:id=
"@+id/ccav_speed"
...
@@ -15,18 +15,18 @@
...
@@ -15,18 +15,18 @@
android:layout_width=
"360dp"
android:layout_width=
"360dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_gravity=
"center"
android:background=
"@color/color
PrimaryDark
"
android:background=
"@color/color
_main
"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:visibility=
"gone"
>
android:visibility=
"gone"
>
<ImageView
<ImageView
android:id=
"@+id/iv_close"
android:id=
"@+id/iv_close"
android:layout_width=
"
3
0dp"
android:layout_width=
"
2
0dp"
android:layout_height=
"
3
0dp"
android:layout_height=
"
2
0dp"
android:layout_gravity=
"right"
android:layout_gravity=
"right"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"10dp"
android:layout_marginEnd=
"10dp"
android:src=
"@mipmap/ic_
activity_quit
"
/>
android:src=
"@mipmap/ic_
close
"
/>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -55,6 +55,19 @@
...
@@ -55,6 +55,19 @@
android:elevation=
"2dip"
android:elevation=
"2dip"
android:gravity=
"center"
/>
android:gravity=
"center"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_marginTop=
"10dp"
android:background=
"@color/color_20000000"
android:drawableStart=
"@drawable/ic_launcher_main_mini"
android:drawablePadding=
"5dp"
android:padding=
"5dp"
android:text=
"@string/appName"
android:textColor=
"@color/white"
android:textSize=
"10sp"
/>
</LinearLayout>
</LinearLayout>
</FrameLayout>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/activity_screen.xml
View file @
0b3c1526
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<
Relativ
eLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Fram
eLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/container"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/transparent"
>
android:background=
"@color/transparent"
>
<TextView
<RelativeLayout
android:id=
"@+id/tvTime"
android:layout_width=
"match_parent"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
>
android:layout_height=
"wrap_content"
android:layout_marginStart=
"20dp"
android:layout_marginTop=
"30dp"
android:text=
"-"
android:textColor=
"@color/white"
android:textSize=
"60sp"
/>
<TextView
<TextView
android:id=
"@+id/tvDat
e"
android:id=
"@+id/tvTim
e"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tvTime
"
android:layout_marginStart=
"20dp
"
android:layout_marginStart=
"3
0dp"
android:layout_marginTop=
"5
0dp"
android:text=
"-"
android:text=
"-"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"2
0sp"
/>
android:textSize=
"6
0sp"
/>
<TextView
<TextView
android:id=
"@+id/tvBoost"
android:id=
"@+id/tvDate"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tvDate"
android:layout_below=
"@id/tvTime"
android:layout_marginStart=
"40dp"
android:layout_marginStart=
"30dp"
android:layout_marginTop=
"20dp"
android:text=
"-"
android:drawablePadding=
"6dp"
android:textColor=
"@color/white"
android:gravity=
"center_horizontal"
android:textSize=
"20sp"
/>
android:text=
"一键加速"
android:textColor=
"@color/white"
android:textSize=
"16sp"
app:drawableTopCompat=
"@mipmap/ic_main_jiasu"
/>
<TextView
<TextView
android:id=
"@+id/tvClean"
android:id=
"@+id/tvBoost"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tvDate"
android:layout_below=
"@id/tvDate"
android:layout_marginStart=
"40dp"
android:layout_marginStart=
"40dp"
android:layout_marginTop=
"20dp"
android:layout_marginTop=
"20dp"
android:layout_toEndOf=
"@id/tvBoost"
android:drawablePadding=
"6dp"
android:drawablePadding=
"6dp"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:text=
"一键加速"
android:text=
"一键清理"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"16sp"
android:textSize=
"16sp"
app:drawableTopCompat=
"@mipmap/ic_main_jiasu"
/>
app:drawableTopCompat=
"@mipmap/ic_main_clean"
/>
<TextView
<TextView
android:id=
"@+id/tvSaveBattery
"
android:id=
"@+id/tvClean
"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tvDate"
android:layout_below=
"@id/tvDate"
android:layout_marginStart=
"40dp"
android:layout_marginStart=
"40dp"
android:layout_marginTop=
"20dp"
android:layout_marginTop=
"20dp"
android:layout_toEndOf=
"@id/tvClean
"
android:layout_toEndOf=
"@id/tvBoost
"
android:drawablePadding=
"6dp"
android:drawablePadding=
"6dp"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:text=
"超强省电
"
android:text=
"一键清理
"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"16sp"
android:textSize=
"16sp"
app:drawableTopCompat=
"@mipmap/ic_main_shengdi
an"
/>
app:drawableTopCompat=
"@mipmap/ic_main_cle
an"
/>
<com.mints.flowbox.ui.widgets.RoundRectLayout
<TextView
android:id=
"@+id/fl_ad"
android:id=
"@+id/tvSaveBattery"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tvBoost"
android:layout_below=
"@id/tvDate"
android:layout_centerHorizontal=
"true"
android:layout_marginStart=
"40dp"
android:layout_marginTop=
"20dp"
android:layout_marginTop=
"20dp"
android:background=
"@drawable/shape_gold_card"
android:layout_toEndOf=
"@id/tvClean"
android:elevation=
"2dip"
android:drawablePadding=
"6dp"
android:gravity=
"center"
/>
android:gravity=
"center_horizontal"
android:text=
"超强省电"
android:textColor=
"@color/white"
android:textSize=
"16sp"
app:drawableTopCompat=
"@mipmap/ic_main_shengdian"
/>
<com.mints.flowbox.ui.widgets.RoundRectLayout
android:id=
"@+id/fl_ad"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tvBoost"
android:layout_centerHorizontal=
"true"
android:layout_marginStart=
"15dp"
android:layout_marginTop=
"20dp"
android:layout_marginEnd=
"15dp"
android:background=
"@drawable/shape_gold_card"
android:elevation=
"2dip"
android:gravity=
"center"
/>
</RelativeLayout>
<TextView
<TextView
android:id=
"@+id/tv"
android:id=
"@+id/tv"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"80dp"
android:layout_height=
"80dp"
android:layout_
alignParentBottom=
"true
"
android:layout_
gravity=
"bottom
"
android:background=
"@color/color_20000000"
android:background=
"@color/color_20000000"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"
》
右滑关闭"
android:text=
"
> >
右滑关闭"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"20sp"
/>
android:textSize=
"20sp"
/>
</RelativeLayout>
<TextView
\ No newline at end of file
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right|bottom"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"80dp"
android:background=
"@color/color_20000000"
android:drawableStart=
"@drawable/ic_launcher_main_mini"
android:drawablePadding=
"5dp"
android:padding=
"5dp"
android:text=
"@string/appName"
android:textColor=
"@color/white"
android:textSize=
"10sp"
/>
</FrameLayout>
app/src/main/res/layout/activity_timing.xml
0 → 100644
View file @
0b3c1526
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_10000000"
android:orientation=
"vertical"
>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginStart=
"15dp"
android:layout_marginTop=
"120dp"
android:layout_marginEnd=
"15dp"
android:background=
"@drawable/shape_bg_write"
android:orientation=
"vertical"
>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end"
android:layout_marginStart=
"10dp"
android:layout_weight=
"1"
android:drawableStart=
"@drawable/ic_launcher_main_mini"
android:drawablePadding=
"6dp"
android:gravity=
"center_vertical"
android:padding=
"5dp"
android:text=
"@string/appName"
android:textColor=
"@color/black"
/>
<ImageView
android:id=
"@+id/iv_close"
android:layout_width=
"22dp"
android:layout_height=
"22dp"
android:layout_alignParentEnd=
"true"
android:layout_gravity=
"end|center_vertical"
android:layout_marginEnd=
"10dp"
android:src=
"@mipmap/ic_close"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_margin=
"10dp"
android:src=
"@mipmap/ic_launcher"
/>
<TextView
android:id=
"@+id/tvInfo"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"10dp"
android:layout_marginEnd=
"10dp"
android:gravity=
"center"
android:text=
"-"
android:textColor=
"@color/black"
android:textSize=
"16sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@+id/ivIcon"
app:layout_constraintTop_toBottomOf=
"@+id/tvTitle"
/>
<Button
android:id=
"@+id/btnClean"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_marginStart=
"20dp"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"20dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/shape_green_light"
android:text=
"立即清理"
android:textColor=
"@color/white"
android:textSize=
"14sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tvInfo2"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<com.mints.flowbox.ui.widgets.RoundRectLayout
android:id=
"@+id/fl_ad"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_margin=
"15dp"
android:background=
"@drawable/shape_gold_card"
android:elevation=
"2dip"
android:gravity=
"center"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/dialog_power.xml
View file @
0b3c1526
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
android:paddingRight=
"2dp"
android:paddingRight=
"2dp"
android:paddingBottom=
"6dp"
android:paddingBottom=
"6dp"
android:text=
"@string/register_name"
android:text=
"@string/register_name"
android:textColor=
"@color/color_
FF9837
"
android:textColor=
"@color/color_
main
"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
/>
<TextView
<TextView
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
android:paddingRight=
"2dp"
android:paddingRight=
"2dp"
android:paddingBottom=
"6dp"
android:paddingBottom=
"6dp"
android:text=
"隐私政策"
android:text=
"隐私政策"
android:textColor=
"@color/color_
FF9837
"
android:textColor=
"@color/color_
main
"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
/>
</LinearLayout>
</LinearLayout>
...
@@ -175,37 +175,34 @@
...
@@ -175,37 +175,34 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"
horizont
al"
>
android:orientation=
"
vertic
al"
>
<TextView
<TextView
android:id=
"@+id/btn_dialogper_
back
"
android:id=
"@+id/btn_dialogper_
next
"
android:layout_width=
"
0dp
"
android:layout_width=
"
match_parent
"
android:layout_height=
"36dp"
android:layout_height=
"36dp"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_marginLeft=
"20dp"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_weight=
"1"
android:background=
"@color/color_main"
android:background=
"@color/color_ccc"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"
不
同意"
android:text=
"同意"
android:textColor=
"@color/white"
/>
android:textColor=
"@color/white"
/>
<TextView
<TextView
android:id=
"@+id/btn_dialogper_
next
"
android:id=
"@+id/btn_dialogper_
back
"
android:layout_width=
"
0dp
"
android:layout_width=
"
match_parent
"
android:layout_height=
"36dp"
android:layout_height=
"36dp"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_marginLeft=
"20dp"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_weight=
"1"
android:background=
"@color/color_ccc"
android:background=
"@color/color_FF9837"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"同意"
android:text=
"
不
同意"
android:textColor=
"@color/white"
/>
android:textColor=
"@color/white"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
app/src/main/res/layout/fragment_wifi.xml
View file @
0b3c1526
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:text=
"WIFI未开启"
android:text=
"WIFI未开启"
android:textColor=
"@color/black"
android:textColor=
"@color/black"
android:textSize=
"2
2
sp"
android:textSize=
"2
0
sp"
android:textStyle=
"bold"
android:textStyle=
"bold"
app:layout_constraintStart_toEndOf=
"@+id/imageView2"
app:layout_constraintStart_toEndOf=
"@+id/imageView2"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
app/src/main/res/mipmap-xhdpi/bg_right.png
View replaced file @
030e7d21
View file @
0b3c1526
2.33 KB
|
W:
|
H:
2.17 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/src/main/res/mipmap-xhdpi/ic_bouns_redbox.png
0 → 100644
View file @
0b3c1526
7.06 KB
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