Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Data Recovery 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
Data Recovery White
Commits
46d81222
Commit
46d81222
authored
Jul 12, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...开屏
parent
5b896ade
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
22 deletions
+24
-22
SettingActivity.kt
...in/java/com/base/datarecovery/activity/SettingActivity.kt
+0
-6
SplashActivity.kt
...ain/java/com/base/datarecovery/activity/SplashActivity.kt
+21
-14
ScreenShotActivity.kt
...se/datarecovery/activity/screenshot/ScreenShotActivity.kt
+3
-2
No files found.
app/src/main/java/com/base/datarecovery/activity/SettingActivity.kt
View file @
46d81222
...
@@ -3,13 +3,7 @@ package com.base.datarecovery.activity
...
@@ -3,13 +3,7 @@ package com.base.datarecovery.activity
import
android.content.Intent
import
android.content.Intent
import
android.graphics.Color
import
android.graphics.Color
import
android.net.Uri
import
android.net.Uri
import
android.os.Bundle
import
androidx.activity.addCallback
import
androidx.activity.addCallback
import
androidx.activity.enableEdgeToEdge
import
androidx.appcompat.app.AppCompatActivity
import
androidx.core.view.ViewCompat
import
androidx.core.view.WindowInsetsCompat
import
com.base.datarecovery.R
import
com.base.datarecovery.bean.ConstObject.fcmNotification
import
com.base.datarecovery.bean.ConstObject.fcmNotification
import
com.base.datarecovery.bean.ConstObject.stayNotification
import
com.base.datarecovery.bean.ConstObject.stayNotification
import
com.base.datarecovery.databinding.ActivitySettingBinding
import
com.base.datarecovery.databinding.ActivitySettingBinding
...
...
app/src/main/java/com/base/datarecovery/activity/SplashActivity.kt
View file @
46d81222
...
@@ -45,6 +45,8 @@ import kotlinx.coroutines.flow.SharedFlow
...
@@ -45,6 +45,8 @@ import kotlinx.coroutines.flow.SharedFlow
import
kotlinx.coroutines.flow.collectLatest
import
kotlinx.coroutines.flow.collectLatest
import
kotlinx.coroutines.isActive
import
kotlinx.coroutines.isActive
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.withTimeout
import
java.util.concurrent.FutureTask
import
kotlin.random.Random
import
kotlin.random.Random
import
kotlin.random.nextLong
import
kotlin.random.nextLong
...
@@ -73,9 +75,6 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
...
@@ -73,9 +75,6 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
closeNotification
()
closeNotification
()
AdmobNativeUtils
.
loadNativeAd
()
AdmobNativeUtils
.
loadNativeAd
()
AdmobOpenUtils
.
loadAppOpenAd
{
LogEx
.
logDebug
(
TAG
,
"load where=$it"
)
}
AdmobInterstitialUtils
.
loadInterstitialAd
(
this
)
AdmobInterstitialUtils
.
loadInterstitialAd
(
this
)
progressCollect
()
progressCollect
()
...
@@ -196,29 +195,36 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
...
@@ -196,29 +195,36 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
}
}
private
var
processTime
=
0L
private
var
processTime
=
0L
private
var
outTimeAdStart
=
false
private
fun
startProgress
()
=
lifecycleScope
.
launch
{
private
fun
startProgress
()
=
lifecycleScope
.
launch
{
while
(
isActive
)
{
while
(
isActive
)
{
val
value
=
binding
.
pb
.
progress
+
2
val
value
=
binding
.
pb
.
progress
+
Random
.
nextInt
(
2
,
5
)
binding
.
pb
.
setProgress
(
value
,
true
)
binding
.
pb
.
setProgress
(
value
,
true
)
progress
.
emit
(
value
)
progress
.
emit
(
value
)
val
delayTime
=
Random
.
nextLong
(
300
,
550
)
val
delayTime
=
300L
delay
(
delayTime
)
delay
(
delayTime
)
processTime
+=
delayTime
processTime
+=
delayTime
if
(
processTime
>=
Random
.
nextLong
(
4000
,
6000
))
{
if
(
processTime
>=
Random
.
nextLong
(
3000
,
4000
))
{
job
?.
cancel
()
if
(!
outTimeAdStart
)
{
outTimeAd
()
outTimeAdStart
=
true
outTimeAd
()
}
}
}
}
}
}
}
private
fun
outTimeAd
()
{
private
fun
outTimeAd
()
{
AdmobOpenUtils
.
showAppOpenAd
(
this
@SplashActivity
)
{
LogEx
.
logDebug
(
TAG
,
"outTimeAd"
)
LogEx
.
logDebug
(
TAG
,
"where $it"
)
AdmobOpenUtils
.
loadAppOpenAd
{
binding
.
pb
.
progress
=
100
LogEx
.
logDebug
(
TAG
,
"load where=$it"
)
startActivity
(
Intent
(
this
@SplashActivity
,
MainActivity
::
class
.
java
))
job
?.
cancel
()
finish
()
AdmobOpenUtils
.
showAppOpenAd
(
this
@SplashActivity
)
{
LogEx
.
logDebug
(
TAG
,
"adCallBack=$it"
)
binding
.
pb
.
progress
=
100
jumpNext
()
}
}
}
}
}
...
@@ -234,4 +240,5 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
...
@@ -234,4 +240,5 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
job
?.
cancel
()
job
?.
cancel
()
}
}
}
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/activity/screenshot/ScreenShotActivity.kt
View file @
46d81222
...
@@ -99,11 +99,11 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
...
@@ -99,11 +99,11 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
}
}
onBackPressedDispatcher
.
addCallback
{
onBackPressedDispatcher
.
addCallback
{
showExitFunctionDialog
{
showExitFunctionDialog
{
if
(
it
){
if
(
it
)
{
AdmobInterstitialUtils
.
showInterstitialAd
(
this
@ScreenShotActivity
)
{
AdmobInterstitialUtils
.
showInterstitialAd
(
this
@ScreenShotActivity
)
{
finishToMain
()
finishToMain
()
}
}
}
else
{
}
else
{
finishToMain
()
finishToMain
()
}
}
...
@@ -136,6 +136,7 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
...
@@ -136,6 +136,7 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
val
split
=
screenShotAdapter
.
getAllData
().
sumOf
{
it
.
file
.
length
()
}.
toFormatSize
().
split
(
" "
)
val
split
=
screenShotAdapter
.
getAllData
().
sumOf
{
it
.
file
.
length
()
}.
toFormatSize
().
split
(
" "
)
binding
.
tvSize
.
text
=
split
[
0
]
binding
.
tvSize
.
text
=
split
[
0
]
binding
.
tvUnit
.
text
=
split
[
1
]
binding
.
tvUnit
.
text
=
split
[
1
]
setCleanUpUi
(
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