Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MiYaFastCashier
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangjiantao
MiYaFastCashier
Commits
8aea2dfe
Commit
8aea2dfe
authored
Oct 31, 2022
by
赵鹏翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
f42fba82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
42 deletions
+16
-42
MiyaApplication.kt
app/src/main/java/com/miya/fastcashier/MiyaApplication.kt
+16
-42
No files found.
app/src/main/java/com/miya/fastcashier/MiyaApplication.kt
View file @
8aea2dfe
...
...
@@ -125,53 +125,23 @@ class MiyaApplication : BaseApplication() {
registerActivityLifecycleCallbacks
(
object
:
ActivityLifecycleCallbacks
{
override
fun
onActivityCreated
(
activity
:
Activity
,
savedInstanceState
:
Bundle
?)
{
DensityUtils
.
setDensity
(
activity
,
this
@MiyaApplication
)
XLog
.
d
(
DateUtils
.
format18
(
Date
())
+
" onActivityCreated"
)
if
(!
LogFileUtils
.
isProhibitWrite
)
{
LogFileUtils
.
writeLog
(
ContextUtils
.
getContext
(),
"\n${DateUtils.format18(Date())}########onActivityCreated() called with: activity = [$activity]\n"
)
}
activityLifeCycleLog
(
activity
,
"onActivityCreated()"
)
}
override
fun
onActivityStarted
(
activity
:
Activity
)
{
XLog
.
d
(
DateUtils
.
format18
(
Date
())
+
" onActivityStarted"
)
if
(!
LogFileUtils
.
isProhibitWrite
)
{
LogFileUtils
.
writeLog
(
ContextUtils
.
getContext
(),
"\n${DateUtils.format18(Date())}########onActivityStarted() called with: activity = [$activity]\n"
)
}
activityLifeCycleLog
(
activity
,
"onActivityStarted()"
)
}
override
fun
onActivityResumed
(
activity
:
Activity
)
{
XLog
.
d
(
DateUtils
.
format18
(
Date
())
+
" onActivityResumed"
)
if
(!
LogFileUtils
.
isProhibitWrite
)
{
LogFileUtils
.
writeLog
(
ContextUtils
.
getContext
(),
"\n${DateUtils.format18(Date())}########onActivityResumed() called with: activity = [$activity]\n"
)
}
activityLifeCycleLog
(
activity
,
"onActivityResumed()"
)
}
override
fun
onActivityPaused
(
activity
:
Activity
)
{
XLog
.
d
(
DateUtils
.
format18
(
Date
())
+
" onActivityPaused"
)
if
(!
LogFileUtils
.
isProhibitWrite
)
{
LogFileUtils
.
writeLog
(
ContextUtils
.
getContext
(),
"\n${DateUtils.format18(Date())}########onActivityPaused() called with: activity = [$activity]\n"
)
}
activityLifeCycleLog
(
activity
,
"onActivityPaused()"
)
}
override
fun
onActivityStopped
(
activity
:
Activity
)
{
XLog
.
d
(
DateUtils
.
format18
(
Date
())
+
" onActivityStopped"
)
if
(!
LogFileUtils
.
isProhibitWrite
)
{
LogFileUtils
.
writeLog
(
ContextUtils
.
getContext
(),
"\n${DateUtils.format18(Date())}########onActivityStopped() called with: activity = [$activity]\n"
)
}
activityLifeCycleLog
(
activity
,
"onActivityStopped()"
)
}
override
fun
onActivitySaveInstanceState
(
activity
:
Activity
,
outState
:
Bundle
)
{
...
...
@@ -189,17 +159,21 @@ class MiyaApplication : BaseApplication() {
}
override
fun
onActivityDestroyed
(
activity
:
Activity
)
{
XLog
.
d
(
DateUtils
.
format18
(
Date
())
+
" onActivityDestroyed"
)
if
(!
LogFileUtils
.
isProhibitWrite
)
{
LogFileUtils
.
writeLog
(
ContextUtils
.
getContext
(),
"\n${DateUtils.format18(Date())}########onActivityDestroyed() called with: activity = [$activity]\n"
)
}
activityLifeCycleLog
(
activity
,
"onActivityDestroyed()"
)
}
})
}
private
fun
activityLifeCycleLog
(
activity
:
Activity
,
lifeName
:
String
)
{
XLog
.
d
(
DateUtils
.
format18
(
Date
())
+
" $lifeName"
)
if
(!
LogFileUtils
.
isProhibitWrite
)
{
LogFileUtils
.
writeLog
(
ContextUtils
.
getContext
(),
"\n${DateUtils.format18(Date())}########$lifeName called with: activity = [$activity]\n"
)
}
}
fun
resetConfig
()
{
LocalKeyDataMKManageKit
.
clearCommonData
()
//清除本地订单昨天的流水信息
...
...
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