Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_flowbox
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_flowbox
Commits
1956304d
Commit
1956304d
authored
Jul 07, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://39.97.65.143:81/android/android_flowbox
parents
a3de034a
99d1a81d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
VideoAdingManager.java
...in/java/com/mints/flowbox/ad/video/VideoAdingManager.java
+4
-1
AwardActivity.kt
...main/java/com/mints/flowbox/ui/activitys/AwardActivity.kt
+11
-2
ForegroundOrBackground.java
.../java/com/mints/flowbox/utils/ForegroundOrBackground.java
+4
-1
No files found.
app/src/main/java/com/mints/flowbox/ad/video/VideoAdingManager.java
View file @
1956304d
...
...
@@ -85,6 +85,7 @@ public class VideoAdingManager {
// APP下载回调广播
private
BroadcastReceiver
mReceiverBroadcastReceiver
=
null
;
private
boolean
receiverFlag
=
false
;
// 广播是否注册
private
void
registerBroad
()
{
// 是否是超级翻倍标识 false-返回
...
...
@@ -121,6 +122,8 @@ public class VideoAdingManager {
IntentFilter
intentFilter
=
new
IntentFilter
();
intentFilter
.
addAction
(
AppInstallService
.
APP_INSTALL_ACTION
);
activity
.
registerReceiver
(
this
.
mReceiverBroadcastReceiver
,
intentFilter
);
receiverFlag
=
true
;
}
/**
...
...
@@ -429,7 +432,7 @@ public class VideoAdingManager {
csjGroMoreVideoAdManager
=
null
;
}
if
(
mReceiverBroadcastReceiver
!=
null
)
{
if
(
mReceiverBroadcastReceiver
!=
null
&&
receiverFlag
)
{
activity
.
stopService
(
new
Intent
(
activity
,
AppInstallService
.
class
));
activity
.
unregisterReceiver
(
mReceiverBroadcastReceiver
);
mReceiverBroadcastReceiver
=
null
;
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/AwardActivity.kt
View file @
1956304d
...
...
@@ -58,6 +58,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
private
var
superTaskStatus
=
0
private
var
mCurrentPkg
:
String
?
=
null
private
var
mReceiverBroadcastReceiver
:
BroadcastReceiver
?
=
null
private
var
receiverFlag
=
false
// 广播是否注册
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_award
...
...
@@ -429,7 +430,11 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
videoAdingManager
.
setVideoAdingListener
(
null
)
videoAdingManager
.
onDestroy
()
if
(
mReceiverBroadcastReceiver
!=
null
)
{
if
(
ivRootAwardAd
!=
null
){
Glide
.
with
(
applicationContext
).
clear
(
ivRootAwardAd
)
}
if
(
mReceiverBroadcastReceiver
!=
null
&&
receiverFlag
)
{
mContext
.
stopService
(
Intent
(
context
,
AppInstallService
::
class
.
java
))
mContext
.
unregisterReceiver
(
mReceiverBroadcastReceiver
)
mReceiverBroadcastReceiver
=
null
...
...
@@ -704,7 +709,9 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
if
(
flAwardAd
.
height
>
0
&&
flAwardAd
.
width
>
0
)
{
ivRootAwardAd
.
visibility
=
View
.
VISIBLE
Glide
.
with
(
context
).
asGif
().
load
(
R
.
drawable
.
bg_award_effect
).
into
(
ivRootAwardAd
)
if
(!
AwardActivity
@this
.
isFinishing
){
Glide
.
with
(
applicationContext
).
asGif
().
load
(
R
.
drawable
.
bg_award_effect
).
into
(
ivRootAwardAd
)
}
}
// }
// }
...
...
@@ -824,5 +831,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
val
intentFilter
=
IntentFilter
()
intentFilter
.
addAction
(
AppInstallService
.
APP_INSTALL_ACTION
)
mContext
.
registerReceiver
(
this
.
mReceiverBroadcastReceiver
,
intentFilter
)
receiverFlag
=
true
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/utils/ForegroundOrBackground.java
View file @
1956304d
...
...
@@ -24,6 +24,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
private
volatile
boolean
isYlhSplash
=
false
;
private
Intent
ylhIntent
;
private
Intent
groIntent
;
private
static
boolean
isForeground
=
false
;
//获取当前最上层的activity
private
static
WeakReference
<
Activity
>
app_activity
;
...
...
@@ -37,7 +38,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
* @return true-前台
*/
public
static
boolean
isForeground
()
{
return
count
==
0
?
true
:
false
;
return
isForeground
;
}
public
static
ForegroundOrBackground
init
(
Application
application
)
{
...
...
@@ -111,6 +112,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
// }
// activity.startActivity(groIntent);
// }
isForeground
=
true
;
}
count
++;
}
...
...
@@ -120,6 +122,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
count
--;
if
(
count
==
0
)
{
isForeground
=
false
;
leaveTime
=
System
.
currentTimeMillis
();
TrackManager
.
getInstance
().
offline
();
}
...
...
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