Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
Out
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
xjl
Out
Commits
04aa39dd
Commit
04aa39dd
authored
Dec 19, 2023
by
xujialang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
# Conflicts: # app/src/main/java/com/zl/sdk/OutHelp.java
parents
7d7cbafb
b9135518
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
OutHelp.java
app/src/main/java/com/zl/sdk/OutHelp.java
+8
-1
ActionFrom.java
app/src/main/java/com/zl/sdk/out/ActionFrom.java
+3
-1
No files found.
app/src/main/java/com/zl/sdk/OutHelp.java
View file @
04aa39dd
...
@@ -150,7 +150,8 @@ public final class OutHelp implements KPListener {
...
@@ -150,7 +150,8 @@ public final class OutHelp implements KPListener {
private
void
initReceiver
()
{
private
void
initReceiver
()
{
LogUtil
.
d
(
TAG
+
"初始化:initReceiver"
);
LogUtil
.
d
(
TAG
+
"初始化:initReceiver"
);
TriggerReceiver
triggerReceiver
=
new
TriggerReceiver
();
TriggerReceiver
triggerReceiver
=
new
TriggerReceiver
();
IntentFilter
intentfilter
=
new
IntentFilter
(
"android.net.conn.CONNECTIVITY_CHANGE"
);
IntentFilter
intentfilter
=
new
IntentFilter
(
TriggerReceiver
.
ACTION_CONNECTIVITY_CHANGE
);
intentfilter
.
addAction
(
TriggerReceiver
.
ACTION_VOLUME_CHANGED_ACTION
);
intentfilter
.
addAction
(
Intent
.
ACTION_USER_PRESENT
);
intentfilter
.
addAction
(
Intent
.
ACTION_USER_PRESENT
);
intentfilter
.
addAction
(
Intent
.
ACTION_SCREEN_ON
);
intentfilter
.
addAction
(
Intent
.
ACTION_SCREEN_ON
);
intentfilter
.
addAction
(
Intent
.
ACTION_CLOSE_SYSTEM_DIALOGS
);
intentfilter
.
addAction
(
Intent
.
ACTION_CLOSE_SYSTEM_DIALOGS
);
...
@@ -558,11 +559,17 @@ public final class OutHelp implements KPListener {
...
@@ -558,11 +559,17 @@ public final class OutHelp implements KPListener {
}
}
public
static
class
TriggerReceiver
extends
BroadcastReceiver
{
public
static
class
TriggerReceiver
extends
BroadcastReceiver
{
private
static
final
String
ACTION_CONNECTIVITY_CHANGE
=
"android.net.conn.CONNECTIVITY_CHANGE"
;
private
static
final
String
ACTION_VOLUME_CHANGED_ACTION
=
"android.media.VOLUME_CHANGED_ACTION"
;
@Override
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
if
(
intent
==
null
)
{
if
(
intent
==
null
)
{
return
;
return
;
}
}
LogUtil
.
d
(
TAG
+
"外展广播 :"
+
intent
.
getAction
());
if
(!
DataManager
.
get
().
checkOutOpen
(
context
))
{
if
(!
DataManager
.
get
().
checkOutOpen
(
context
))
{
LogUtil
.
d
(
TAG
+
"外展未开启,不接收广播"
);
LogUtil
.
d
(
TAG
+
"外展未开启,不接收广播"
);
...
...
app/src/main/java/com/zl/sdk/out/ActionFrom.java
View file @
04aa39dd
...
@@ -8,7 +8,9 @@ public enum ActionFrom {
...
@@ -8,7 +8,9 @@ public enum ActionFrom {
ACTION_TIMER
(
4
),
ACTION_TIMER
(
4
),
ACTION_BATTERY_CHANGED
(
5
),
ACTION_BATTERY_CHANGED
(
5
),
ACTION_PACKAGE_RESTARTED
(
6
),
ACTION_PACKAGE_RESTARTED
(
6
),
ACTION_OTHER
(
5
);
ACTION_VOLUME_CHANGED
(
7
),
ACTION_OTHER
(
8
);
private
int
action
;
private
int
action
;
...
...
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