Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold
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
android
android_highgold
Commits
852d2f43
Commit
852d2f43
authored
May 22, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug优化
parent
36ad682f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
58 deletions
+81
-58
ShanhuVedioAdManager.java
...main/java/com/mints/highgold/ad/ShanhuVedioAdManager.java
+81
-58
No files found.
highgold/app/src/main/java/com/mints/highgold/ad/ShanhuVedioAdManager.java
View file @
852d2f43
...
...
@@ -119,9 +119,16 @@ public class ShanhuVedioAdManager implements ShanhuVedioAdManagerView {
taskTypes
.
add
(
taskType
);
int
ret
=
mCoinManager
.
GetTasks
(
coinRequestInfo
,
taskTypes
,
coin
,
coinTaskTypes
);
if
(
ret
!=
ErrorCode
.
EC_SUCCESS
)
{
if
(
activity
!=
null
)
{
activity
.
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
shanhuVedioAdListener
!=
null
)
{
shanhuVedioAdListener
.
shanhuVedioAdFail
();
}
}
});
}
return
;
}
...
...
@@ -157,18 +164,33 @@ public class ShanhuVedioAdManager implements ShanhuVedioAdManagerView {
}
}
catch
(
Throwable
t
)
{
t
.
printStackTrace
();
if
(
activity
!=
null
)
{
activity
.
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
shanhuVedioAdListener
!=
null
)
{
LogUtil
.
d
(
TAG
,
"shanhu Throwable"
);
shanhuVedioAdListener
.
shanhuVedioAdFail
();
}
}
});
}
}
if
(!
showAdFlag
)
{
if
(
activity
!=
null
)
{
activity
.
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
shanhuVedioAdListener
!=
null
)
{
LogUtil
.
d
(
TAG
,
"no Ad show"
);
shanhuVedioAdListener
.
shanhuVedioAdFail
();
}
}
});
}
}
}
}.
start
();
}
...
...
@@ -191,24 +213,22 @@ public class ShanhuVedioAdManager implements ShanhuVedioAdManagerView {
}
private
List
<
AdMetaInfo
>
gotRewardVedio
(
int
adId
,
List
<
Integer
>
styleId
)
{
if
(
activity
!=
null
)
{
activity
.
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
mRewardVedio
=
new
RewardVideo
();
List
<
AdID
>
list
=
new
ArrayList
<>();
list
.
add
(
new
AdID
(
adId
,
968
,
300
));
if
(
activity
!=
null
)
{
mRewardVedio
.
load
(
new
RewardVideo
.
RVListener
()
{
@Override
public
void
loaded
()
{
activity
.
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
mRewardVedio
!=
null
)
{
mRewardVedio
.
showAD
();
}
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SHANHU
,
Constant
.
EVENT_TYPE_ZERO
,
""
,
""
);
}
});
LogUtil
.
d
(
TAG
,
"gotRewardVedio loaded"
);
}
...
...
@@ -261,6 +281,9 @@ public class ShanhuVedioAdManager implements ShanhuVedioAdManagerView {
}
}
},
activity
,
new
AdID
(
adId
,
968
,
300
));
}
});
}
return
null
;
...
...
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