Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
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_vedio
Commits
6464f500
Commit
6464f500
authored
Aug 10, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
0d89916e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
MintsApplication.java
...p/src/main/java/com/mints/helivideo/MintsApplication.java
+3
-2
MainFragment.kt
...main/java/com/mints/helivideo/ui/fragment/MainFragment.kt
+0
-1
ForegroundOrBackground.java
...ava/com/mints/helivideo/utils/ForegroundOrBackground.java
+7
-0
No files found.
video/app/src/main/java/com/mints/helivideo/MintsApplication.java
View file @
6464f500
...
...
@@ -58,6 +58,9 @@ public class MintsApplication extends MultiDexApplication {
// UmengManager.INSTANCE.preInit(this,
// MateUtils.INSTANCE.getAppMetaData(this, "CHANNEL_NAME"));
// 判断应用是否在前台
ForegroundOrBackground
.
init
(
this
);
// 三方配置
thirdConfig
();
}
...
...
@@ -83,8 +86,6 @@ public class MintsApplication extends MultiDexApplication {
TXCSDKService
.
init
(
this
);
// 判断应用是否在前台
ForegroundOrBackground
.
init
(
this
);
// PR下载附件
initPRDownloader
();
...
...
video/app/src/main/java/com/mints/helivideo/ui/fragment/MainFragment.kt
View file @
6464f500
...
...
@@ -388,7 +388,6 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
val
mainFirstRecommend
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
MAIN_FIRST_RECOMMEND
,
false
)
if
(!
mainFirstRecommend
)
{
// if (mainFirstRecommend) {
AppPreferencesManager
.
get
().
put
(
Constant
.
MAIN_FIRST_RECOMMEND
,
true
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
...
...
video/app/src/main/java/com/mints/helivideo/utils/ForegroundOrBackground.java
View file @
6464f500
...
...
@@ -78,6 +78,8 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
TextUtils
.
equals
(
simpleName
,
"SplashForeAdActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"VipActivity"
))
{
count
++;
System
.
out
.
println
(
"mcg __>>>>>>>:: onActivityStarted simpleName="
+
simpleName
+
" 进入 count="
+
count
);
return
;
}
...
...
@@ -91,11 +93,16 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
}
}
count
++;
System
.
out
.
println
(
"mcg __>>>>>>>:: onActivityStarted simpleName="
+
simpleName
+
" 进入 count="
+
count
);
}
@Override
public
void
onActivityStopped
(
Activity
activity
)
{
String
simpleName
=
activity
.
getClass
().
getSimpleName
();
count
--;
System
.
out
.
println
(
"mcg __>>>>>>>:: onActivityStopped simpleName="
+
simpleName
+
" 关闭 count="
+
count
);
if
(
count
<
0
)
{
count
=
0
;
}
...
...
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