Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
A
appzxhy
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
appzxhy
Commits
f933117c
Commit
f933117c
authored
Jun 06, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[修复]恢复对热启动走启动页的处理
parent
36ddaf9e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
MyApplication.kt
app/src/main/java/com/base/appzxhy/MyApplication.kt
+8
-7
SplashActivity.kt
...rc/main/java/com/base/appzxhy/ui/splash/SplashActivity.kt
+14
-2
No files found.
app/src/main/java/com/base/appzxhy/MyApplication.kt
View file @
f933117c
...
@@ -3,6 +3,7 @@ package com.base.appzxhy
...
@@ -3,6 +3,7 @@ package com.base.appzxhy
import
android.app.Activity
import
android.app.Activity
import
android.app.Application
import
android.app.Application
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
android.text.TextUtils
import
android.text.TextUtils
import
android.util.Log
import
android.util.Log
...
@@ -202,13 +203,13 @@ class MyApplication : Application() {
...
@@ -202,13 +203,13 @@ class MyApplication : Application() {
LogEx
.
logDebug
(
TAG
,
"flag=$flag"
+
" activity:"
+
activity
.
localClassName
)
LogEx
.
logDebug
(
TAG
,
"flag=$flag"
+
" activity:"
+
activity
.
localClassName
)
if
(
flag
)
{
if
(
flag
)
{
//
topActivity?.startActivity(
topActivity
?.
startActivity
(
//
Intent(
Intent
(
//
topActivity, SplashActivity::class.java
topActivity
,
SplashActivity
::
class
.
java
//
).apply {
).
apply
{
//
putExtra("isHotLaunch", true)
putExtra
(
"isHotLaunch"
,
true
)
//
putExtra("type", -1)
putExtra
(
"type"
,
-
1
)
//
})
})
}
}
}
}
lastTimeResume
=
0
lastTimeResume
=
0
...
...
app/src/main/java/com/base/appzxhy/ui/splash/SplashActivity.kt
View file @
f933117c
...
@@ -60,7 +60,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
...
@@ -60,7 +60,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
initUMP
()
initUMP
()
super
.
onCreate
(
savedInstanceState
)
super
.
onCreate
(
savedInstanceState
)
actionId
=
intent
?.
extras
?.
getString
(
"actionId"
)
?:
""
handleIntentExtras
()
}
}
override
fun
onResumeOneShoot
()
{
override
fun
onResumeOneShoot
()
{
...
@@ -168,6 +168,10 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
...
@@ -168,6 +168,10 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
goToAc
(
GuideCleanActivity
::
class
.
java
)
goToAc
(
GuideCleanActivity
::
class
.
java
)
finish
()
finish
()
}
}
isHotLaunch
->{
goToAc
(
MainActivity
::
class
.
java
)
finish
()
}
actionId
.
isNotEmpty
()
->
{
actionId
.
isNotEmpty
()
->
{
actionIdJump
()
actionIdJump
()
...
@@ -212,10 +216,18 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
...
@@ -212,10 +216,18 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
}
}
}
}
var
actionId
=
""
override
fun
onNewIntent
(
intent
:
Intent
?)
{
override
fun
onNewIntent
(
intent
:
Intent
?)
{
super
.
onNewIntent
(
intent
)
handleIntentExtras
()
}
var
isHotLaunch
:
Boolean
=
false
var
actionId
=
""
fun
handleIntentExtras
()
{
super
.
onNewIntent
(
intent
)
super
.
onNewIntent
(
intent
)
actionId
=
intent
?.
extras
?.
getString
(
"actionId"
)
?:
""
actionId
=
intent
?.
extras
?.
getString
(
"actionId"
)
?:
""
isHotLaunch
=
intent
?.
extras
?.
getBoolean
(
"isHotLaunch"
)
==
true
}
}
}
}
\ 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