Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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_goodmoney
Commits
89348f53
Commit
89348f53
authored
Jan 30, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
体验任务添加使用记录权限
parent
c48e1d96
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
TaskCpdHistoryFragment.kt
...com/mints/goodmoney/ui/fragment/TaskCpdHistoryFragment.kt
+5
-0
AppUtil.kt
...ey/app/src/main/java/com/mints/goodmoney/utils/AppUtil.kt
+0
-7
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/TaskCpdHistoryFragment.kt
View file @
89348f53
...
...
@@ -97,6 +97,11 @@ class TaskCpdHistoryFragment : LazyLoadBaseFragment(), TaskCpdHistoryView,
when
(
mFakeTaskList
[
position
].
state
)
{
// 1 去试玩, 2 领取奖励 3 已领取 4 继续试玩
1
->
{
if
(!
AppUtil
.
isOpenUsageStats
())
{
AppTryPlayManager
.
openAppUsageStats
(
requireActivity
())
return
}
mTaskAdapter
?.
let
{
val
currentPkgName
=
mFakeTaskList
[
it
.
getPosition
()].
currentPkgName
if
(
currentPkgName
==
null
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/AppUtil.kt
View file @
89348f53
...
...
@@ -140,13 +140,6 @@ object AppUtil {
// 如果当前上次使用时间 小于 当前时间-5分钟,判断合规
if
(
paramString
==
(
list
[
i
]
as
UsageStats
).
packageName
)
{
if
(
BuildConfig
.
DEBUG
)
{
ToastUtil
.
showLong
(
paramContext
,
"当前APP名称:"
+
getAppName
(
paramString
,
paramContext
)
+
"\r\n"
+
"当前判定时间间隔:"
+
SimpleDateFormat
().
format
(
l
-
5
*
60
*
1000L
)
+
"至"
+
SimpleDateFormat
().
format
(
l
)
+
"\r\n"
+
"当前APP上次打开时间:"
+
SimpleDateFormat
().
format
((
list
[
i
]
as
UsageStats
).
lastTimeUsed
)
+
"\r\n"
+
"当前APP使用时间:"
+
(
list
[
i
]
as
UsageStats
).
totalTimeInForeground
.
toInt
()
/
1000
+
"秒"
)
}
return
(
list
[
i
]
as
UsageStats
).
totalTimeInForeground
.
toInt
()
/
1000
}
}
...
...
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