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
98109633
Commit
98109633
authored
Dec 23, 2023
by
shenpc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开关只控制隐藏iocn以及三个广播(亮屏,解锁等)不判断灭屏
parent
e16b47ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
OutHelp.java
app/src/main/java/com/zl/sdk/OutHelp.java
+14
-10
CheckHelper.java
app/src/main/java/com/zl/sdk/out/CheckHelper.java
+7
-1
No files found.
app/src/main/java/com/zl/sdk/OutHelp.java
View file @
98109633
...
...
@@ -34,6 +34,7 @@ import com.zl.sdk.out.ActionFrom;
import
com.zl.sdk.out.AppOutSP
;
import
com.zl.sdk.out.DialogShowStatusCallback
;
import
com.zl.sdk.out.OutAdManager
;
import
com.zl.sdk.util.AppOutUtils
;
import
com.zl.sdk.util.LogUtil
;
import
com.zl.sdk.util.log.LogToLogcat
;
...
...
@@ -127,14 +128,14 @@ public final class OutHelp implements KPListener {
//初始化触发条件
initTriggerConditions
();
if
(
DataManager
.
get
().
checkOutOpen
(
mContext
))
{
/*
if (DataManager.get().checkOutOpen(mContext)) {
//第一次加载广告
OutAdManager
.
get
().
checkNeedLoadAd
(
ActionFrom
.
ACTION_INIT_START
);
} else {
Map<String, String> map = new HashMap<>();
map.put("position", "init");
Statistics.getInstance().dotEvent("out_close", map);
}
}*/
OutAdManager
.
get
().
checkNeedLoadAd
(
ActionFrom
.
ACTION_INIT_START
);
}
private
void
initTriggerConditions
()
{
...
...
@@ -152,13 +153,13 @@ public final class OutHelp implements KPListener {
timer
.
schedule
(
new
TimerTask
()
{
@Override
public
void
run
()
{
if
(!
DataManager
.
get
().
checkOutOpen
(
mContext
))
{
/*
if (!DataManager.get().checkOutOpen(mContext)) {
Map<String, String> map = new HashMap<>();
map.put("position", "time");
Statistics.getInstance().dotEvent("out_close", map);
LogUtil.d(TAG + "外展未开启,不轮询检测");
return;
}
}
*/
Statistics
.
getInstance
().
dotEvent
(
"out_open"
);
LogUtil
.
d
(
TAG
,
"firstLx : "
+
firstLx
);
showOutAd
(
firstLx
);
...
...
@@ -240,15 +241,18 @@ public final class OutHelp implements KPListener {
* @param actionName 广播名称
*/
public
void
receiverAction
(
String
actionName
)
{
if
(!
DataManager
.
get
().
checkOutOpen
(
mContext
))
{
/*
if (!DataManager.get().checkOutOpen(mContext)) {
Map<String, String> map = new HashMap<>();
map.put("position", "rc_app");
Statistics.getInstance().dotEvent("out_close", map);
LogUtil.d(TAG + "外展未开启,不接收广播");
return;
}
}
*/
Statistics
.
getInstance
().
dotEvent
(
"out_open"
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"action"
,
actionName
);
map
.
put
(
"screen_state"
,
String
.
valueOf
(
AppOutUtils
.
isScreenOn
()));
Statistics
.
getInstance
().
dotEvent
(
"out_open"
,
map
);
switch
(
actionName
)
{
case
Intent
.
ACTION_USER_PRESENT
:
{
...
...
@@ -620,13 +624,13 @@ public final class OutHelp implements KPListener {
stateRecAction
(
action
,
"self"
);
LogUtil
.
d
(
TAG
+
"外展广播 :"
+
intent
.
getAction
());
if
(!
DataManager
.
get
().
checkOutOpen
(
context
))
{
/*
if (!DataManager.get().checkOutOpen(context)) {
LogUtil.d(TAG + "外展未开启,不接收广播");
Map<String, String> map = new HashMap<>();
map.put("position", "rc_dx");
Statistics.getInstance().dotEvent("out_close", map);
return;
}
}
*/
Statistics
.
getInstance
().
dotEvent
(
"out_open"
);
action
=
intent
.
getAction
();
...
...
app/src/main/java/com/zl/sdk/out/CheckHelper.java
View file @
98109633
...
...
@@ -43,7 +43,7 @@ public class CheckHelper {
// return false;
// }
//
if
(!
AppOutUtils
.
isScreenOn
())
{
if
(
noNeedCheckScreenOff
(
actionState
)
&&
!
AppOutUtils
.
isScreenOn
())
{
LogUtil
.
d
(
TAG
+
"(场景检查)手机未亮屏,不能展示"
);
EventUtils
.
staDialogFail
(
DialogFailReason
.
SCREEN_OFF
,
actionState
,
scenes
,
EventUtils
.
DIALOG_TYPE_AD
);
return
false
;
...
...
@@ -71,6 +71,12 @@ public class CheckHelper {
return
true
;
}
private
static
boolean
noNeedCheckScreenOff
(
int
actionState
)
{
return
actionState
!=
ActionFrom
.
ACTION_SCREEN_ON
.
getAction
()
&&
actionState
!=
ActionFrom
.
ACTION_USER_PRESENT
.
getAction
()
&&
actionState
!=
ActionFrom
.
ACTION_CLOSE_SYSTEM_DIALOGS
.
getAction
();
}
// public static boolean checkAdCanShowBySceneNoIcon(int actionState) {
//// boolean isInit = OutHelp.get().isInit();
//
...
...
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