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