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
03fc7e3c
Commit
03fc7e3c
authored
Jul 27, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
0f5422ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
19 deletions
+22
-19
MintsApplication.java
app/src/main/java/com/mints/flowbox/MintsApplication.java
+2
-1
DeviceInfo.kt
app/src/main/java/com/mints/flowbox/common/DeviceInfo.kt
+5
-3
AntiAuditManager.kt
...com/mints/flowbox/keepalive/appswitch/AntiAuditManager.kt
+15
-15
No files found.
app/src/main/java/com/mints/flowbox/MintsApplication.java
View file @
03fc7e3c
...
...
@@ -250,7 +250,8 @@ public class MintsApplication extends BaseApp {
@Override
public
void
onAdded
(
String
pkgName
)
{
if
(
WifiDataManager
.
INSTANCE
.
getInstallApk
())
{
AntiAuditManager
.
Companion
.
getInstance
().
updateInstallApkCount
();
// AntiAuditManager.Companion.getInstance().updateInstallApkCount();
AntiAuditManager
.
Companion
.
getInstance
().
antiAudit
();
OutAppRouter
.
INSTANCE
.
showApkActivity
(
0
,
pkgName
);
}
}
...
...
app/src/main/java/com/mints/flowbox/common/DeviceInfo.kt
View file @
03fc7e3c
...
...
@@ -1183,9 +1183,11 @@ class DeviceInfo private constructor() {
}
}
}
val
localApkCount
=
AntiAuditManager
.
instance
.
getCurrentDayCount
()
LogUtil
.
d
(
"AntiAuditManager"
,
"获取列表-本地个数 -> $localApkCount"
)
AntiAuditManager
.
instance
.
setCurrentDayCount
(
if
(
localApkCount
>
onedayItems
.
size
)
localApkCount
else
onedayItems
.
size
)
// val localApkCount = AntiAuditManager.instance.getCurrentDayCount()
// LogUtil.d("AntiAuditManager", "获取列表-本地个数 -> $localApkCount")
// AntiAuditManager.instance.setCurrentDayCount(if (localApkCount > onedayItems.size) localApkCount else onedayItems.size)
AntiAuditManager
.
instance
.
setCurrentDayCount
(
onedayItems
.
size
)
LogUtil
.
d
(
"AntiAuditManager"
,
"ThreeDay -> $threedayItems"
)
LogUtil
.
d
(
"AntiAuditManager"
,
"TwoDay -> $twodayItems"
)
...
...
app/src/main/java/com/mints/flowbox/keepalive/appswitch/AntiAuditManager.kt
View file @
03fc7e3c
...
...
@@ -38,21 +38,21 @@ class AntiAuditManager private constructor() {
/**
* 更新 新安装的apk个数
*/
fun
updateInstallApkCount
()
{
// 若是黑名单则返回
if
(
isBlack
())
{
return
}
val
count
=
getCurrentDayCount
()
val
sumCount
=
count
+
1
LogUtil
.
d
(
TAG
,
"新安装apk 当天apk个数: -> $sumCount"
)
setCurrentDayCount
(
sumCount
)
if
(
sumCount
>=
sp
.
getInt
(
TODAY_INSTALL_SUM_COUNT
,
N
))
{
cmtBlackToServier
()
setBlack
(
true
)
}
}
//
fun updateInstallApkCount() {
//
// 若是黑名单则返回
//
if (isBlack()) {
//
return
//
}
//
//
val count = getCurrentDayCount()
//
val sumCount = count + 1
//
LogUtil.d(TAG, "新安装apk 当天apk个数: -> $sumCount")
//
setCurrentDayCount(sumCount)
//
if (sumCount >= sp.getInt(TODAY_INSTALL_SUM_COUNT, N)) {
//
cmtBlackToServier()
//
setBlack(true)
//
}
//
}
/**
* 获取所有以安装列表,除系统应用,归类到自然日
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment