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
7e4866d2
Commit
7e4866d2
authored
Jul 26, 2021
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
515090bf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
22 deletions
+107
-22
Constant.kt
app/src/main/java/com/mints/flowbox/common/Constant.kt
+3
-0
AwardActivity.kt
...main/java/com/mints/flowbox/ui/activitys/AwardActivity.kt
+1
-1
Increasespeed2Activity.kt
.../com/mints/flowbox/ui/activitys/Increasespeed2Activity.kt
+4
-4
MainActivity.kt
.../main/java/com/mints/flowbox/ui/activitys/MainActivity.kt
+21
-9
SplashGroMoreActivity.java
...com/mints/flowbox/ui/activitys/SplashGroMoreActivity.java
+78
-8
No files found.
app/src/main/java/com/mints/flowbox/common/Constant.kt
View file @
7e4866d2
...
...
@@ -242,4 +242,7 @@ object Constant {
// 大转盘是否自动转动 true-自动
const
val
TURNTABLE_SWITCH_BUTTON
=
"TURNTABLE_SWITCH_BUTTON"
// 是否第一次授权 true-是
const
val
IS_ONE_PERMISSIONS
=
"IS_ONE_PERMISSIONS"
}
app/src/main/java/com/mints/flowbox/ui/activitys/AwardActivity.kt
View file @
7e4866d2
...
...
@@ -731,7 +731,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
val
cashStr
=
allcoinBig
.
divide
(
rateBig
).
setScale
(
2
,
BigDecimal
.
ROUND_DOWN
).
toString
()
if
(
AppConfig
.
awardCoin
>
0
)
{
tvAwardContent
.
text
=
"${AppConfig.awardCoin}金币已到账"
tvAwardContent
.
text
=
"${AppConfig.awardCoin}金币已到账
~
"
tvAwardNext
.
visibility
=
View
.
GONE
}
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/Increasespeed2Activity.kt
View file @
7e4866d2
...
...
@@ -44,12 +44,12 @@ class Increasespeed2Activity : BaseActivity(), View.OnClickListener {
}
private
val
mStringArr1
=
mutableListOf
(
"
检测结果
WiFi加密安全性"
,
"检
查
ARP网络攻击异常"
,
"
加强
WiFi加密安全性"
,
"检
测无
ARP网络攻击异常"
,
"提升DNS劫持安全性"
,
"部署网页防篡改"
,
"
增强
部署网页防篡改"
,
"加固链路,避免SSL中间人攻击"
,
"检测
是否
钓鱼WiFi"
"检测
无
钓鱼WiFi"
)
private
val
mStringArr2
=
mutableListOf
(
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/MainActivity.kt
View file @
7e4866d2
...
...
@@ -393,15 +393,27 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
private
var
userMsgBean
:
UserTaskMsgBean
?
=
null
private
fun
showPowerDialog
()
{
if
(
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
powerDialog
()
}
else
{
// 数美初始化
baseApplication
.
initMiitHelper
()
ShumeiManager
.
getInstance
().
initShumei
()
uploadDevice
()
// if (AppPreferencesManager.get().getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) {
// powerDialog()
// } else {
// // 数美初始化
// baseApplication.initMiitHelper()
// ShumeiManager.getInstance().initShumei()
// uploadDevice()
// }
// 第一次授权
if
(
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
IS_ONE_PERMISSIONS
,
true
))
{
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_ONE_PERMISSIONS
,
false
)
checkPermission
()
}
// 数美初始化
baseApplication
.
initMiitHelper
()
ShumeiManager
.
getInstance
().
initShumei
()
uploadDevice
()
//闪电盒子传入oaid
if
(!
TextUtils
.
isEmpty
(
MintsApplication
.
OAID
))
{
WnManager
.
setOaid
(
MintsApplication
.
OAID
)
...
...
@@ -500,10 +512,10 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
* refreshType fragment传入的下标
*/
fun
userLogin
(
refreshType
:
Int
)
{
if
(!
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
//
if (!AppPreferencesManager.get().getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) {
mRefreshType
=
refreshType
mainPresenter
.
userLogin
()
}
//
}
}
/**
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/SplashGroMoreActivity.java
View file @
7e4866d2
package
com
.
mints
.
flowbox
.
ui
.
activitys
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.widget.FrameLayout
;
import
android.widget.RelativeLayout
;
...
...
@@ -24,6 +26,7 @@ import com.mints.flowbox.ad.express.ExpressManager;
import
com.mints.flowbox.common.Constant
;
import
com.mints.flowbox.common.DeviceInfo
;
import
com.mints.flowbox.keepalive.appswitch.AntiAuditManager
;
import
com.mints.flowbox.manager.AppPreferencesManager
;
import
com.mints.flowbox.manager.CsjGroMoreManager
;
import
com.mints.flowbox.manager.TrackManager
;
import
com.mints.flowbox.manager.TtCsjAdManager
;
...
...
@@ -33,6 +36,8 @@ import com.mints.flowbox.mvp.presenters.SplashPresenter;
import
com.mints.flowbox.mvp.views.SplashView
;
import
com.mints.flowbox.ui.activitys.base.BaseActivity
;
import
com.mints.flowbox.ui.widgets.CycleProgress
;
import
com.mints.flowbox.ui.widgets.dialog.DialogListener
;
import
com.mints.flowbox.ui.widgets.dialog.PowerDialog
;
import
com.mints.flowbox.utils.LogUtil
;
import
com.mints.library.utils.CommonUtils
;
...
...
@@ -48,6 +53,8 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
private
SplashPresenter
splashPresenter
;
PowerDialog
powerDialog
;
private
static
final
String
TAG
=
"SplashGroMoreActivity"
;
private
TTSplashAd
mTTSplashAd
;
private
FrameLayout
mSplashContainer
;
...
...
@@ -63,6 +70,8 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
private
boolean
baiduSplashAdClicked
=
false
;
private
boolean
onPaused
=
false
;
private
boolean
isClickAgree
=
false
;
private
CycleProgress
mProgressBar
;
private
RelativeLayout
mPreContainer
;
...
...
@@ -232,14 +241,17 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
@Override
protected
void
onResume
()
{
//判断是否该跳转到主页面
if
(
mForceGoMain
)
{
goToMainActivity
();
}
if
(
isBaiduSplashAd
&&
onPaused
&&
baiduSplashAdClicked
)
{
// 这种情况下,百度开屏广告不能在onAdDismiss中跳转,需要自己在onResume中跳转主页。
goToMainActivity
();
if
(
isClickAgree
){
//判断是否该跳转到主页面
if
(
mForceGoMain
)
{
goToMainActivity
();
}
if
(
isBaiduSplashAd
&&
onPaused
&&
baiduSplashAdClicked
)
{
// 这种情况下,百度开屏广告不能在onAdDismiss中跳转,需要自己在onResume中跳转主页。
goToMainActivity
();
}
}
super
.
onResume
();
}
...
...
@@ -275,7 +287,8 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
if
(!
deviceInfo
.
getSignInfo
())
{
getBaseApplication
().
exitApp
();
}
else
{
splashPresenter
.
getCloseNeedInitAppsCount
();
// splashPresenter.getCloseNeedInitAppsCount();
showPowerDialog
();
}
}
...
...
@@ -319,4 +332,61 @@ public class SplashGroMoreActivity extends BaseActivity implements SplashView {
public
void
getAppsCountFail
()
{
initData
();
}
private
void
showPowerDialog
()
{
if
(
AppPreferencesManager
.
INSTANCE
.
get
().
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
powerDialog
();
}
else
{
splashPresenter
.
getCloseNeedInitAppsCount
();
isClickAgree
=
true
;
}
}
/**
* 权限弹窗
*/
private
void
powerDialog
()
{
Bundle
bundle
=
new
Bundle
();
powerDialog
=
new
PowerDialog
(
this
,
new
DialogListener
()
{
@Override
public
void
onClick
(
View
v
)
{
switch
(
v
.
getId
())
{
case
R
.
id
.
tv_dialogper_agreement
:
bundle
.
putString
(
WebActivity
.
WEB_TITLE
,
getString
(
R
.
string
.
register_name
)
);
bundle
.
putString
(
WebActivity
.
WEB_URL
,
Constant
.
INSTANCE
.
getREGISTER_URL
());
readyGo
(
WebActivity
.
class
,
bundle
);
break
;
case
R
.
id
.
tv_dialogper_policy
:
bundle
.
putString
(
WebActivity
.
WEB_TITLE
,
getString
(
R
.
string
.
privacy_name
)
);
bundle
.
putString
(
WebActivity
.
WEB_URL
,
Constant
.
INSTANCE
.
getPRIVACY_URL
());
readyGo
(
WebActivity
.
class
,
bundle
);
break
;
case
R
.
id
.
btn_dialogper_back
:
if
(
powerDialog
!=
null
&&
powerDialog
.
isShowing
())
{
showToast
(
"请您同意授权,否则将无法使用APP功能"
);
}
break
;
case
R
.
id
.
btn_dialogper_next
:
isClickAgree
=
true
;
if
(
powerDialog
!=
null
&&
powerDialog
.
isShowing
())
{
powerDialog
.
dismiss
();
AppPreferencesManager
.
INSTANCE
.
get
()
.
put
(
Constant
.
LOAN_PERMISSION_FLAG
,
false
);
}
splashPresenter
.
getCloseNeedInitAppsCount
();
break
;
}
}
});
powerDialog
.
show
();
}
}
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