Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
B
Browser White
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
Browser White
Commits
a88dce78
Commit
a88dce78
authored
Sep 05, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
98918230
8e8a159f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
+12
-10
NotificationUiUtil.kt
...main/java/com/base/browserwhite/fcm/NotificationUiUtil.kt
+10
-9
ScreenStatusReceiver.java
.../java/com/base/browserwhite/fcm/ScreenStatusReceiver.java
+2
-0
InstallHelper.kt
...src/main/java/com/base/browserwhite/help/InstallHelper.kt
+0
-1
No files found.
app/src/main/java/com/base/browserwhite/fcm/NotificationUiUtil.kt
View file @
a88dce78
...
@@ -247,17 +247,18 @@ object NotificationUiUtil {
...
@@ -247,17 +247,18 @@ object NotificationUiUtil {
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
S
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
S
)
{
small
=
smallRemoteViews
small
=
smallRemoteViews
}
}
builder
.
setContent
(
small
)
// 设置小视图
builder
.
setCustomHeadsUpContentView
(
small
)
builder
.
setCustomContentView
(
smallRemoteViews
)
builder
.
setCustomContentView
(
small
)
// 设置悬浮通知视图(Android 12 及以上)
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
S
)
{
builder
.
setCustomHeadsUpContentView
(
bigRemoteViews
)
}
// 设置大视图
builder
.
setCustomBigContentView
(
bigRemoteViews
)
builder
.
setCustomBigContentView
(
bigRemoteViews
)
// Show the notification
// if (AppPreferences.getInstance().getString("actionS", "1").toInt() == 1) {
// notificationManager.notify(intent.getIntExtra("actionId", actionId), builder.build())
// } else {
// notificationManager.notify(actionId, builder.build())
// }
notificationManager
.
notify
(
actionId
,
builder
.
build
())
notificationManager
.
notify
(
actionId
,
builder
.
build
())
AppPreferences
.
getInstance
().
put
(
"last_notification_time"
,
System
.
currentTimeMillis
())
AppPreferences
.
getInstance
().
put
(
"last_notification_time"
,
System
.
currentTimeMillis
())
if
(
actionId
==
ID_JUNK_CLEANER
)
{
if
(
actionId
==
ID_JUNK_CLEANER
)
{
...
...
app/src/main/java/com/base/browserwhite/fcm/ScreenStatusReceiver.java
View file @
a88dce78
...
@@ -7,6 +7,7 @@ import android.content.Context;
...
@@ -7,6 +7,7 @@ import android.content.Context;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.IntentFilter
;
import
android.content.IntentFilter
;
import
android.os.Build
;
import
android.os.Build
;
import
android.util.Log
;
import
com.base.browserwhite.utils.AppPreferences
;
import
com.base.browserwhite.utils.AppPreferences
;
...
@@ -48,6 +49,7 @@ public class ScreenStatusReceiver extends BroadcastReceiver {
...
@@ -48,6 +49,7 @@ public class ScreenStatusReceiver extends BroadcastReceiver {
if
(
isDeviceInteractive
()
&&
!
isSecureLockActive
())
{
if
(
isDeviceInteractive
()
&&
!
isSecureLockActive
())
{
int
secureSetting
=
Integer
.
parseInt
(
AppPreferences
.
getInstance
().
getString
(
"lockS"
,
"1"
));
int
secureSetting
=
Integer
.
parseInt
(
AppPreferences
.
getInstance
().
getString
(
"lockS"
,
"1"
));
if
(
secureSetting
==
1
)
{
if
(
secureSetting
==
1
)
{
Log
.
d
(
"glc"
,
"lockS"
);
NotificationPushUtil
.
INSTANCE
.
sendNotificationWhere
(
context
,
null
,
PUSH_WHERE_UNLOCK
);
NotificationPushUtil
.
INSTANCE
.
sendNotificationWhere
(
context
,
null
,
PUSH_WHERE_UNLOCK
);
}
}
}
}
...
...
app/src/main/java/com/base/browserwhite/help/InstallHelper.kt
View file @
a88dce78
...
@@ -103,7 +103,6 @@ object InstallHelps {
...
@@ -103,7 +103,6 @@ object InstallHelps {
)
)
}
}
}
}
ScreenStatusReceiver
.
setupScreenStatusListener
(
MyApplication
.
context
)
}
}
}
}
}
}
\ No newline at end of file
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