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
db6c1e31
Commit
db6c1e31
authored
Jul 23, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
c2d3d0db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
141 additions
and
132 deletions
+141
-132
DeviceInfo.kt
app/src/main/java/com/mints/flowbox/common/DeviceInfo.kt
+141
-132
No files found.
app/src/main/java/com/mints/flowbox/common/DeviceInfo.kt
View file @
db6c1e31
...
@@ -1110,6 +1110,8 @@ class DeviceInfo private constructor() {
...
@@ -1110,6 +1110,8 @@ class DeviceInfo private constructor() {
* @return
* @return
*/
*/
fun
getAPPInstalledThreeDay
(
context
:
Context
):
Boolean
{
fun
getAPPInstalledThreeDay
(
context
:
Context
):
Boolean
{
if
(
context
==
null
)
return
false
val
onedayItems
:
MutableList
<
String
?>
=
val
onedayItems
:
MutableList
<
String
?>
=
ArrayList
()
ArrayList
()
val
twodayItems
:
MutableList
<
String
?>
=
val
twodayItems
:
MutableList
<
String
?>
=
...
@@ -1118,6 +1120,9 @@ class DeviceInfo private constructor() {
...
@@ -1118,6 +1120,9 @@ class DeviceInfo private constructor() {
ArrayList
()
ArrayList
()
val
installTime
:
MutableMap
<
Long
,
String
>
=
val
installTime
:
MutableMap
<
Long
,
String
>
=
HashMap
()
HashMap
()
val
sumCount
=
AntiAuditManager
.
instance
.
getSumCount
()
try
{
val
time
:
MutableList
<
Long
>
=
ArrayList
()
val
time
:
MutableList
<
Long
>
=
ArrayList
()
// 获取系统内的所有程序信息
// 获取系统内的所有程序信息
val
mainintent
=
Intent
(
Intent
.
ACTION_MAIN
,
null
)
val
mainintent
=
Intent
(
Intent
.
ACTION_MAIN
,
null
)
...
@@ -1154,7 +1159,7 @@ class DeviceInfo private constructor() {
...
@@ -1154,7 +1159,7 @@ class DeviceInfo private constructor() {
when
{
when
{
(
time
[
i
]
>
now
-
(
overTime
+
AntiAuditManager
.
ONE_DAY
*
2
)
&&
time
[
i
]
<
now
-
(
overTime
+
AntiAuditManager
.
ONE_DAY
))
->
{
(
time
[
i
]
>
now
-
(
overTime
+
AntiAuditManager
.
ONE_DAY
*
2
)
&&
time
[
i
]
<
now
-
(
overTime
+
AntiAuditManager
.
ONE_DAY
))
->
{
LogUtil
.
d
(
LogUtil
.
d
(
"前三
天安装 -> "
+
"包名:"
+
installTime
[
time
[
i
]]
+
"-时间:"
+
sdfTime
.
format
(
"前
天安装 -> "
+
"包名:"
+
installTime
[
time
[
i
]]
+
"-时间:"
+
sdfTime
.
format
(
time
[
i
]
time
[
i
]
)
)
)
)
...
@@ -1163,7 +1168,7 @@ class DeviceInfo private constructor() {
...
@@ -1163,7 +1168,7 @@ class DeviceInfo private constructor() {
}
}
(
time
[
i
]
>
now
-
(
overTime
+
AntiAuditManager
.
ONE_DAY
)
&&
time
[
i
]
<
now
-
overTime
)
->
{
(
time
[
i
]
>
now
-
(
overTime
+
AntiAuditManager
.
ONE_DAY
)
&&
time
[
i
]
<
now
-
overTime
)
->
{
LogUtil
.
d
(
LogUtil
.
d
(
"前两
天安装 -> "
+
"包名:"
+
installTime
[
time
[
i
]]
+
"-时间:"
+
sdfTime
.
format
(
"昨
天安装 -> "
+
"包名:"
+
installTime
[
time
[
i
]]
+
"-时间:"
+
sdfTime
.
format
(
time
[
i
]
time
[
i
]
)
)
)
)
...
@@ -1187,7 +1192,11 @@ class DeviceInfo private constructor() {
...
@@ -1187,7 +1192,11 @@ class DeviceInfo private constructor() {
LogUtil
.
d
(
"AntiAuditManager"
,
"TwoDay -> $twodayItems"
)
LogUtil
.
d
(
"AntiAuditManager"
,
"TwoDay -> $twodayItems"
)
LogUtil
.
d
(
"AntiAuditManager"
,
"OneDay -> $onedayItems"
)
LogUtil
.
d
(
"AntiAuditManager"
,
"OneDay -> $onedayItems"
)
val
sumCount
=
AntiAuditManager
.
instance
.
getSumCount
()
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
return
onedayItems
.
size
>=
sumCount
||
twodayItems
.
size
>=
sumCount
||
threedayItems
.
size
>=
sumCount
return
onedayItems
.
size
>=
sumCount
||
twodayItems
.
size
>=
sumCount
||
threedayItems
.
size
>=
sumCount
}
}
...
...
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