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
10b72a82
Commit
10b72a82
authored
Jul 22, 2021
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://39.97.65.143:81/android/android_flowbox
parents
6a25763a
f7dbae37
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
118 additions
and
72 deletions
+118
-72
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-1
AppOutGroMoreCarrierExpressManager.kt
.../flowbox/ad/express/AppOutGroMoreCarrierExpressManager.kt
+2
-0
AppOutWifiAdManager.kt
...ain/java/com/mints/flowbox/ad/wifi/AppOutWifiAdManager.kt
+86
-0
NotificationService.java
...java/com/mints/flowbox/keepalive/NotificationService.java
+1
-1
OutAppRouter.kt
...src/main/java/com/mints/flowbox/keepalive/OutAppRouter.kt
+0
-3
AntiAuditManager.kt
...com/mints/flowbox/keepalive/appswitch/AntiAuditManager.kt
+3
-3
ScreenObserver.kt
...java/com/mints/flowbox/keepalive/screen/ScreenObserver.kt
+5
-3
WifiDataManager.kt
...in/java/com/mints/flowbox/manager/wifi/WifiDataManager.kt
+1
-1
BoostFastActivity.kt
...mints/flowbox/ui/activitys/keepalive/BoostFastActivity.kt
+2
-15
ScreenActivity.kt
...om/mints/flowbox/ui/activitys/keepalive/ScreenActivity.kt
+10
-8
TransparentActivity.kt
...nts/flowbox/ui/activitys/keepalive/TransparentActivity.kt
+4
-35
TriggerActivity.kt
...m/mints/flowbox/ui/activitys/keepalive/TriggerActivity.kt
+2
-1
activity_timing.xml
app/src/main/res/layout/activity_timing.xml
+1
-1
No files found.
app/src/main/AndroidManifest.xml
View file @
10b72a82
...
...
@@ -116,7 +116,7 @@
android:name=
".ui.activitys.MainActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize"
android:excludeFromRecents=
"true"
android:launchMode=
"single
Instance
"
android:launchMode=
"single
Task
"
android:theme=
"@style/AppTheme.NoneTranslucent"
/>
<activity
android:name=
".ui.activitys.SplashCsjADActivity"
/>
<activity
android:name=
".ui.activitys.WebActivity"
/>
...
...
app/src/main/java/com/mints/flowbox/ad/express/AppOutGroMoreCarrierExpressManager.kt
View file @
10b72a82
...
...
@@ -194,6 +194,8 @@ class AppOutGroMoreCarrierExpressManager : TTSettingConfigCallback {
mHandlerThread
=
null
mWorkHandler
?.
removeCallbacksAndMessages
(
null
)
mWorkHandler
=
null
frameLayout
?.
removeAllViews
()
frameLayout
=
null
TTMediationAdSdk
.
unregisterConfigCallback
(
this
)
}
...
...
app/src/main/java/com/mints/flowbox/ad/wifi/AppOutWifiAdManager.kt
0 → 100644
View file @
10b72a82
package
com.mints.flowbox.ad.wifi
import
android.app.Activity
import
android.content.Intent
import
com.mints.flowbox.MintsApplication
import
com.mints.flowbox.ad.full.FullGroManager
import
com.mints.flowbox.ui.activitys.keepalive.BoostFastActivity
import
com.mints.flowbox.ui.activitys.keepalive.TransparentActivity
import
com.mints.flowbox.utils.keepalive.IntentUtils
/**
* 应用外wifi广告管理
*
* 广告形式-Gromore的插屏、全屏
*/
class
AppOutWifiAdManager
private
constructor
()
{
companion
object
{
val
instance
:
AppOutWifiAdManager
by
lazy
(
mode
=
LazyThreadSafetyMode
.
SYNCHRONIZED
)
{
AppOutWifiAdManager
()
}
}
private
var
mType
=
0
private
var
wifiAdStatusListener
:
WifiAdStatusListener
?
=
object
:
WifiAdStatusListener
{
override
fun
adSuccess
()
{
val
intent
=
Intent
(
MintsApplication
.
getContext
(),
BoostFastActivity
::
class
.
java
)
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
or
Intent
.
FLAG_ACTIVITY_NO_ANIMATION
intent
.
putExtra
(
TransparentActivity
.
TIMING_TYPE
,
mType
)
IntentUtils
.
startActivity3
(
intent
)
}
override
fun
adFail
()
{
}
override
fun
adClose
()
{
}
}
// groMore全屏
private
var
fullGroManager
:
FullGroManager
?
=
null
/**
* 预加载广告,必须传入activity
*/
fun
loadWifiAd
(
activity
:
Activity
,
type
:
Int
)
{
mType
=
type
preLoadFullGroMore
(
activity
)
}
/**
* 全屏
*/
private
fun
preLoadFullGroMore
(
activity
:
Activity
)
{
if
(
fullGroManager
!=
null
)
{
fullGroManager
?.
onDestroy
()
}
fullGroManager
=
FullGroManager
()
fullGroManager
?.
loadFullAd
(
activity
,
false
)
fullGroManager
?.
setWifiAdStatusListener
(
wifiAdStatusListener
)
}
/**
* 展示广告
*/
fun
showInterstitial
(
_activity
:
Activity
)
{
if
(
fullGroManager
!=
null
)
{
fullGroManager
?.
showFullAd
(
_activity
,
wifiAdStatusListener
)
}
else
{
this
.
wifiAdStatusListener
?.
adFail
()
}
}
fun
onDestroy
()
{
fullGroManager
?.
onDestroy
()
fullGroManager
?.
setWifiAdStatusListener
(
null
)
fullGroManager
=
null
}
fun
setWifiAdStatusListener
(
listener
:
WifiAdStatusListener
?)
{
this
.
wifiAdStatusListener
=
listener
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/keepalive/NotificationService.java
View file @
10b72a82
...
...
@@ -174,7 +174,7 @@ public class NotificationService extends Service {
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
O
)
{
builder2
.
setPriority
(
Notification
.
PRIORITY_MAX
);
}
notification
=
builder2
.
setSmallIcon
(
R
.
drawable
.
ic_launcher_main
,
0
)
notification
=
builder2
.
setSmallIcon
(
R
.
mipmap
.
ic_wifi_notice
,
0
)
.
setOngoing
(
true
)
.
setContent
(
remoteViews
)
.
setGroup
(
NotificationUtil
.
Channel_Id_Core
)
...
...
app/src/main/java/com/mints/flowbox/keepalive/OutAppRouter.kt
View file @
10b72a82
...
...
@@ -52,9 +52,6 @@ object OutAppRouter {
* 展示锁屏页面
*/
fun
showScreenActivity
()
{
// 预加载信息流
ExpressManager
.
loadAppOutExpress
()
val
intent
=
Intent
(
MintsApplication
.
getContext
(),
ScreenActivity
::
class
.
java
)
if
(!
PhoneBrandUtils
.
isOppo
())
{
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_BROUGHT_TO_FRONT
...
...
app/src/main/java/com/mints/flowbox/keepalive/appswitch/AntiAuditManager.kt
View file @
10b72a82
...
...
@@ -127,13 +127,13 @@ class AntiAuditManager private constructor() {
for
(
i
in
0
until
time
.
size
)
{
when
{
time
[
i
]
>
now
-
(
overTime
+
ONE_DAY
*
2
)
->
{
thre
edayItems
.
add
(
installTime
[
time
[
i
]])
on
edayItems
.
add
(
installTime
[
time
[
i
]])
}
time
[
i
]
>
now
-
(
overTime
+
ONE_DAY
)
->
{
twodayItems
.
add
(
installTime
[
time
[
i
]])
}
time
[
i
]
>
now
-
overTime
->
{
on
edayItems
.
add
(
installTime
[
time
[
i
]])
thre
edayItems
.
add
(
installTime
[
time
[
i
]])
}
}
}
...
...
@@ -144,6 +144,6 @@ class AntiAuditManager private constructor() {
LogUtil
.
d
(
TAG
,
"TwoDay -> $twodayItems"
)
LogUtil
.
d
(
TAG
,
"OneDay -> $onedayItems"
)
return
onedayItems
.
size
>=
N
&&
twodayItems
.
size
>=
N
&&
threedayItems
.
size
>=
N
return
onedayItems
.
size
>=
N
||
twodayItems
.
size
>=
N
||
threedayItems
.
size
>=
N
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/keepalive/screen/ScreenObserver.kt
View file @
10b72a82
...
...
@@ -166,11 +166,13 @@ class ScreenLockerObserver(private val context: Context) {
)
when
(
intent
?.
action
)
{
ScreenMonitor
.
MY_SCREEN_OFF
,
Intent
.
ACTION_SCREEN_OFF
,
ACTION_SCREENCHECKER_OFF
,
Intent
.
ACTION_POWER_CONNECTED
,
Intent
.
ACTION_POWER_DISCONNECTED
->
ACTION_SCREENCHECKER_OFF
,
Intent
.
ACTION_POWER_CONNECTED
// , Intent.ACTION_POWER_DISCONNECTED
->
onHandleScreenOff
(
context
,
intent
?
.
action
==
Intent
.
ACTION_POWER_DISCONNECTED
intent
.
action
==
Intent
.
ACTION_POWER_DISCONNECTED
)
ScreenMonitor
.
MY_SCREEN_ON
,
Intent
.
ACTION_SCREEN_ON
,
ACTION_SCREENCHECKER_ON
->
onHandleScreenOn
(
context
)
...
...
app/src/main/java/com/mints/flowbox/manager/wifi/WifiDataManager.kt
View file @
10b72a82
...
...
@@ -440,7 +440,7 @@ object WifiDataManager {
private
fun
isBlackOrClose
():
Boolean
{
val
isBlack
=
sp
.
getBoolean
(
AntiAuditManager
.
APP_OUT_BLACK
,
false
)
return
!
(!
APP_OUT_MAIN_SWITCH
||
isBlack
)
return
(!
APP_OUT_MAIN_SWITCH
||
isBlack
)
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/BoostFastActivity.kt
View file @
10b72a82
...
...
@@ -11,8 +11,7 @@ import android.os.Looper
import
android.view.View
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.ad.wifi.WifiAdManager
import
com.mints.flowbox.ad.wifi.WifiAdStatusListener
import
com.mints.flowbox.ad.wifi.AppOutWifiAdManager
import
com.mints.flowbox.ui.activitys.base.BaseActivity
import
kotlinx.android.synthetic.main.activity_boost_fast.*
import
kotlinx.android.synthetic.main.activity_boost_fast.container
...
...
@@ -82,19 +81,7 @@ class BoostFastActivity : BaseActivity() {
Handler
(
Looper
.
getMainLooper
()).
postDelayed
(
{
WifiAdManager
.
instance
.
setWifiAdStatusListener
(
object
:
WifiAdStatusListener
{
override
fun
adSuccess
()
{
}
override
fun
adFail
()
{
}
override
fun
adClose
()
{
}
})
WifiAdManager
.
instance
.
showInterstitial
(
this
@BoostFastActivity
)
AppOutWifiAdManager
.
instance
.
showInterstitial
(
this
@BoostFastActivity
)
},
2500
)
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/ScreenActivity.kt
View file @
10b72a82
...
...
@@ -32,6 +32,8 @@ class ScreenActivity : OutAppActivity(), View.OnClickListener {
// val thread = TimeThread(tvDate, tvTime)
// thread.start()
initExpress
()
tvBoost
.
setOnClickListener
(
this
)
tvClean
.
setOnClickListener
(
this
)
tvSaveBattery
.
setOnClickListener
(
this
)
...
...
@@ -40,12 +42,11 @@ class ScreenActivity : OutAppActivity(), View.OnClickListener {
override
fun
onResume
()
{
super
.
onResume
()
resetTime
()
initExpress
()
}
override
fun
onPause
()
{
super
.
onPause
()
ExpressManager
.
loadAppOutExpress
()
//
ExpressManager.loadAppOutExpress()
}
private
fun
resetTime
()
{
...
...
@@ -95,12 +96,13 @@ class ScreenActivity : OutAppActivity(), View.OnClickListener {
*/
private
fun
initExpress
()
{
try
{
if
(
fl_ad
!=
null
&&
ExpressManager
.
getAppOutExpressFrameLayout
()
!=
null
)
{
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getAppOutExpressFrameLayout
())
}
else
{
ExpressManager
.
loadNoAppOutExpress
(
fl_ad
)
}
// if (fl_ad != null && ExpressManager.getAppOutExpressFrameLayout() != null) {
// fl_ad.removeAllViews()
// fl_ad.addView(ExpressManager.getAppOutExpressFrameLayout())
// } else {
fl_ad
.
removeAllViews
()
ExpressManager
.
loadNoAppOutExpress
(
fl_ad
)
// }
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/TransparentActivity.kt
View file @
10b72a82
package
com.mints.flowbox.ui.activitys.keepalive
import
android.content.Intent
import
android.os.Bundle
import
android.view.Gravity
import
com.mints.flowbox.MintsApplication
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.ad.wifi.WifiAdManager
import
com.mints.flowbox.ad.wifi.WifiAdStatusListener
import
com.mints.flowbox.ad.wifi.AppOutWifiAdManager
import
com.mints.flowbox.ui.activitys.base.BaseActivity
/**
...
...
@@ -36,6 +32,7 @@ class TransparentActivity : BaseActivity() {
}
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_trans
override
fun
initViewsAndEvents
()
{
...
...
@@ -50,38 +47,10 @@ class TransparentActivity : BaseActivity() {
* 加载广告
*/
private
fun
loadAd
()
{
WifiAdManager
.
instance
.
setWifiAdStatusListener
(
object
:
WifiAdStatusListener
{
override
fun
adSuccess
()
{
val
intent
=
Intent
(
MintsApplication
.
getContext
(),
BoostFastActivity
::
class
.
java
)
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
or
Intent
.
FLAG_ACTIVITY_NO_ANIMATION
intent
.
putExtra
(
TIMING_TYPE
,
mType
)
startActivity
(
intent
)
finish
()
}
override
fun
adFail
()
{
WifiAdManager
.
instance
.
onDestroy
()
finish
()
}
override
fun
adClose
()
{
}
})
WifiAdManager
.
instance
.
loadWifiAd
(
this
,
false
)
AppOutWifiAdManager
.
instance
.
loadWifiAd
(
this
,
mType
)
// 预加载信息流
ExpressManager
.
loadAppOutExpress
()
finish
()
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
val
window
=
window
window
.
setGravity
(
Gravity
.
START
or
Gravity
.
TOP
)
val
params
=
window
.
attributes
params
.
x
=
0
params
.
y
=
0
params
.
height
=
1
params
.
width
=
1
window
.
attributes
=
params
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/TriggerActivity.kt
View file @
10b72a82
...
...
@@ -77,6 +77,7 @@ class TriggerActivity : BaseActivity() {
}
initView
()
initExpress
()
}
private
fun
initView
()
{
...
...
@@ -235,6 +236,7 @@ class TriggerActivity : BaseActivity() {
fl_ad
.
removeAllViews
()
fl_ad
.
addView
(
ExpressManager
.
getAppOutExpressFrameLayout
())
}
else
{
fl_ad
.
removeAllViews
()
ExpressManager
.
loadNoAppOutExpress
(
fl_ad
)
}
}
catch
(
e
:
Exception
)
{
...
...
@@ -251,7 +253,6 @@ class TriggerActivity : BaseActivity() {
override
fun
onResume
()
{
super
.
onResume
()
initExpress
()
btnClean
.
postDelayed
({
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
500
).
repeat
(
10
).
playOn
(
btnClean
)
...
...
app/src/main/res/layout/activity_timing.xml
View file @
10b72a82
...
...
@@ -123,7 +123,7 @@
android:id=
"@+id/fl_ad"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center
_horizontal
"
android:layout_gravity=
"center"
android:layout_margin=
"15dp"
android:background=
"@drawable/shape_gold_card"
android:elevation=
"2dip"
...
...
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