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
4c7c4645
Commit
4c7c4645
authored
Jul 21, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码名称
parent
fc1acc15
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
52 additions
and
235 deletions
+52
-235
MintsApplication.java
app/src/main/java/com/mints/flowbox/MintsApplication.java
+1
-1
ScreenConstant.kt
...java/com/mints/flowbox/keepalive/screen/ScreenConstant.kt
+2
-14
ScreenContext.kt
.../java/com/mints/flowbox/keepalive/screen/ScreenContext.kt
+1
-24
ScreenEvents.kt
...n/java/com/mints/flowbox/keepalive/screen/ScreenEvents.kt
+2
-5
ScreenObserver.kt
...java/com/mints/flowbox/keepalive/screen/ScreenObserver.kt
+26
-135
ScreenSettings.kt
...java/com/mints/flowbox/keepalive/screen/ScreenSettings.kt
+17
-0
ScreenLockerRemoteKeys.kt
...m/mints/flowbox/screen/settings/ScreenLockerRemoteKeys.kt
+0
-10
ScreenLockerSettings.kt
...com/mints/flowbox/screen/settings/ScreenLockerSettings.kt
+0
-43
AboutusActivity.kt
...in/java/com/mints/flowbox/ui/activitys/AboutusActivity.kt
+1
-1
OutAppActivity.kt
...ava/com/mints/flowbox/ui/activitys/base/OutAppActivity.kt
+2
-2
No files found.
app/src/main/java/com/mints/flowbox/MintsApplication.java
View file @
4c7c4645
...
@@ -23,7 +23,7 @@ import com.mints.flowbox.keepalive.NotificationService;
...
@@ -23,7 +23,7 @@ import com.mints.flowbox.keepalive.NotificationService;
import
com.mints.flowbox.keepalive.NotificationUtil
;
import
com.mints.flowbox.keepalive.NotificationUtil
;
import
com.mints.flowbox.keepalive.OutAppRouter
;
import
com.mints.flowbox.keepalive.OutAppRouter
;
import
com.mints.flowbox.keepalive.PackageWatch
;
import
com.mints.flowbox.keepalive.PackageWatch
;
import
com.mints.flowbox.screen.ScreenLockerObserver
;
import
com.mints.flowbox.
keepalive.
screen.ScreenLockerObserver
;
import
com.mints.flowbox.keepalive.ServiceUtil
;
import
com.mints.flowbox.keepalive.ServiceUtil
;
import
com.mints.flowbox.keepalive.WifiStateWatch
;
import
com.mints.flowbox.keepalive.WifiStateWatch
;
import
com.mints.flowbox.manager.CsjGroMoreManager
;
import
com.mints.flowbox.manager.CsjGroMoreManager
;
...
...
app/src/main/java/com/mints/flowbox/
screen/ScreenLockerConstants
.kt
→
app/src/main/java/com/mints/flowbox/
keepalive/screen/ScreenConstant
.kt
View file @
4c7c4645
package
com.mints.flowbox.screen
package
com.mints.flowbox.
keepalive.
screen
object
Screen
LockerConstants
{
object
Screen
Constant
{
const
val
INTENT_KEY_FLAGS
=
"kdd1"
const
val
INTENT_KEY_FLAGS
=
"kdd1"
const
val
INTENT_KEY_MARK
=
"kdd2"
const
val
INTENT_KEY_MARK
=
"kdd2"
const
val
INTENT_KEY_REASON
=
"kdd3"
const
val
INTENT_KEY_REASON
=
"kdd3"
const
val
PAGE_SCREEN_LOCKER
=
"pg_screenlocker"
const
val
PAGE_SCREEN_LOCKER_MORE_THAN_2_SEC
=
"pg_screenlocker2"
const
val
EVENT_SCREEN_LOCKER_RECEIVE
=
"ev_dd_rcv"
const
val
EVENT_SCREEN_LOCKER_RECEIVE
=
"ev_dd_rcv"
const
val
EVENT_SCREEN_LOCKER_RECEIVE3
=
"ev_dd_rcv3"
const
val
EVENT_SCREEN_LOCKER_RECEIVE3
=
"ev_dd_rcv3"
const
val
EVENT_SCREEN_LOCKER_SCREEN_OFF
=
"ev_dd_scroff"
const
val
EVENT_SCREEN_LOCKER_SCREEN_OFF
=
"ev_dd_scroff"
const
val
EVENT_SCREEN_LOCKER_POWER_CONNECT
=
"ev_dd_pwrcon"
const
val
EVENT_SCREEN_LOCKER_SCREEN_ON
=
"ev_dd_scron"
const
val
EVENT_SCREEN_LOCKER_SCREEN_ON
=
"ev_dd_scron"
const
val
EVENT_SCREEN_LOCKER_USER_PRESENT
=
"ev_dd_usrpre"
const
val
EVENT_SCREEN_LOCKER_USER_PRESENT
=
"ev_dd_usrpre"
const
val
EVENT_SCREEN_LOCKER_START_PREINVOKE
=
"ev_dd_actst_preinv"
const
val
EVENT_SCREEN_LOCKER_START_PREINVOKE
=
"ev_dd_actst_preinv"
const
val
EVENT_SCREEN_LOCKER_START_INVOKED
=
"ev_dd_actst_inv"
const
val
EVENT_SCREEN_LOCKER_START_INVOKED
=
"ev_dd_actst_inv"
const
val
EVENT_SCREEN_LOCKER_START_SUCCEED
=
"ev_dd_actst_sec"
const
val
EVENT_SCREEN_LOCKER_START_RESUMED
=
"ev_dd_actst_rsm"
const
val
EVENT_SCREEN_LOCKER_DESTROYED
=
"ev_dd_actdst"
const
val
EVENT_SCREEN_LOCKER_INIT
=
"ev_dd_init"
const
val
EVENT_SCREEN_LOCKER_INIT
=
"ev_dd_init"
const
val
EVENT_SCREEN_LOCKER_INIT_2
=
"ev_dd_init_2"
const
val
EVENT_SCREEN_LOCKER_INIT_2
=
"ev_dd_init_2"
const
val
SHOW_REASON_UNKNWON
=
0
const
val
SHOW_REASON_SCREEN_OFF
=
1
const
val
SHOW_REASON_SCREEN_OFF
=
1
const
val
SHOW_REASON_RESTART_SELF
=
2
const
val
SHOW_REASON_SCREEN_ON
=
3
const
val
SHOW_REASON_SCREEN_ON
=
3
const
val
SHOW_REASON_USER_PRESENT
=
4
const
val
SHOW_REASON_USER_PRESENT
=
4
const
val
SHOW_REASON_CALL_IDLE
=
5
const
val
SHOW_REASON_CHARGE
=
6
const
val
SHOW_REASON_DIRECT_CALL
=
7
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/
screen/ScreenLocker
Context.kt
→
app/src/main/java/com/mints/flowbox/
keepalive/screen/Screen
Context.kt
View file @
4c7c4645
package
com.mints.flowbox.screen
package
com.mints.flowbox.
keepalive.
screen
import
android.app.Activity
import
android.app.Activity
import
java.lang.ref.WeakReference
import
java.lang.ref.WeakReference
...
@@ -14,29 +14,6 @@ object ScreenLockerContext {
...
@@ -14,29 +14,6 @@ object ScreenLockerContext {
internal
var
screenOffCalled
=
false
internal
var
screenOffCalled
=
false
// fun createBottomAd(@Suppress("UNUSED_PARAMETER") context: Context): AdModule {
// if (context !is Activity) {
// throw IllegalArgumentException()
// }
//
// val hasSystemLockScreen = ScreenLockerUtils.hasSystemLockScreen(context)
// if (BuildConfig.DEBUG) Log.d(TAG, "bottomAd() called with: hasSystemLockScreen = $hasSystemLockScreen, context = [$context]")
//
// val adModule = AdUtils.initAdModuleArray(
// context,
// ScreenLockerAdConfig.AD_NAME_BOTTOM_AD,
// R.array.dd_ad_unit__bottom_ad/*,
// supportDeepLink = !hasSystemLockScreen
// */
// )
//
// adModule.updateConfig {
// it.nativeAdTemplate = R.layout.dd_layout_ad_template
// }
//
// return adModule
// }
private
var
activityRef
:
WeakReference
<
Activity
>?
=
null
private
var
activityRef
:
WeakReference
<
Activity
>?
=
null
fun
changeOwnership
(
activity
:
Activity
)
{
fun
changeOwnership
(
activity
:
Activity
)
{
...
...
app/src/main/java/com/mints/flowbox/
screen/ScreenLocker
Events.kt
→
app/src/main/java/com/mints/flowbox/
keepalive/screen/Screen
Events.kt
View file @
4c7c4645
package
com.mints.flowbox.screen
package
com.mints.flowbox.
keepalive.
screen
//import com.squareup.module.feature.FeatureConstants
internal
object
ScreenEvents
{
internal
object
ScreenLockerEvents
{
private
const
val
BASE
=
867
_0000
private
const
val
BASE
=
867
_0000
const
val
USER_UNLOCKED
=
BASE
+
1
const
val
USER_UNLOCKED
=
BASE
+
1
// const val SCREENLOCKER_UNLOCKED_BY_USER = FeatureConstants.CUSTOM_UNLOCKED
const
val
SCREENLOCKER_UNLOCKED_BY_USER
=
0
x00000232
const
val
SCREENLOCKER_UNLOCKED_BY_USER
=
0
x00000232
const
val
CALL_INCOMING
=
BASE
+
3
const
val
CALL_INCOMING
=
BASE
+
3
const
val
UNLOCK_REQUESTED
=
BASE
+
4
const
val
UNLOCK_REQUESTED
=
BASE
+
4
...
...
app/src/main/java/com/mints/flowbox/
screen/ScreenLocker
Observer.kt
→
app/src/main/java/com/mints/flowbox/
keepalive/screen/Screen
Observer.kt
View file @
4c7c4645
This diff is collapsed.
Click to expand it.
app/src/main/java/com/mints/flowbox/keepalive/screen/ScreenSettings.kt
0 → 100644
View file @
4c7c4645
package
com.mints.flowbox.keepalive.screen
import
net.settings.AppSettings
import
net.settings.ISettings
object
ScreenSettings
{
const
val
KEY_ENABLED
=
"dd_ena"
const
val
ENABLED_DEFAULT
=
ISettings
.
BOOLEAN_TRUE
fun
isEnabledFlag
():
Boolean
{
return
AppSettings
.
global
.
readInt
(
KEY_ENABLED
,
ENABLED_DEFAULT
)
==
ISettings
.
BOOLEAN_TRUE
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/screen/settings/ScreenLockerRemoteKeys.kt
deleted
100644 → 0
View file @
fc1acc15
package
com.mints.flowbox.screen.settings
import
net.settings.IRemoteKeys
object
ScreenLockerRemoteKeys
:
IRemoteKeys
{
const
val
KEY_DISMISS_WITH_SYSTEM_KEYGUARD
=
"ext_dd_dwsk"
const
val
KEY_AD_EXPIRE_INTERVAL
=
"ext_dd_aexpint"
const
val
KEY_AD_POPULATE_INTERVAL
=
"ext_dd_alint"
const
val
KEY_RED_PACKET_POPUP_INTERVAL
=
"ext_dd_rp_ppint"
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/screen/settings/ScreenLockerSettings.kt
deleted
100644 → 0
View file @
fc1acc15
package
com.mints.flowbox.screen.settings
import
net.cloud.RemoteProxy
import
net.common.minutesMillis
import
net.settings.AppSettings
import
net.settings.ISettings
object
ScreenLockerSettings
{
const
val
KEY_ENABLED
=
"dd_ena"
const
val
KEY_RED_PACKET_POPUP_TIME
=
"dd_rp_pptime"
const
val
ENABLED_DEFAULT
=
ISettings
.
BOOLEAN_TRUE
fun
isEnabled
():
Boolean
{
return
AppSettings
.
global
.
readInt
(
KEY_ENABLED
,
ENABLED_DEFAULT
)
==
ISettings
.
BOOLEAN_TRUE
}
fun
isDismissWithSystemKeyguard
():
Boolean
{
return
RemoteProxy
.
readInt
(
ScreenLockerRemoteKeys
.
KEY_DISMISS_WITH_SYSTEM_KEYGUARD
,
ISettings
.
BOOLEAN_FALSE
)
==
ISettings
.
BOOLEAN_TRUE
}
/**
* 如果广告显示超过一定时长,无论如何我都换一个
*/
fun
getAdExpireInterval
():
Long
{
return
RemoteProxy
.
readLong
(
ScreenLockerRemoteKeys
.
KEY_AD_EXPIRE_INTERVAL
,
45
.
minutesMillis
())
}
fun
getAdPopulateInterval
():
Long
{
return
RemoteProxy
.
readLong
(
ScreenLockerRemoteKeys
.
KEY_AD_POPULATE_INTERVAL
,
1
.
minutesMillis
())
}
fun
getRedPacketPopupInterval
():
Long
{
return
RemoteProxy
.
readLong
(
ScreenLockerRemoteKeys
.
KEY_RED_PACKET_POPUP_INTERVAL
,
30
.
minutesMillis
())
}
var
lastRedPacketPopupPopupTime
:
Long
get
()
=
AppSettings
.
app
.
readLong
(
KEY_RED_PACKET_POPUP_TIME
,
0L
)
set
(
value
)
=
AppSettings
.
app
.
writeLong
(
KEY_RED_PACKET_POPUP_TIME
,
value
)
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/activitys/AboutusActivity.kt
View file @
4c7c4645
...
@@ -35,7 +35,7 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
...
@@ -35,7 +35,7 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
showLoading
(
"加载中..."
)
//
showLoading("加载中...")
ivAboutasIcon
.
setOnLongClickListener
{
ivAboutasIcon
.
setOnLongClickListener
{
ToastUtil
.
showLong
(
ToastUtil
.
showLong
(
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/base/OutAppActivity.kt
View file @
4c7c4645
...
@@ -13,8 +13,8 @@ import android.view.WindowManager
...
@@ -13,8 +13,8 @@ import android.view.WindowManager
import
androidx.core.app.ActivityCompat
import
androidx.core.app.ActivityCompat
import
com.main.ScreenMonitor
import
com.main.ScreenMonitor
import
com.mints.flowbox.R
import
com.mints.flowbox.R
import
com.mints.flowbox.screen.ScreenLockerContext
import
com.mints.flowbox.
keepalive.
screen.ScreenLockerContext
import
com.mints.flowbox.screen.ScreenLockerObserver
import
com.mints.flowbox.
keepalive.
screen.ScreenLockerObserver
import
com.mints.flowbox.utils.keepalive.ScreenLockerUtils
import
com.mints.flowbox.utils.keepalive.ScreenLockerUtils
import
com.mints.library.base.BaseSwipeBackCompatActivity
import
com.mints.library.base.BaseSwipeBackCompatActivity
import
com.mints.library.net.netstatus.NetUtils
import
com.mints.library.net.netstatus.NetUtils
...
...
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