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
33fe8c03
Commit
33fe8c03
authored
Jul 09, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...ui
parent
010547d1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
21 deletions
+39
-21
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+6
-0
MyApplication.kt
app/src/main/java/com/base/datarecovery/MyApplication.kt
+4
-0
SplashActivity.kt
...ain/java/com/base/datarecovery/activity/SplashActivity.kt
+12
-9
AppFunctionAdapter.kt
.../java/com/base/datarecovery/adapter/AppFunctionAdapter.kt
+2
-2
AdmobOpenUtils.kt
...src/main/java/com/base/datarecovery/ads/AdmobOpenUtils.kt
+11
-6
ConfigHelper.kt
app/src/main/java/com/base/datarecovery/help/ConfigHelper.kt
+2
-2
activity_layout_result.xml
app/src/main/res/layout/activity_layout_result.xml
+2
-2
No files found.
app/src/main/AndroidManifest.xml
View file @
33fe8c03
...
@@ -35,6 +35,12 @@
...
@@ -35,6 +35,12 @@
android:launchMode=
"singleTask"
android:launchMode=
"singleTask"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
android:name=
".activity.ResultActivity"
android:exported=
"false"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
<activity
android:name=
".activity.junkclean.ScanJunkActivity"
android:name=
".activity.junkclean.ScanJunkActivity"
android:exported=
"false"
android:exported=
"false"
...
...
app/src/main/java/com/base/datarecovery/MyApplication.kt
View file @
33fe8c03
...
@@ -10,10 +10,13 @@ import com.base.datarecovery.bean.ConstObject.ifAgreePrivacy
...
@@ -10,10 +10,13 @@ import com.base.datarecovery.bean.ConstObject.ifAgreePrivacy
import
com.base.datarecovery.help.BaseApplication
import
com.base.datarecovery.help.BaseApplication
import
com.base.datarecovery.help.ConfigHelper
import
com.base.datarecovery.help.ConfigHelper
import
com.base.datarecovery.utils.ActivityManagerUtils
import
com.base.datarecovery.utils.ActivityManagerUtils
import
com.base.datarecovery.utils.LogEx
import
com.google.android.gms.ads.MobileAds
import
com.google.android.gms.ads.MobileAds
class
MyApplication
:
BaseApplication
()
{
class
MyApplication
:
BaseApplication
()
{
private
val
TAG
=
"MyApplication"
companion
object
{
companion
object
{
@JvmField
@JvmField
var
PAUSED_VALUE
=
0
var
PAUSED_VALUE
=
0
...
@@ -60,6 +63,7 @@ class MyApplication : BaseApplication() {
...
@@ -60,6 +63,7 @@ class MyApplication : BaseApplication() {
}
else
{
}
else
{
ConfigHelper
.
noLoadingActivities
.
all
{
!
topActivity
.
localClassName
.
contains
(
it
,
true
)
}
ConfigHelper
.
noLoadingActivities
.
all
{
!
topActivity
.
localClassName
.
contains
(
it
,
true
)
}
}
}
LogEx
.
logDebug
(
TAG
,
"flag=$flag"
)
if
(
flag
)
{
if
(
flag
)
{
if
(
AdmobOpenUtils
.
isOpenAdLoaded
())
{
if
(
AdmobOpenUtils
.
isOpenAdLoaded
())
{
...
...
app/src/main/java/com/base/datarecovery/activity/SplashActivity.kt
View file @
33fe8c03
...
@@ -45,10 +45,15 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
...
@@ -45,10 +45,15 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
AdmobNativeUtils
.
loadNativeAd
()
AdmobOpenUtils
.
loadAppOpenAd
{
LogEx
.
logDebug
(
TAG
,
"load where=$it"
)
}
jumpNext
()
jumpNext
()
if
(
ifAgreePrivacy
)
{
if
(
ifAgreePrivacy
)
{
startProgress
()
job
=
startProgress
()
binding
.
llStart
.
visibility
=
View
.
GONE
binding
.
llStart
.
visibility
=
View
.
GONE
binding
.
llProgress
.
visibility
=
View
.
VISIBLE
binding
.
llProgress
.
visibility
=
View
.
VISIBLE
}
else
{
}
else
{
...
@@ -73,10 +78,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
...
@@ -73,10 +78,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
startActivity
(
intent
)
startActivity
(
intent
)
}
}
AdmobNativeUtils
.
loadNativeAd
()
AdmobOpenUtils
.
loadAppOpenAd
{
LogEx
.
logDebug
(
TAG
,
"load where=$it"
)
}
}
}
private
fun
jumpNext
()
{
private
fun
jumpNext
()
{
...
@@ -102,7 +104,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
...
@@ -102,7 +104,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
ifAgreePrivacy
=
true
ifAgreePrivacy
=
true
binding
.
llStart
.
visibility
=
View
.
GONE
binding
.
llStart
.
visibility
=
View
.
GONE
binding
.
llProgress
.
visibility
=
View
.
VISIBLE
binding
.
llProgress
.
visibility
=
View
.
VISIBLE
startProgress
()
job
=
startProgress
()
}
}
}
}
...
@@ -110,14 +112,15 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
...
@@ -110,14 +112,15 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
private
fun
startProgress
()
=
lifecycleScope
.
launch
{
private
fun
startProgress
()
=
lifecycleScope
.
launch
{
while
(
isActive
)
{
while
(
isActive
)
{
val
value
=
binding
.
pb
.
progress
+
Random
.
nextInt
(
3
,
5
)
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
=
Random
.
nextLong
(
300
,
550
)
delay
(
delayTime
)
delay
(
delayTime
)
processTime
+=
delayTime
processTime
+=
delayTime
if
(
processTime
>=
3000
)
{
if
(
processTime
>=
5000
)
{
job
?.
cancel
()
AdmobOpenUtils
.
showAppOpenAd
(
this
@SplashActivity
)
{
AdmobOpenUtils
.
showAppOpenAd
(
this
@SplashActivity
)
{
LogEx
.
logDebug
(
TAG
,
"where $it"
)
LogEx
.
logDebug
(
TAG
,
"where $it"
)
binding
.
pb
.
progress
=
100
binding
.
pb
.
progress
=
100
...
@@ -130,7 +133,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
...
@@ -130,7 +133,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
if
(
ifAgreePrivacy
)
{
if
(
ifAgreePrivacy
&&
job
?.
isActive
==
false
)
{
job
=
startProgress
()
job
=
startProgress
()
}
}
}
}
...
...
app/src/main/java/com/base/datarecovery/adapter/AppFunctionAdapter.kt
View file @
33fe8c03
...
@@ -20,8 +20,8 @@ class AppFunctionAdapter(val click: (name: String) -> Unit) :
...
@@ -20,8 +20,8 @@ class AppFunctionAdapter(val click: (name: String) -> Unit) :
val
list
=
arrayListOf
(
val
list
=
arrayListOf
(
Fun
(
JUNK_CLEANER
,
R
.
mipmap
.
h_cleanjunk
,
"Clean junk regularly to free up space"
,
"Clean Up"
),
Fun
(
JUNK_CLEANER
,
R
.
mipmap
.
h_cleanjunk
,
"Clean junk regularly to free up space"
,
"Clean Up"
),
Fun
(
REPEAT_PHOTOS
,
R
.
mipmap
.
h_similar
,
"Check similar photos to release more space"
,
"Clean Up"
),
Fun
(
REPEAT_PHOTOS
,
R
.
mipmap
.
repeatedphotos
,
"Check similar photos to release more space"
,
"Clean Up"
),
Fun
(
SCREENSHOT_CLEANER
,
R
.
mipmap
.
h_screenshot
,
"Too many screenshots? Free up your phone storage!"
,
"Clean Up"
),
Fun
(
SCREENSHOT_CLEANER
,
R
.
mipmap
.
screenshots
,
"Too many screenshots? Free up your phone storage!"
,
"Clean Up"
),
)
)
class
JJJ
(
view
:
View
)
:
ViewHolder
(
view
)
class
JJJ
(
view
:
View
)
:
ViewHolder
(
view
)
...
...
app/src/main/java/com/base/datarecovery/ads/AdmobOpenUtils.kt
View file @
33fe8c03
...
@@ -61,6 +61,7 @@ object AdmobOpenUtils {
...
@@ -61,6 +61,7 @@ object AdmobOpenUtils {
})
})
}
}
fun
showAppOpenAd
(
activity
:
Activity
,
skip
:
Boolean
=
false
,
onHidden
:
((
where
:
Int
)
->
Unit
)?
=
null
)
{
fun
showAppOpenAd
(
activity
:
Activity
,
skip
:
Boolean
=
false
,
onHidden
:
((
where
:
Int
)
->
Unit
)?
=
null
)
{
if
(
activity
.
isFinishing
||
activity
.
isDestroyed
)
{
if
(
activity
.
isFinishing
||
activity
.
isDestroyed
)
{
...
@@ -70,19 +71,22 @@ object AdmobOpenUtils {
...
@@ -70,19 +71,22 @@ object AdmobOpenUtils {
onHidden
?.
invoke
(
1
)
onHidden
?.
invoke
(
1
)
return
return
}
}
val
obj
=
JSONObject
()
val
obj
1
=
JSONObject
()
obj
.
put
(
"ad_unit"
,
"openAd"
)
obj
1
.
put
(
"ad_unit"
,
"openAd"
)
// EventUtils.event("ad_prepare_show", ext = obj)
// EventUtils.event("ad_prepare_show", ext = obj
1
)
if
(
System
.
currentTimeMillis
()
-
openLoadTime
>
1000
*
60
*
60
)
{
if
(
System
.
currentTimeMillis
()
-
openLoadTime
>
1000
*
60
*
60
)
{
LogEx
.
logDebug
(
TAG
,
"openLoadTime out time"
)
mOpenAd
=
null
mOpenAd
=
null
loadAppOpenAd
()
loadAppOpenAd
()
onHidden
?.
invoke
(
2
)
onHidden
?.
invoke
(
2
)
val
obj
=
JSONObject
()
val
obj
2
=
JSONObject
()
obj
.
put
(
"ad_unit"
,
"openAd"
)
obj
2
.
put
(
"ad_unit"
,
"openAd"
)
// EventUtils.event("ad_expire", ext = obj)
// EventUtils.event("ad_expire", ext = obj
2
)
return
return
}
}
if
(
mOpenAd
!=
null
)
{
if
(
mOpenAd
!=
null
)
{
LogEx
.
logDebug
(
TAG
,
"mOpenAd!=null"
)
val
thisMOpenAd
=
mOpenAd
val
thisMOpenAd
=
mOpenAd
mOpenAd
=
null
mOpenAd
=
null
thisMOpenAd
?.
fullScreenContentCallback
=
object
:
FullScreenContentCallback
()
{
thisMOpenAd
?.
fullScreenContentCallback
=
object
:
FullScreenContentCallback
()
{
...
@@ -113,6 +117,7 @@ object AdmobOpenUtils {
...
@@ -113,6 +117,7 @@ object AdmobOpenUtils {
}
}
thisMOpenAd
?.
show
(
activity
)
thisMOpenAd
?.
show
(
activity
)
}
else
{
}
else
{
LogEx
.
logDebug
(
TAG
,
"mOpenAd=null"
)
onHidden
?.
invoke
(
5
)
onHidden
?.
invoke
(
5
)
loadAppOpenAd
()
loadAppOpenAd
()
val
obj
=
JSONObject
()
val
obj
=
JSONObject
()
...
...
app/src/main/java/com/base/datarecovery/help/ConfigHelper.kt
View file @
33fe8c03
...
@@ -5,7 +5,7 @@ import com.base.datarecovery.activity.SplashActivity
...
@@ -5,7 +5,7 @@ import com.base.datarecovery.activity.SplashActivity
object
ConfigHelper
{
object
ConfigHelper
{
const
val
privacyPolicy
=
"
https://sites.google.com/view/easy-cleannow/easy-clean
"
const
val
privacyPolicy
=
""
// 域名
// 域名
const
val
eventUrl
=
"https://rp.easyfilemanager.xyz"
const
val
eventUrl
=
"https://rp.easyfilemanager.xyz"
...
@@ -17,7 +17,7 @@ object ConfigHelper {
...
@@ -17,7 +17,7 @@ object ConfigHelper {
const
val
nativeAdmobId
=
"ca-app-pub-3940256099942544/2247696110"
const
val
nativeAdmobId
=
"ca-app-pub-3940256099942544/2247696110"
// 正式包名
// 正式包名
const
val
packageName
=
"
com.kk.junkcleaner.easy.zxkk
"
const
val
packageName
=
""
val
noLoadingActivities
=
listOf
(
val
noLoadingActivities
=
listOf
(
"full"
,
// 过滤全屏广告
"full"
,
// 过滤全屏广告
...
...
app/src/main/res/layout/activity_layout_result.xml
View file @
33fe8c03
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
android:id=
"@+id/cl_top"
android:id=
"@+id/cl_top"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"200dp"
android:layout_height=
"200dp"
android:background=
"
@color/theme_color
"
android:background=
"
#0164C8
"
app:layout_constraintTop_toTopOf=
"parent"
>
app:layout_constraintTop_toTopOf=
"parent"
>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/ic_success"
app:layout_constraintTop_toBottomOf=
"@+id/ic_success"
tools:ignore=
"HardcodedText"
tools:ignore=
"HardcodedText"
tools
:text=
"Delete successful"
/>
android
:text=
"Delete successful"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
...
...
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