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
56a13f35
Commit
56a13f35
authored
Jul 24, 2024
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
143da7f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
13 deletions
+40
-13
PrepareScanActivity.kt
.../easycleanerjunk/activity/scanjunk/PrepareScanActivity.kt
+40
-13
No files found.
app/src/main/java/com/test/easy/easycleanerjunk/activity/scanjunk/PrepareScanActivity.kt
View file @
56a13f35
package
com.test.easy.easycleanerjunk.activity.scanjunk
import
android.Manifest
import
android.content.Intent
import
android.graphics.Color
import
android.os.Build
import
android.os.Environment
import
android.util.Log
import
androidx.activity.OnBackPressedCallback
import
androidx.core.view.updatePadding
import
com.test.easy.easycleanerjunk.databinding.ActivityLayoutParepreScanBinding
...
...
@@ -10,6 +14,7 @@ import com.test.easy.easycleanerjunk.helps.ConfigHelper
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import
com.test.easy.easycleanerjunk.helps.ads.MaxAdUtils
import
com.test.easy.easycleanerjunk.utils.BarUtils
import
com.test.easy.easycleanerjunk.utils.PermissionUtils
/**
* 引导清理扫描页
...
...
@@ -32,36 +37,58 @@ class PrepareScanActivity : BaseActivity<ActivityLayoutParepreScanBinding>() {
finishToMain
()
}
})
// requestPermisson()
}
override
fun
onStart
()
{
super
.
onStart
()
checkPermission
()
}
// override fun onStart() {
// super.onStart()
// checkPermission()
// }
private
fun
requestPermisson
()
{
if
(
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
R
)
{
Environment
.
isExternalStorageManager
()
}
else
{
PermissionUtils
.
isGranted
(
Manifest
.
permission_group
.
STORAGE
)
}
)
{
playLottie
()
}
else
{
checkPermission
(
true
)
override
fun
onPermissionsResult
(
isGranted
:
Boolean
)
{
// Log.e("MXL", "权限回调: " + isGranted)
if
(
isGranted
)
{
playLottie
()
}
else
{
finishToMain
()
}
}
// override fun onPermissionsResult(isGranted: Boolean) {
// Log.e("MXL", "权限回调: " + isGranted)
// if (isGranted) {
// playLottie()
// } else {
// finishToMain()
// }
// }
override
fun
onResume
()
{
super
.
onResume
()
Log
.
e
(
"MXL"
,
"onResume: "
,
)
requestPermisson
()
}
private
fun
playLottie
()
{
binding
.
idJunkScan
.
imageAssetsFolder
=
"easy_junk_scan/images/"
binding
.
idJunkScan
.
setAnimation
(
"easy_junk_scan/data.json"
)
binding
.
idJunkScan
.
playAnimation
()
binding
.
root
.
postDelayed
({
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
==
0
)
{
MaxAdUtils
.
showInterstitialAd
(
this
)
{
startActivity
(
Intent
(
this
,
CleanJunkActivity
::
class
.
java
))
finish
()
}
}
else
{
}
else
{
AdmobUtils
.
showInterstitialAd
(
this
)
{
startActivity
(
Intent
(
this
,
CleanJunkActivity
::
class
.
java
))
finish
()
...
...
@@ -69,6 +96,6 @@ class PrepareScanActivity : BaseActivity<ActivityLayoutParepreScanBinding>() {
}
},
kotlin
.
random
.
Random
.
nextLong
(
2000
,
4500
))
},
kotlin
.
random
.
Random
.
nextLong
(
2000
,
4500
))
}
}
\ 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