Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
Easy Cleaner Junk
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Easy Cleaner Junk
Commits
dce482f3
Commit
dce482f3
authored
Jul 26, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
946a6221
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
MyApplication.kt
.../main/java/com/test/easy/easycleanerjunk/MyApplication.kt
+9
-2
No files found.
app/src/main/java/com/test/easy/easycleanerjunk/MyApplication.kt
View file @
dce482f3
...
...
@@ -15,6 +15,7 @@ import com.test.easy.easycleanerjunk.helps.BaseApplication
import
com.test.easy.easycleanerjunk.helps.BlackUtils
import
com.test.easy.easycleanerjunk.helps.ConfigHelper
import
com.test.easy.easycleanerjunk.helps.InstallHelps
import
com.test.easy.easycleanerjunk.helps.LogEx
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import
com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import
com.test.easy.easycleanerjunk.utils.ActivityManagerUtils
...
...
@@ -99,6 +100,7 @@ class MyApplication : BaseApplication() {
registerActivityLifecycleCallbacks
(
object
:
ActivityLifecycleCallbacks
{
private
var
count
=
0
override
fun
onActivityCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
{
LogEx
.
logDebug
(
"glc"
,
"onActivityCreated:"
+
activity
.
localClassName
)
ActivityManagerUtils
.
getInstance
().
addActivity
(
activity
)
}
...
...
@@ -108,12 +110,14 @@ class MyApplication : BaseApplication() {
if
(
count
==
1
&&
isHotLaunch
())
{
val
topActivity
:
Activity
?
=
ActivityManagerUtils
.
getInstance
().
topActivity
LogEx
.
logDebug
(
"glc"
,
"onActivityStarted:"
+
topActivity
?.
localClassName
)
var
flag
=
if
(
topActivity
==
null
)
{
true
}
else
{
ConfigHelper
.
noLoadingActivities
.
all
{
!
topActivity
.
localClassName
.
contains
(
it
,
true
)
}
.
all
{
!
topActivity
.
localClassName
.
contains
(
it
,
true
)
}
}
if
(
activity
.
localClassName
.
contains
(
"AppLovinFullscreenActivity"
))
{
flag
=
false
...
...
@@ -152,6 +156,7 @@ class MyApplication : BaseApplication() {
}
override
fun
onActivityResumed
(
activity
:
Activity
)
{
LogEx
.
logDebug
(
"glc"
,
"onActivityResumed"
+
activity
.
localClassName
)
PAUSED_VALUE
=
1
}
...
...
@@ -159,6 +164,7 @@ class MyApplication : BaseApplication() {
override
fun
onActivityPaused
(
activity
:
Activity
)
{
PAUSED_VALUE
=
2
lastTimePause
=
System
.
currentTimeMillis
()
LogEx
.
logDebug
(
"glc"
,
"onActivityPaused"
+
activity
.
localClassName
)
}
...
...
@@ -169,6 +175,7 @@ class MyApplication : BaseApplication() {
override
fun
onActivitySaveInstanceState
(
activity
:
Activity
,
outState
:
Bundle
)
{}
override
fun
onActivityDestroyed
(
activity
:
Activity
)
{
LogEx
.
logDebug
(
"glc"
,
"onActivityDestroyed"
+
activity
.
localClassName
)
ActivityManagerUtils
.
getInstance
().
removeActivity
(
activity
)
}
})
...
...
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