Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
Easy Cleaner Junk
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Easy Cleaner Junk
Commits
57632ec3
Commit
57632ec3
authored
Jul 23, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1042e555
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
DeviceScanAdapter.kt
...om/test/easy/easycleanerjunk/adapter/DeviceScanAdapter.kt
+2
-0
NotificationUtil.java
...a/com/test/easy/easycleanerjunk/fcm/NotificationUtil.java
+14
-1
No files found.
app/src/main/java/com/test/easy/easycleanerjunk/adapter/DeviceScanAdapter.kt
View file @
57632ec3
...
@@ -16,6 +16,7 @@ import com.test.easy.easycleanerjunk.R
...
@@ -16,6 +16,7 @@ import com.test.easy.easycleanerjunk.R
import
com.test.easy.easycleanerjunk.bean.DeviceItemBean
import
com.test.easy.easycleanerjunk.bean.DeviceItemBean
import
com.test.easy.easycleanerjunk.databinding.ItemDeviceInfoItemBinding
import
com.test.easy.easycleanerjunk.databinding.ItemDeviceInfoItemBinding
import
com.test.easy.easycleanerjunk.helps.BaseApplication
import
com.test.easy.easycleanerjunk.helps.BaseApplication
import
com.test.easy.easycleanerjunk.helps.LogEx
import
com.test.easy.easycleanerjunk.utils.DeviceUtilsEx.getDeviceName
import
com.test.easy.easycleanerjunk.utils.DeviceUtilsEx.getDeviceName
import
com.test.easy.easycleanerjunk.utils.SPUtils
import
com.test.easy.easycleanerjunk.utils.SPUtils
import
com.test.easy.easycleanerjunk.view.XmlEx.inflate
import
com.test.easy.easycleanerjunk.view.XmlEx.inflate
...
@@ -99,6 +100,7 @@ class DeviceScanAdapter(
...
@@ -99,6 +100,7 @@ class DeviceScanAdapter(
SPUtils
.
getInstance
().
put
(
"gid"
,
gid
)
SPUtils
.
getInstance
().
put
(
"gid"
,
gid
)
data
.
content
=
gid
data
.
content
=
gid
anim
.
end
()
anim
.
end
()
LogEx
.
logDebug
(
"glc"
,
gid
)
}
}
}
}
})
})
...
...
app/src/main/java/com/test/easy/easycleanerjunk/fcm/NotificationUtil.java
View file @
57632ec3
...
@@ -81,8 +81,21 @@ public class NotificationUtil {
...
@@ -81,8 +81,21 @@ public class NotificationUtil {
private
static
HandlerThread
handlerThread
;
private
static
HandlerThread
handlerThread
;
private
static
Handler
handler
;
private
static
Handler
handler
;
private
fun
incrementNotification
()
{
val
key
=
"showNotificationCount_"
+
AdDisplayUtils
.
getInstance
().
getCurrentDate
()
var
s
=
AppPreferences
.
getInstance
().
getInt
(
key
,
0
)
s
++
AppPreferences
.
getInstance
().
put
(
key
,
s
)
}
public
static
void
sendNotification
(
Context
context
)
{
public
static
void
sendNotification
(
Context
context
)
{
val
currentNum
=
AppPreferences
.
getInstance
().
getInt
(
"showNotificationCount_"
+
AdDisplayUtils
.
getInstance
().
getCurrentDate
(),
0
)
val
maxNum
=
AppPreferences
.
getInstance
().
getString
(
"maxShowNotificationCount"
,
"156"
).
toIntOrNull
()?:
156
if
(
currentNum
>=
maxNum
)
{
LogEx
.
logDebug
(
"glc"
,
"currentNum >= maxNum"
)
return
}
int
actionId
=
getNextNotificationId
();
int
actionId
=
getNextNotificationId
();
EventUtils
.
INSTANCE
.
event
(
"showNotification"
,
null
,
null
,
false
);
EventUtils
.
INSTANCE
.
event
(
"showNotification"
,
null
,
null
,
false
);
...
@@ -99,7 +112,7 @@ public class NotificationUtil {
...
@@ -99,7 +112,7 @@ public class NotificationUtil {
}
}
sendNotification
(
context
,
actionId
);
sendNotification
(
context
,
actionId
);
incrementNotification
()
int
open
=
SPUtils
.
getInstance
().
getInt
(
"open"
,
0
);
int
open
=
SPUtils
.
getInstance
().
getInt
(
"open"
,
0
);
if
(
open
==
1
)
{
if
(
open
==
1
)
{
...
...
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