Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
B
Browser White
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
Browser White
Commits
bcbee770
Commit
bcbee770
authored
Aug 08, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
0a81c9ad
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
100 additions
and
1 deletion
+100
-1
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+2
-1
MyApplication.kt
app/src/main/java/com/base/browserwhite/MyApplication.kt
+98
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
bcbee770
...
...
@@ -27,7 +27,8 @@
<activity
android:name=
".ui.activity.MainActivity"
android:exported=
"true"
>
android:exported=
"true"
android:launchMode=
"singleTask"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
app/src/main/java/com/base/browserwhite/MyApplication.kt
0 → 100644
View file @
bcbee770
package
com.base.browserwhite
import
android.app.Activity
import
android.app.Application
import
android.os.Bundle
import
com.base.browserwhite.utils.ActivityManagerUtils
class
MyApplication
:
Application
()
{
companion
object
{
lateinit
var
context
:
MyApplication
}
override
fun
onCreate
()
{
super
.
onCreate
()
context
=
this
initLifeListener
()
}
private
fun
initLifeListener
()
{
registerActivityLifecycleCallbacks
(
object
:
ActivityLifecycleCallbacks
{
private
var
count
=
0
override
fun
onActivityCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
{
ActivityManagerUtils
.
getInstance
().
addActivity
(
activity
)
}
override
fun
onActivityStarted
(
activity
:
Activity
)
{
// LogEx.logDebug(TAG, "onActivityStarted")
// count++
// lastTimeResume = System.currentTimeMillis()
// if (count == 1 && isHotLaunch()) {
//
// val topActivity: Activity? = ActivityManagerUtils.getInstance().topActivity
//
// var flag = if (topActivity == null) {
// true
// } else {
// com.base.filerecoveryblack.ConfigHelper.noLoadingActivities.all {
// !topActivity.localClassName.contains(it, true)
// }
// }
//
// if (activity.localClassName.contains("AppLovinFullscreenActivity")) {
// flag = false
// }
// LogEx.logDebug(TAG, "flag=$flag" + " activity:" + activity.localClassName)
//
// if (flag && !isInterOpenShowing) {
// if (AdmobMaxHelper.isOpenAdLoaded()) {
// var loaded: Boolean = true
// AdmobMaxHelper.admobMaxShowOpenAd(activity, {
// loaded = it
// }, {
// val sp = AppPreferences.getInstance().getString("splashShowInter", "0").toInt()
// if (sp == 1 && !loaded) {
// AdmobMaxHelper.admobMaxShowInterstitialAd(activity)
// }
// })
// } else {
// topActivity?.startActivity(
// Intent(
// topActivity,
// SplashActivity::class.java
// ).apply {
// putExtra("isHotLaunch", true)
// putExtra("type", -1)
// })
// }
// }
// }
// lastTimeResume = 0
}
override
fun
onActivityResumed
(
activity
:
Activity
)
{
// LogEx.logDebug(TAG, "onActivityResumed")
// PAUSED_VALUE = 1
}
override
fun
onActivityPaused
(
activity
:
Activity
)
{
// LogEx.logDebug(TAG, "onActivityPaused")
// PAUSED_VALUE = 2
// lastTimePause = System.currentTimeMillis()
}
override
fun
onActivityStopped
(
activity
:
Activity
)
{
count
--
}
override
fun
onActivitySaveInstanceState
(
activity
:
Activity
,
outState
:
Bundle
)
{}
override
fun
onActivityDestroyed
(
activity
:
Activity
)
{
ActivityManagerUtils
.
getInstance
().
removeActivity
(
activity
)
}
})
}
}
\ No newline at end of file
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