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
1328a494
Commit
1328a494
authored
Jan 02, 2024
by
xujialang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除:播放广告时,如果5秒内有播放过,则不再播放
parent
77347515
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
15 deletions
+0
-15
TopOnAdLoadManager.java
app/src/main/java/com/zl/sdk/ad/TopOnAdLoadManager.java
+0
-15
No files found.
app/src/main/java/com/zl/sdk/ad/TopOnAdLoadManager.java
View file @
1328a494
...
...
@@ -49,8 +49,6 @@ public final class TopOnAdLoadManager {
private
Handler
cleanActivityHandler
=
new
Handler
(
Looper
.
getMainLooper
());
private
long
showTimes
=
0L
;
private
TopOnAdInterstitialCallBack
adInterstitialCallBack
=
new
TopOnAdInterstitialCallBack
()
{
@Override
...
...
@@ -73,8 +71,6 @@ public final class TopOnAdLoadManager {
LogUtil
.
d
(
TAG
,
"AdInterstitialCallBack onAdDisplayed adUnitId ="
+
adUnitId
);
flagLoadMap
.
put
(
adUnitId
,
true
);
showTimes
=
System
.
currentTimeMillis
();
callInterstitialAdShow
();
countAdShowTimes
(
adData
);
stateAfterShow
(
adData
);
...
...
@@ -150,10 +146,6 @@ public final class TopOnAdLoadManager {
}
};
public
boolean
canShowAd
()
{
return
System
.
currentTimeMillis
()
-
showTimes
>=
5
*
1000L
;
}
private
void
stateAfterShow
(
OutAdData
.
NormalAdData
adData
)
{
try
{
boolean
isReady
=
topOnInterstitialAdLoad
.
isReady
(
adData
.
cpAdslot
);
...
...
@@ -256,13 +248,6 @@ public final class TopOnAdLoadManager {
private
AdBean
showAdBean
=
null
;
public
void
showInterstitialAd
(
Activity
activity
,
OutAdData
.
NormalAdData
normalAdData
,
String
adScenes
)
{
if
(!
canShowAd
())
{
LogUtil
.
d
(
TAG
,
"showInterstitialAd 广告播放过于频繁,不能展示"
);
// callInterstitialNotAd(AdErrorMessage.AD_SHOWING);
return
;
}
if
(
null
==
normalAdData
||
TextUtils
.
isEmpty
(
normalAdData
.
cpAdslot
))
{
LogUtil
.
d
(
TAG
,
"showInterstitialAd data or adId empty"
);
callInterstitialNotAd
(
AdErrorMessage
.
AD_DATA_IS_NULL_OR_NOT_ADUNITID
);
...
...
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