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
cad27b05
Commit
cad27b05
authored
Aug 26, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
360af580
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
713 additions
and
321 deletions
+713
-321
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+5
-3
MyApplication.kt
app/src/main/java/com/base/datarecovery/MyApplication.kt
+3
-3
MainActivity.kt
.../main/java/com/base/datarecovery/activity/MainActivity.kt
+0
-1
SplashActivity.kt
...ain/java/com/base/datarecovery/activity/SplashActivity.kt
+302
-302
PrivacyManager.kt
...a/com/base/datarecovery/activity/splash/PrivacyManager.kt
+63
-0
Splash2Activity.kt
.../com/base/datarecovery/activity/splash/Splash2Activity.kt
+138
-0
StartUtils.kt
.../java/com/base/datarecovery/activity/splash/StartUtils.kt
+119
-0
TaskManager.kt
...java/com/base/datarecovery/activity/splash/TaskManager.kt
+71
-0
NotificationUtil.kt
...c/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
+4
-4
ConfigHelper.kt
app/src/main/java/com/base/datarecovery/help/ConfigHelper.kt
+3
-2
StayNotificationService.kt
.../com/base/datarecovery/service/StayNotificationService.kt
+5
-6
zhanweitu2.png
app/src/main/res/mipmap-xxhdpi/zhanweitu2.png
+0
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
cad27b05
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
tools:targetApi=
"34"
>
tools:targetApi=
"34"
>
<activity
<activity
android:name=
".activity.
Splash
Activity"
android:name=
".activity.
splash.Splash2
Activity"
android:exported=
"true"
android:exported=
"true"
android:launchMode=
"singleTask"
android:launchMode=
"singleTask"
android:theme=
"@style/splash.theme"
>
android:theme=
"@style/splash.theme"
>
...
@@ -242,8 +242,10 @@
...
@@ -242,8 +242,10 @@
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
android:name=
".activity.junkclean.ScanJunk2Activity"
<activity
android:screenOrientation=
"portrait"
/>
android:name=
".activity.junkclean.ScanJunk2Activity"
android:screenOrientation=
"portrait"
/>
<meta-data
<meta-data
android:name=
"com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION"
android:name=
"com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION"
android:value=
"true"
/>
android:value=
"true"
/>
...
...
app/src/main/java/com/base/datarecovery/MyApplication.kt
View file @
cad27b05
...
@@ -5,7 +5,7 @@ import android.app.Activity
...
@@ -5,7 +5,7 @@ import android.app.Activity
import
android.content.Intent
import
android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
android.text.TextUtils
import
android.text.TextUtils
import
com.base.datarecovery.activity.
Splash
Activity
import
com.base.datarecovery.activity.
splash.Splash2
Activity
import
com.base.datarecovery.ads.AdmobMaxHelper
import
com.base.datarecovery.ads.AdmobMaxHelper
import
com.base.datarecovery.bean.ConstObject.ifAgreePrivacy
import
com.base.datarecovery.bean.ConstObject.ifAgreePrivacy
import
com.base.datarecovery.fcm.FCMManager
import
com.base.datarecovery.fcm.FCMManager
...
@@ -138,7 +138,7 @@ class MyApplication : BaseApplication() {
...
@@ -138,7 +138,7 @@ class MyApplication : BaseApplication() {
topActivity
?.
startActivity
(
topActivity
?.
startActivity
(
Intent
(
Intent
(
topActivity
,
topActivity
,
SplashActivity
::
class
.
java
Splash
2
Activity
::
class
.
java
).
apply
{
).
apply
{
putExtra
(
"isHotLaunch"
,
true
)
putExtra
(
"isHotLaunch"
,
true
)
putExtra
(
"type"
,
-
1
)
putExtra
(
"type"
,
-
1
)
...
@@ -147,7 +147,7 @@ class MyApplication : BaseApplication() {
...
@@ -147,7 +147,7 @@ class MyApplication : BaseApplication() {
topActivity
?.
startActivity
(
topActivity
?.
startActivity
(
Intent
(
Intent
(
topActivity
,
topActivity
,
SplashActivity
::
class
.
java
Splash
2
Activity
::
class
.
java
).
apply
{
).
apply
{
putExtra
(
"isHotLaunch"
,
true
)
putExtra
(
"isHotLaunch"
,
true
)
putExtra
(
"type"
,
-
1
)
putExtra
(
"type"
,
-
1
)
...
...
app/src/main/java/com/base/datarecovery/activity/MainActivity.kt
View file @
cad27b05
...
@@ -22,7 +22,6 @@ import com.base.datarecovery.view.PermissionDialog.showPermissionBottomSheet
...
@@ -22,7 +22,6 @@ import com.base.datarecovery.view.PermissionDialog.showPermissionBottomSheet
import
com.base.datarecovery.view.RateStarPop.showRateStarPopDialog
import
com.base.datarecovery.view.RateStarPop.showRateStarPopDialog
import
com.facebook.appevents.AppEventsLogger
import
com.facebook.appevents.AppEventsLogger
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.async
import
kotlinx.coroutines.delay
import
kotlinx.coroutines.delay
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.launch
...
...
app/src/main/java/com/base/datarecovery/activity/SplashActivity.kt
View file @
cad27b05
package
com.base.datarecovery.activity
//package com.base.datarecovery.activity
//
import
android.annotation.SuppressLint
//import android.annotation.SuppressLint
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.text.SpannableString
//import android.text.SpannableString
import
android.text.Spanned
//import android.text.Spanned
import
android.text.style.UnderlineSpan
//import android.text.style.UnderlineSpan
import
android.view.View
//import android.view.View
import
androidx.lifecycle.lifecycleScope
//import androidx.lifecycle.lifecycleScope
import
com.base.datarecovery.MyApplication
//import com.base.datarecovery.MyApplication
import
com.base.datarecovery.activity.appmanager.AppManagerAnimationActivity
//import com.base.datarecovery.activity.appmanager.AppManagerAnimationActivity
import
com.base.datarecovery.activity.appprocess.AppProcessAnimationActivity
//import com.base.datarecovery.activity.appprocess.AppProcessAnimationActivity
import
com.base.datarecovery.activity.battery.BatteryInfoAnimationActivity
//import com.base.datarecovery.activity.battery.BatteryInfoAnimationActivity
import
com.base.datarecovery.activity.guide.GuideActivity
//import com.base.datarecovery.activity.guide.GuideActivity
import
com.base.datarecovery.activity.junkclean.ScanJunkActivity
//import com.base.datarecovery.activity.junkclean.ScanJunkActivity
import
com.base.datarecovery.activity.largefile.LargeFileActivity
//import com.base.datarecovery.activity.largefile.LargeFileActivity
import
com.base.datarecovery.activity.largefile.LargeFileAnimationActivity
//import com.base.datarecovery.activity.largefile.LargeFileAnimationActivity
import
com.base.datarecovery.activity.photomanager.PhotoManagerAnimationActivity
//import com.base.datarecovery.activity.photomanager.PhotoManagerAnimationActivity
import
com.base.datarecovery.activity.privacyspace.PrivacyPinOneActivity
//import com.base.datarecovery.activity.privacyspace.PrivacyPinOneActivity
import
com.base.datarecovery.activity.privacyspace.PrivacySpaceActivity
//import com.base.datarecovery.activity.privacyspace.PrivacySpaceActivity
import
com.base.datarecovery.activity.recovery.FileScanResultActivity
//import com.base.datarecovery.activity.recovery.FileScanResultActivity
import
com.base.datarecovery.activity.whatsapp.WhatsAppCleanerAnimationActivity
//import com.base.datarecovery.activity.whatsapp.WhatsAppCleanerAnimationActivity
import
com.base.datarecovery.ads.AdmobMaxHelper
//import com.base.datarecovery.ads.AdmobMaxHelper
import
com.base.datarecovery.bean.ConstObject
//import com.base.datarecovery.bean.ConstObject
import
com.base.datarecovery.bean.ConstObject.ID_APP_MANAGER
//import com.base.datarecovery.bean.ConstObject.ID_APP_MANAGER
import
com.base.datarecovery.bean.ConstObject.ID_APP_PROCESS
//import com.base.datarecovery.bean.ConstObject.ID_APP_PROCESS
import
com.base.datarecovery.bean.ConstObject.ID_BATTERY_INFO
//import com.base.datarecovery.bean.ConstObject.ID_BATTERY_INFO
import
com.base.datarecovery.bean.ConstObject.ID_JUNK_CLEAN_PUSH
//import com.base.datarecovery.bean.ConstObject.ID_JUNK_CLEAN_PUSH
import
com.base.datarecovery.bean.ConstObject.ID_LARGE_FILE
//import com.base.datarecovery.bean.ConstObject.ID_LARGE_FILE
import
com.base.datarecovery.bean.ConstObject.ID_PRIVACY_SPACE
//import com.base.datarecovery.bean.ConstObject.ID_PRIVACY_SPACE
import
com.base.datarecovery.bean.ConstObject.ID_RECOVERY_DOCUMENTS
//import com.base.datarecovery.bean.ConstObject.ID_RECOVERY_DOCUMENTS
import
com.base.datarecovery.bean.ConstObject.ID_RECOVERY_PHOTOS
//import com.base.datarecovery.bean.ConstObject.ID_RECOVERY_PHOTOS
import
com.base.datarecovery.bean.ConstObject.ID_RECOVERY_VIDEOS
//import com.base.datarecovery.bean.ConstObject.ID_RECOVERY_VIDEOS
import
com.base.datarecovery.bean.ConstObject.ID_SCREENSHOT_CLEAN
//import com.base.datarecovery.bean.ConstObject.ID_SCREENSHOT_CLEAN
import
com.base.datarecovery.bean.ConstObject.ID_SIMILAR_IMAGE
//import com.base.datarecovery.bean.ConstObject.ID_SIMILAR_IMAGE
import
com.base.datarecovery.bean.ConstObject.ID_WHATSAPP_CLEANER
//import com.base.datarecovery.bean.ConstObject.ID_WHATSAPP_CLEANER
import
com.base.datarecovery.bean.ConstObject.ifAgreePrivacy
//import com.base.datarecovery.bean.ConstObject.ifAgreePrivacy
import
com.base.datarecovery.bean.ConstObject.isGuide
//import com.base.datarecovery.bean.ConstObject.isGuide
import
com.base.datarecovery.bean.ConstObject.privacyPinPassword
//import com.base.datarecovery.bean.ConstObject.privacyPinPassword
import
com.base.datarecovery.databinding.ActivitySplashBinding
//import com.base.datarecovery.databinding.ActivitySplashBinding
import
com.base.datarecovery.fcm.CloseNotificationReceiver
//import com.base.datarecovery.fcm.CloseNotificationReceiver
import
com.base.datarecovery.fcm.CloseNotificationReceiver.Companion.NotificationId
//import com.base.datarecovery.fcm.CloseNotificationReceiver.Companion.NotificationId
import
com.base.datarecovery.fcm.NotificationUtil
//import com.base.datarecovery.fcm.NotificationUtil
import
com.base.datarecovery.help.BaseActivity
//import com.base.datarecovery.help.BaseActivity
import
com.base.datarecovery.help.ConfigHelper
//import com.base.datarecovery.help.ConfigHelper
import
com.base.datarecovery.service.StayNotificationService.Companion.startStayNotification
//import com.base.datarecovery.service.StayNotificationService.Companion.startStayNotification
import
com.base.datarecovery.utils.AppPreferences
//import com.base.datarecovery.utils.AppPreferences
import
com.base.datarecovery.utils.BarUtils
//import com.base.datarecovery.utils.BarUtils
import
com.base.datarecovery.utils.LogEx
//import com.base.datarecovery.utils.LogEx
import
kotlinx.coroutines.Dispatchers
//import kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.Job
//import kotlinx.coroutines.Job
import
kotlinx.coroutines.cancel
//import kotlinx.coroutines.cancel
import
kotlinx.coroutines.delay
//import kotlinx.coroutines.delay
import
kotlinx.coroutines.flow.MutableSharedFlow
//import kotlinx.coroutines.flow.MutableSharedFlow
import
kotlinx.coroutines.flow.SharedFlow
//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
kotlin.random.Random
//import kotlin.random.Random
//
@SuppressLint
(
"CustomSplashScreen"
)
//@SuppressLint("CustomSplashScreen")
class
SplashActivity
:
BaseActivity
<
ActivitySplashBinding
>()
{
//class SplashActivity : BaseActivity<ActivitySplashBinding>() {
//
private
val
TAG
=
"SplashActivity"
// private val TAG = "SplashActivity"
private
var
job
:
Job
?
=
null
// private var job: Job? = null
private
val
progress
=
MutableSharedFlow
<
Int
>()
// private val progress = MutableSharedFlow<Int>()
private
val
progressFlow
:
SharedFlow
<
Int
>
=
progress
// private val progressFlow: SharedFlow<Int> = progress
private
var
oneClickStart
:
Boolean
=
false
// private var oneClickStart: Boolean = false
private
var
actionId
=
-
1
// private var actionId = -1
//
//
override
val
binding
:
ActivitySplashBinding
by
lazy
{
// override val binding: ActivitySplashBinding by lazy {
ActivitySplashBinding
.
inflate
(
layoutInflater
)
// ActivitySplashBinding.inflate(layoutInflater)
}
// }
//
override
fun
initView
()
{
// override fun initView() {
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
// BarUtils.setStatusBarLightMode(this, true)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
// BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
//
// if (MyApplication.isInterOpenShowing) {
//// if (MyApplication.isInterOpenShowing) {
// finish()
//// finish()
//// return
//// }
//
// startStayNotification()
// NotificationUtil.stopNotificationHandler()
//
// actionId = intent?.extras?.getInt("actionId") ?: -1
// closeNotification()
//
// progressCollect()
//
// if (ifAgreePrivacy) {
// LogEx.logDebug(TAG, "ifAgreePrivacy=$ifAgreePrivacy")
//
// AdmobMaxHelper.preloadAd(this)
//
// job = startProgress()
// binding.llStart.visibility = View.GONE
// binding.llProgress.visibility = View.VISIBLE
// } else {
// binding.llStart.visibility = View.VISIBLE
// binding.llProgress.visibility = View.GONE
// }
//
// val spannableString = SpannableString("Privacy Policy")
// spannableString.setSpan(
// UnderlineSpan(),
// 0,
// spannableString.length,
// Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
// )
// binding.idTvPrivacyPolicy.text = spannableString
//
// binding.idTvPrivacyPolicy.setOnClickListener {
// val intent = Intent(
// Intent.ACTION_VIEW,
// Uri.parse(ConfigHelper.privacyPolicy)
// )
// startActivity(intent)
// }
//
//
// }
//
// private fun progressCollect() {
// lifecycleScope.launch {
// progressFlow.collectLatest {
// if (it >= 100) {
// job?.cancel()
// LogEx.logDebug(TAG, "jumpNext")
// jumpNext()
// this.cancel()
// }
// }
// }
// }
//
// var jumped: Boolean = false
// private fun jumpNext() {
// if (jumped) {
// return
// return
// }
// }
// jumped = true
startStayNotification
()
// LogEx.logDebug(TAG, "jumpNext actionId=$actionId")
NotificationUtil
.
stopNotificationHandler
()
//
// when (actionId) {
actionId
=
intent
?.
extras
?.
getInt
(
"actionId"
)
?:
-
1
// ID_JUNK_CLEAN_PUSH -> {
closeNotification
()
// startActivity(Intent(this, ScanJunkActivity::class.java))
// }
progressCollect
()
//
// ID_SIMILAR_IMAGE -> {
if
(
ifAgreePrivacy
)
{
// startActivity(Intent(this, PhotoManagerAnimationActivity::class.java))
LogEx
.
logDebug
(
TAG
,
"ifAgreePrivacy=$ifAgreePrivacy"
)
// }
//
AdmobMaxHelper
.
preloadAd
(
this
)
// ID_SCREENSHOT_CLEAN -> {
// startActivity(Intent(this, PhotoManagerAnimationActivity::class.java))
job
=
startProgress
()
// }
binding
.
llStart
.
visibility
=
View
.
GONE
//
binding
.
llProgress
.
visibility
=
View
.
VISIBLE
// ID_RECOVERY_PHOTOS -> {
}
else
{
// startActivity(Intent(this, FileScanResultActivity::class.java).apply {
binding
.
llStart
.
visibility
=
View
.
VISIBLE
// putExtra("ScanType", ConstObject.SCAN_PHOTOS)
binding
.
llProgress
.
visibility
=
View
.
GONE
// })
}
// }
//
val
spannableString
=
SpannableString
(
"Privacy Policy"
)
// ID_RECOVERY_VIDEOS -> {
spannableString
.
setSpan
(
// startActivity(Intent(this, FileScanResultActivity::class.java).apply {
UnderlineSpan
(),
// putExtra("ScanType", ConstObject.SCAN_VIDEOS)
0
,
// })
spannableString
.
length
,
// }
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
//
)
// ID_RECOVERY_DOCUMENTS -> {
binding
.
idTvPrivacyPolicy
.
text
=
spannableString
// startActivity(Intent(this, FileScanResultActivity::class.java).apply {
// putExtra("ScanType", ConstObject.SCAN_DOCUMENTS)
binding
.
idTvPrivacyPolicy
.
setOnClickListener
{
// })
val
intent
=
Intent
(
// }
Intent
.
ACTION_VIEW
,
//
Uri
.
parse
(
ConfigHelper
.
privacyPolicy
)
// ID_PRIVACY_SPACE -> {
)
// if (privacyPinPassword.isNotEmpty()) {
startActivity
(
intent
)
// startActivity(Intent(this, PrivacyPinOneActivity::class.java))
}
// } else {
// startActivity(Intent(this, PrivacySpaceActivity::class.java).apply {
//
}
// })
// }
private
fun
progressCollect
()
{
// }
lifecycleScope
.
launch
{
//
progressFlow
.
collectLatest
{
// ID_WHATSAPP_CLEANER -> {
if
(
it
>=
100
)
{
// startActivity(Intent(this, WhatsAppCleanerAnimationActivity::class.java))
job
?.
cancel
()
// }
LogEx
.
logDebug
(
TAG
,
"jumpNext"
)
//
jumpNext
()
// ID_LARGE_FILE -> {
this
.
cancel
()
// startActivity(Intent(this, LargeFileAnimationActivity::class.java))
}
// }
}
//
}
// ID_APP_PROCESS -> {
}
// startActivity(Intent(this, AppProcessAnimationActivity::class.java))
// }
var
jumped
:
Boolean
=
false
//
private
fun
jumpNext
()
{
// ID_APP_MANAGER -> {
if
(
jumped
)
{
// startActivity(Intent(this, AppManagerAnimationActivity::class.java))
return
// }
}
//
jumped
=
true
// ID_BATTERY_INFO -> {
LogEx
.
logDebug
(
TAG
,
"jumpNext actionId=$actionId"
)
// startActivity(Intent(this, BatteryInfoAnimationActivity::class.java))
// }
when
(
actionId
)
{
//
ID_JUNK_CLEAN_PUSH
->
{
// else -> {
startActivity
(
Intent
(
this
,
ScanJunkActivity
::
class
.
java
))
// val isHotLaunch = intent?.extras?.getBoolean("isHotLaunch", false) ?: false
}
// if (!isHotLaunch) {
// if (!isGuide) {
ID_SIMILAR_IMAGE
->
{
// startActivity(Intent(this@SplashActivity, GuideActivity::class.java))
startActivity
(
Intent
(
this
,
PhotoManagerAnimationActivity
::
class
.
java
))
// } else {
}
// startActivity(Intent(this@SplashActivity, MainActivity::class.java))
// }
ID_SCREENSHOT_CLEAN
->
{
// }
startActivity
(
Intent
(
this
,
PhotoManagerAnimationActivity
::
class
.
java
))
// }
}
// }
// finish()
ID_RECOVERY_PHOTOS
->
{
// intent.extras?.clear()
startActivity
(
Intent
(
this
,
FileScanResultActivity
::
class
.
java
).
apply
{
// }
putExtra
(
"ScanType"
,
ConstObject
.
SCAN_PHOTOS
)
//
})
// private fun closeNotification() {
}
// sendBroadcast(Intent(this, CloseNotificationReceiver::class.java).apply {
// this.action = CloseNotificationReceiver.Action
ID_RECOVERY_VIDEOS
->
{
// this.putExtra(NotificationId, actionId)
startActivity
(
Intent
(
this
,
FileScanResultActivity
::
class
.
java
).
apply
{
// })
putExtra
(
"ScanType"
,
ConstObject
.
SCAN_VIDEOS
)
// }
})
//
}
// override fun initListener() {
//
ID_RECOVERY_DOCUMENTS
->
{
// binding.idTvStart.setOnClickListener {
startActivity
(
Intent
(
this
,
FileScanResultActivity
::
class
.
java
).
apply
{
// if (oneClickStart) {
putExtra
(
"ScanType"
,
ConstObject
.
SCAN_DOCUMENTS
)
// return@setOnClickListener
})
// }
}
// oneClickStart = true
// ifAgreePrivacy = true
ID_PRIVACY_SPACE
->
{
// (application as MyApplication).initApp(true)
if
(
privacyPinPassword
.
isNotEmpty
())
{
// AdmobMaxHelper.preloadAd(this)
startActivity
(
Intent
(
this
,
PrivacyPinOneActivity
::
class
.
java
))
// binding.llStart.visibility = View.GONE
}
else
{
// binding.llProgress.visibility = View.VISIBLE
startActivity
(
Intent
(
this
,
PrivacySpaceActivity
::
class
.
java
).
apply
{
// job = startProgress()
// }
})
// }
}
//
}
// private var processTime = 0L
// private var outTimeAdStart = false
ID_WHATSAPP_CLEANER
->
{
// private fun startProgress() = lifecycleScope.launch(Dispatchers.Main) {
startActivity
(
Intent
(
this
,
WhatsAppCleanerAnimationActivity
::
class
.
java
))
// LogEx.logDebug(TAG, "startProgress")
}
// while (isActive) {
// val value = binding.pb.progress + 2
ID_LARGE_FILE
->
{
// binding.pb.setProgress(value, true)
startActivity
(
Intent
(
this
,
LargeFileAnimationActivity
::
class
.
java
))
// progress.emit(value)
}
// val delayTime = 450L
// delay(delayTime)
ID_APP_PROCESS
->
{
// processTime += delayTime
startActivity
(
Intent
(
this
,
AppProcessAnimationActivity
::
class
.
java
))
// if (processTime >= 900L) {
}
// if (!outTimeAdStart) {
// outTimeAdStart = true
ID_APP_MANAGER
->
{
// outTimeAd()
startActivity
(
Intent
(
this
,
AppManagerAnimationActivity
::
class
.
java
))
// }
}
// }
// }
ID_BATTERY_INFO
->
{
// }
startActivity
(
Intent
(
this
,
BatteryInfoAnimationActivity
::
class
.
java
))
//
}
//
// private fun outTimeAd() {
else
->
{
// LogEx.logDebug(TAG, "outTimeAd")
val
isHotLaunch
=
intent
?.
extras
?.
getBoolean
(
"isHotLaunch"
,
false
)
?:
false
// var loaded: Boolean = true
if
(!
isHotLaunch
)
{
// AdmobMaxHelper.admobMaxShowOpenAd(this, showBeforeAction = { flag ->
if
(!
isGuide
)
{
// loaded = flag
startActivity
(
Intent
(
this
@SplashActivity
,
GuideActivity
::
class
.
java
))
// job?.cancel()
}
else
{
// }) {
startActivity
(
Intent
(
this
@SplashActivity
,
MainActivity
::
class
.
java
))
// val sp = AppPreferences.getInstance().getString("splashShowInter", "0").toInt()
}
// if (sp == 1 && !loaded) {
}
// AdmobMaxHelper.admobMaxShowInterstitialAd(this, false) {
}
// binding.pb.progress = 100
}
// jumpNext()
finish
()
// }
intent
.
extras
?.
clear
()
// } else {
}
// binding.pb.progress = 100
// jumpNext()
private
fun
closeNotification
()
{
// }
sendBroadcast
(
Intent
(
this
,
CloseNotificationReceiver
::
class
.
java
).
apply
{
// }
this
.
action
=
CloseNotificationReceiver
.
Action
// }
this
.
putExtra
(
NotificationId
,
actionId
)
//
})
// override fun onResume() {
}
// super.onResume()
// LogEx.logDebug(TAG, "onResume")
override
fun
initListener
()
{
// if (ifAgreePrivacy && job?.isActive == false) {
// job = startProgress()
binding
.
idTvStart
.
setOnClickListener
{
// }
if
(
oneClickStart
)
{
// }
return
@setOnClickListener
//
}
// override fun onPause() {
oneClickStart
=
true
// super.onPause()
ifAgreePrivacy
=
true
// job?.cancel()
(
application
as
MyApplication
).
initApp
(
true
)
// LogEx.logDebug(TAG, "onPause")
AdmobMaxHelper
.
preloadAd
(
this
)
// }
binding
.
llStart
.
visibility
=
View
.
GONE
//
binding
.
llProgress
.
visibility
=
View
.
VISIBLE
//
job
=
startProgress
()
//}
}
\ No newline at end of file
}
private
var
processTime
=
0L
private
var
outTimeAdStart
=
false
private
fun
startProgress
()
=
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
LogEx
.
logDebug
(
TAG
,
"startProgress"
)
while
(
isActive
)
{
val
value
=
binding
.
pb
.
progress
+
2
binding
.
pb
.
setProgress
(
value
,
true
)
progress
.
emit
(
value
)
val
delayTime
=
450L
delay
(
delayTime
)
processTime
+=
delayTime
if
(
processTime
>=
900L
)
{
if
(!
outTimeAdStart
)
{
outTimeAdStart
=
true
outTimeAd
()
}
}
}
}
private
fun
outTimeAd
()
{
LogEx
.
logDebug
(
TAG
,
"outTimeAd"
)
var
loaded
:
Boolean
=
true
AdmobMaxHelper
.
admobMaxShowOpenAd
(
this
,
showBeforeAction
=
{
flag
->
loaded
=
flag
job
?.
cancel
()
})
{
val
sp
=
AppPreferences
.
getInstance
().
getString
(
"splashShowInter"
,
"0"
).
toInt
()
if
(
sp
==
1
&&
!
loaded
)
{
AdmobMaxHelper
.
admobMaxShowInterstitialAd
(
this
,
false
)
{
binding
.
pb
.
progress
=
100
jumpNext
()
}
}
else
{
binding
.
pb
.
progress
=
100
jumpNext
()
}
}
}
override
fun
onResume
()
{
super
.
onResume
()
LogEx
.
logDebug
(
TAG
,
"onResume"
)
if
(
ifAgreePrivacy
&&
job
?.
isActive
==
false
)
{
job
=
startProgress
()
}
}
override
fun
onPause
()
{
super
.
onPause
()
job
?.
cancel
()
LogEx
.
logDebug
(
TAG
,
"onPause"
)
}
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/activity/splash/PrivacyManager.kt
0 → 100644
View file @
cad27b05
package
com.base.datarecovery.activity.splash
import
android.app.Activity
import
android.content.Intent
import
android.net.Uri
import
android.text.SpannableString
import
android.text.Spanned
import
android.text.style.UnderlineSpan
import
com.base.datarecovery.MyApplication
import
com.base.datarecovery.bean.ConstObject.ifAgreePrivacy
import
com.base.datarecovery.databinding.ActivitySplashBinding
import
com.base.datarecovery.help.ConfigHelper
class
PrivacyManager
(
private
val
binding
:
ActivitySplashBinding
,
private
val
context
:
Activity
,
private
val
listener
:
OnUserPrivacyAgreementListener
)
{
init
{
initView
()
}
private
fun
initView
()
{
val
spannableString
=
SpannableString
(
"Privacy Policy"
)
spannableString
.
setSpan
(
UnderlineSpan
(),
0
,
spannableString
.
length
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
)
binding
.
idTvPrivacyPolicy
.
text
=
spannableString
binding
.
idTvPrivacyPolicy
.
setOnClickListener
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
ConfigHelper
.
privacyPolicy
)
)
context
.
startActivity
(
intent
)
}
var
clicked
=
false
binding
.
idTvStart
.
setOnClickListener
{
if
(
clicked
)
{
return
@setOnClickListener
}
clicked
=
true
ifAgreePrivacy
=
true
(
context
.
application
as
MyApplication
).
initApp
()
listener
.
onAgreePrivacy
()
}
}
interface
OnUserPrivacyAgreementListener
{
fun
onAgreePrivacy
()
}
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/activity/splash/Splash2Activity.kt
0 → 100644
View file @
cad27b05
package
com.base.datarecovery.activity.splash
import
android.Manifest
import
android.annotation.SuppressLint
import
android.content.Intent
import
android.graphics.Color
import
android.os.Build
import
android.os.Handler
import
android.view.KeyEvent
import
androidx.activity.result.contract.ActivityResultContracts
import
com.base.datarecovery.MyApplication
import
com.base.datarecovery.ads.AdmobMaxHelper
import
com.base.datarecovery.bean.ConstObject.ifAgreePrivacy
import
com.base.datarecovery.databinding.ActivitySplashBinding
import
com.base.datarecovery.fcm.CloseNotificationReceiver
import
com.base.datarecovery.fcm.NotificationUtil
import
com.base.datarecovery.help.BaseActivity
import
com.base.datarecovery.service.StayNotificationService.Companion.startStayNotification
import
com.base.datarecovery.utils.BarUtils
import
com.base.datarecovery.utils.EventUtils
@SuppressLint
(
"CustomSplashScreen"
)
class
Splash2Activity
:
BaseActivity
<
ActivitySplashBinding
>(),
PrivacyManager
.
OnUserPrivacyAgreementListener
,
TaskManager
.
ProgressListener
{
private
val
TAG
=
"NewStartActivity"
private
fun
initStatusBar
()
{
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
if
(
Build
.
VERSION
.
SDK_INT
>=
33
)
{
registerForActivityResult
(
ActivityResultContracts
.
RequestPermission
())
{}.
launch
(
Manifest
.
permission
.
POST_NOTIFICATIONS
)
}
}
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
?):
Boolean
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
EventUtils
.
event
(
"back"
)
}
return
super
.
onKeyDown
(
keyCode
,
event
)
}
override
val
binding
:
ActivitySplashBinding
by
lazy
{
ActivitySplashBinding
.
inflate
(
layoutInflater
)
}
private
var
mTaskManager
:
TaskManager
?
=
null
var
jumpType
=
0
override
fun
initView
()
{
initStatusBar
()
if
(
isDestroyed
)
{
return
}
if
(
MyApplication
.
isInterOpenShowing
)
{
finish
()
return
}
NotificationUtil
.
stopNotificationHandler
()
jumpType
=
intent
.
getIntExtra
(
"actionId"
,
0
)
closeNotification
()
mTaskManager
=
TaskManager
(
binding
,
this
)
if
(
ifAgreePrivacy
)
{
onAgreePrivacy
()
}
else
{
PrivacyManager
(
binding
,
this
,
this
)
}
}
private
fun
closeNotification
()
{
sendBroadcast
(
Intent
(
this
,
CloseNotificationReceiver
::
class
.
java
).
apply
{
this
.
action
=
CloseNotificationReceiver
.
Action
this
.
putExtra
(
CloseNotificationReceiver
.
NotificationId
,
jumpType
)
})
}
override
fun
onAgreePrivacy
()
{
EventUtils
.
event
(
"app_start"
)
if
(
jumpType
==
0
)
{
startStayNotification
()
}
mTaskManager
?.
startProgress
()
loadAd
()
}
override
fun
onProgressMax
()
{
Handler
().
postDelayed
({
StartUtils
.
jumpNextPage
(
this
)
},
500
)
}
private
fun
loadAd
()
{
AdmobMaxHelper
.
admobMaxShowOpenAd
(
this
,
{
mTaskManager
?.
pauseProgress
()
},
{
mTaskManager
?.
pauseProgress
()
runOnUiThread
{
mTaskManager
?.
maxProgress
()
}
})
}
override
fun
onNewIntent
(
intent
:
Intent
)
{
super
.
onNewIntent
(
intent
)
setIntent
(
intent
)
}
private
var
isPause
=
false
override
fun
onStart
()
{
super
.
onStart
()
isPause
=
false
}
override
fun
onPause
()
{
super
.
onPause
()
isPause
=
true
EventUtils
.
event
(
"onPause"
)
}
override
fun
onResume
()
{
super
.
onResume
()
isPause
=
false
EventUtils
.
event
(
"onResume"
)
}
override
fun
onStop
()
{
super
.
onStop
()
isPause
=
true
}
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/activity/splash/StartUtils.kt
0 → 100644
View file @
cad27b05
package
com.base.datarecovery.activity.splash
import
android.app.Activity
import
android.content.Intent
import
android.util.Log
import
com.base.datarecovery.activity.MainActivity
import
com.base.datarecovery.activity.appmanager.AppManagerAnimationActivity
import
com.base.datarecovery.activity.appprocess.AppProcessAnimationActivity
import
com.base.datarecovery.activity.battery.BatteryInfoAnimationActivity
import
com.base.datarecovery.activity.guide.GuideActivity
import
com.base.datarecovery.activity.junkclean.ScanJunkActivity
import
com.base.datarecovery.activity.photomanager.PhotoManagerAnimationActivity
import
com.base.datarecovery.activity.recovery.FileScanResultActivity
import
com.base.datarecovery.activity.whatsapp.WhatsAppCleanerAnimationActivity
import
com.base.datarecovery.bean.ConstObject
import
com.base.datarecovery.bean.ConstObject.ID_APP_MANAGER
import
com.base.datarecovery.bean.ConstObject.ID_APP_PROCESS
import
com.base.datarecovery.bean.ConstObject.ID_BATTERY_INFO
import
com.base.datarecovery.bean.ConstObject.ID_JUNK_CLEAN_PUSH
import
com.base.datarecovery.bean.ConstObject.ID_RECOVERY_DOCUMENTS
import
com.base.datarecovery.bean.ConstObject.ID_RECOVERY_PHOTOS
import
com.base.datarecovery.bean.ConstObject.ID_RECOVERY_VIDEOS
import
com.base.datarecovery.bean.ConstObject.ID_SCREENSHOT_CLEAN
import
com.base.datarecovery.bean.ConstObject.ID_SIMILAR_IMAGE
import
com.base.datarecovery.bean.ConstObject.ID_WHATSAPP_CLEANER
import
com.base.datarecovery.bean.ConstObject.isGuide
object
StartUtils
{
private
val
TAG
=
"SplashJumpUtils"
fun
jumpNextPage
(
context
:
Activity
)
{
var
jumpType
=
context
.
intent
.
getIntExtra
(
"actionId"
,
0
)
Log
.
e
(
TAG
,
"actionId: $jumpType"
)
if
(
jumpType
==
0
)
{
val
uri
=
context
.
intent
.
data
val
str
=
(
uri
?.
getQueryParameter
(
"type"
)
?:
"0"
)
jumpType
=
str
.
toIntOrNull
()
?:
0
if
(
jumpType
!=
0
)
{
}
}
when
(
jumpType
)
{
//=================================主动广播=======================================
ID_JUNK_CLEAN_PUSH
->
{
context
.
startActivity
(
Intent
(
context
,
ScanJunkActivity
::
class
.
java
))
}
ID_SIMILAR_IMAGE
->
{
context
.
startActivity
(
Intent
(
context
,
PhotoManagerAnimationActivity
::
class
.
java
))
}
ID_SCREENSHOT_CLEAN
->
{
context
.
startActivity
(
Intent
(
context
,
PhotoManagerAnimationActivity
::
class
.
java
))
}
ID_RECOVERY_PHOTOS
->
{
context
.
startActivity
(
Intent
(
context
,
FileScanResultActivity
::
class
.
java
).
putExtra
(
"ScanType"
,
ConstObject
.
SCAN_PHOTOS
)
)
}
ID_RECOVERY_VIDEOS
->
{
context
.
startActivity
(
Intent
(
context
,
FileScanResultActivity
::
class
.
java
).
putExtra
(
"ScanType"
,
ConstObject
.
SCAN_VIDEOS
)
)
}
ID_RECOVERY_DOCUMENTS
->
{
context
.
startActivity
(
Intent
(
context
,
FileScanResultActivity
::
class
.
java
).
putExtra
(
"ScanType"
,
ConstObject
.
SCAN_DOCUMENTS
)
)
}
ID_WHATSAPP_CLEANER
->
{
context
.
startActivity
(
Intent
(
context
,
WhatsAppCleanerAnimationActivity
::
class
.
java
))
}
ID_APP_PROCESS
->
{
context
.
startActivity
(
Intent
(
context
,
AppProcessAnimationActivity
::
class
.
java
))
}
ID_APP_MANAGER
->
{
context
.
startActivity
(
Intent
(
context
,
AppManagerAnimationActivity
::
class
.
java
))
}
ID_BATTERY_INFO
->
{
context
.
startActivity
(
Intent
(
context
,
BatteryInfoAnimationActivity
::
class
.
java
))
}
//================================被动广播=========================================
else
->
{
val
isHotLaunch
=
context
.
intent
?.
extras
?.
getBoolean
(
"isHotLaunch"
,
false
)
?:
false
if
(!
isHotLaunch
)
{
if
(!
isGuide
)
{
context
.
startActivity
(
Intent
(
context
,
GuideActivity
::
class
.
java
))
isGuide
=
true
}
else
{
context
.
startActivity
(
Intent
(
context
,
MainActivity
::
class
.
java
))
}
}
}
}
context
.
finish
()
}
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/activity/splash/TaskManager.kt
0 → 100644
View file @
cad27b05
package
com.base.datarecovery.activity.splash
import
android.os.Handler
import
android.view.View
import
androidx.core.view.isVisible
import
com.base.datarecovery.databinding.ActivitySplashBinding
class
TaskManager
{
private
val
binding
:
ActivitySplashBinding
private
var
mHandler
:
Handler
private
var
mIsPaused
=
false
private
var
mProgress
=
0
private
val
listener
:
ProgressListener
constructor
(
binding
:
ActivitySplashBinding
,
listener
:
ProgressListener
)
{
this
.
binding
=
binding
this
.
listener
=
listener
mHandler
=
Handler
()
initView
()
}
var
loadTime
:
Int
=
15
private
fun
initView
()
{
//loadTime = SPUtils.getInstance().getInt("loading_page_time", 15)
binding
.
pb
.
max
=
loadTime
binding
.
pb
.
progress
=
0
}
fun
startProgress
()
{
binding
.
idTvStart
.
isVisible
=
false
binding
.
llStart
.
visibility
=
View
.
GONE
binding
.
llProgress
.
visibility
=
View
.
VISIBLE
val
mRunnable
:
Runnable
=
object
:
Runnable
{
override
fun
run
()
{
if
(!
mIsPaused
)
{
mProgress
++
// 计算进度
binding
.
pb
.
progress
=
mProgress
if
(
mProgress
<
loadTime
)
{
mHandler
.
postDelayed
(
this
,
1000
)
// 每秒钟更新一次进度
}
else
{
listener
.
onProgressMax
()
pauseProgress
()
}
}
}
}
mHandler
.
postDelayed
(
mRunnable
,
1000
)
}
fun
pauseProgress
()
{
if
(!
mIsPaused
)
{
mIsPaused
=
true
mHandler
.
removeCallbacksAndMessages
(
null
)
}
}
fun
maxProgress
()
{
binding
.
pb
.
progress
=
binding
.
pb
.
max
listener
.
onProgressMax
()
}
interface
ProgressListener
{
fun
onProgressMax
()
}
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
View file @
cad27b05
...
@@ -14,7 +14,7 @@ import androidx.core.app.NotificationCompat
...
@@ -14,7 +14,7 @@ import androidx.core.app.NotificationCompat
import
androidx.core.graphics.drawable.IconCompat
import
androidx.core.graphics.drawable.IconCompat
import
com.base.datarecovery.MyApplication
import
com.base.datarecovery.MyApplication
import
com.base.datarecovery.R
import
com.base.datarecovery.R
import
com.base.datarecovery.activity.
Splash
Activity
import
com.base.datarecovery.activity.
splash.Splash2
Activity
import
com.base.datarecovery.ads.AdDisplayUtils
import
com.base.datarecovery.ads.AdDisplayUtils
import
com.base.datarecovery.bean.ConstObject.ID_APP_MANAGER
import
com.base.datarecovery.bean.ConstObject.ID_APP_MANAGER
import
com.base.datarecovery.bean.ConstObject.ID_APP_PROCESS
import
com.base.datarecovery.bean.ConstObject.ID_APP_PROCESS
...
@@ -149,7 +149,7 @@ object NotificationUtil {
...
@@ -149,7 +149,7 @@ object NotificationUtil {
)
)
//跳转
//跳转
val
intent
=
Intent
(
context
,
SplashActivity
::
class
.
java
)
val
intent
=
Intent
(
context
,
Splash
2
Activity
::
class
.
java
)
intent
.
putExtra
(
"actionId"
,
actionId
)
intent
.
putExtra
(
"actionId"
,
actionId
)
val
btnRequestCode
=
Random
().
nextInt
(
1000
)
val
btnRequestCode
=
Random
().
nextInt
(
1000
)
val
btnPendingIntent
=
val
btnPendingIntent
=
...
@@ -299,13 +299,13 @@ object NotificationUtil {
...
@@ -299,13 +299,13 @@ object NotificationUtil {
for
(
i
in
1
..
num
)
{
for
(
i
in
1
..
num
)
{
val
time
=
i
*
delay
val
time
=
i
*
delay
handler
?.
postDelayed
(
Runnable
{
handler
?.
postDelayed
(
Runnable
{
if
(
MyApplication
.
PAUSED_VALUE
==
=
1
)
{
if
(
MyApplication
.
PAUSED_VALUE
==
1
)
{
if
(
handler
!=
null
)
{
if
(
handler
!=
null
)
{
handler
?.
removeCallbacksAndMessages
(
null
)
handler
?.
removeCallbacksAndMessages
(
null
)
}
}
return
@Runnable
return
@Runnable
}
}
if
(
MyApplication
.
PAUSED_VALUE
!=
=
1
&&
ScreenStatusReceiver
.
isDeviceInteractive
()
&&
!
ScreenStatusReceiver
.
isSecureLockActive
())
{
if
(
MyApplication
.
PAUSED_VALUE
!=
1
&&
ScreenStatusReceiver
.
isDeviceInteractive
()
&&
!
ScreenStatusReceiver
.
isSecureLockActive
())
{
sendNotification
(
context
,
actionId
)
sendNotification
(
context
,
actionId
)
}
}
},
time
)
},
time
)
...
...
app/src/main/java/com/base/datarecovery/help/ConfigHelper.kt
View file @
cad27b05
package
com.base.datarecovery.help
package
com.base.datarecovery.help
import
com.base.datarecovery.activity.SplashActivity
import
com.base.datarecovery.activity.splash.Splash2Activity
object
ConfigHelper
{
object
ConfigHelper
{
...
@@ -39,7 +40,7 @@ object ConfigHelper {
...
@@ -39,7 +40,7 @@ object ConfigHelper {
"full"
,
// 过滤全屏广告
"full"
,
// 过滤全屏广告
"adActivity"
,
"adActivity"
,
"AppLovinFullscreenActivity"
,
"AppLovinFullscreenActivity"
,
SplashActivity
::
class
.
java
.
simpleName
Splash
2
Activity
::
class
.
java
.
simpleName
// 返回前台时不跳转启动页的 activity
// 返回前台时不跳转启动页的 activity
)
)
...
...
app/src/main/java/com/base/datarecovery/service/StayNotificationService.kt
View file @
cad27b05
...
@@ -15,10 +15,9 @@ import android.os.Build
...
@@ -15,10 +15,9 @@ import android.os.Build
import
android.os.IBinder
import
android.os.IBinder
import
android.widget.RemoteViews
import
android.widget.RemoteViews
import
androidx.core.app.NotificationCompat
import
androidx.core.app.NotificationCompat
import
androidx.core.graphics.drawable.IconCompat
import
com.base.datarecovery.R
import
com.base.datarecovery.R
import
com.base.datarecovery.activity.MainActivity
import
com.base.datarecovery.activity.MainActivity
import
com.base.datarecovery.activity.
Splash
Activity
import
com.base.datarecovery.activity.
splash.Splash2
Activity
import
com.base.datarecovery.bean.ConstObject
import
com.base.datarecovery.bean.ConstObject
import
com.base.datarecovery.bean.ConstObject.SCAN_DOCUMENTS
import
com.base.datarecovery.bean.ConstObject.SCAN_DOCUMENTS
import
com.base.datarecovery.bean.ConstObject.SCAN_PHOTOS
import
com.base.datarecovery.bean.ConstObject.SCAN_PHOTOS
...
@@ -59,7 +58,7 @@ class StayNotificationService : Service() {
...
@@ -59,7 +58,7 @@ class StayNotificationService : Service() {
val
expendView
=
RemoteViews
(
context
.
packageName
,
R
.
layout
.
stay_notification_big
)
val
expendView
=
RemoteViews
(
context
.
packageName
,
R
.
layout
.
stay_notification_big
)
val
requestCode1
=
Random
.
nextInt
(
1800
)
val
requestCode1
=
Random
.
nextInt
(
1800
)
val
intent0
=
Intent
(
context
,
SplashActivity
::
class
.
java
).
apply
{
val
intent0
=
Intent
(
context
,
Splash
2
Activity
::
class
.
java
).
apply
{
putExtra
(
"actionId"
,
ConstObject
.
ID_JUNK_CLEAN_PUSH
)
putExtra
(
"actionId"
,
ConstObject
.
ID_JUNK_CLEAN_PUSH
)
}
}
val
pendingIntent0
=
val
pendingIntent0
=
...
@@ -68,7 +67,7 @@ class StayNotificationService : Service() {
...
@@ -68,7 +67,7 @@ class StayNotificationService : Service() {
expendView
.
setOnClickPendingIntent
(
R
.
id
.
id_ll_clean
,
pendingIntent0
)
expendView
.
setOnClickPendingIntent
(
R
.
id
.
id_ll_clean
,
pendingIntent0
)
val
requestCode2
=
Random
.
nextInt
(
1800
)
val
requestCode2
=
Random
.
nextInt
(
1800
)
val
intent2
=
Intent
(
context
,
SplashActivity
::
class
.
java
).
apply
{
val
intent2
=
Intent
(
context
,
Splash
2
Activity
::
class
.
java
).
apply
{
putExtra
(
"actionId"
,
ConstObject
.
ID_RECOVERY_PHOTOS
)
putExtra
(
"actionId"
,
ConstObject
.
ID_RECOVERY_PHOTOS
)
putExtra
(
"ScanType"
,
SCAN_PHOTOS
)
putExtra
(
"ScanType"
,
SCAN_PHOTOS
)
}
}
...
@@ -78,7 +77,7 @@ class StayNotificationService : Service() {
...
@@ -78,7 +77,7 @@ class StayNotificationService : Service() {
expendView
.
setOnClickPendingIntent
(
R
.
id
.
id_recovery_photos
,
pendingIntent2
)
expendView
.
setOnClickPendingIntent
(
R
.
id
.
id_recovery_photos
,
pendingIntent2
)
val
requestCode3
=
Random
.
nextInt
(
1800
)
val
requestCode3
=
Random
.
nextInt
(
1800
)
val
intent3
=
Intent
(
context
,
SplashActivity
::
class
.
java
).
apply
{
val
intent3
=
Intent
(
context
,
Splash
2
Activity
::
class
.
java
).
apply
{
putExtra
(
"actionId"
,
ConstObject
.
ID_RECOVERY_VIDEOS
)
putExtra
(
"actionId"
,
ConstObject
.
ID_RECOVERY_VIDEOS
)
putExtra
(
"ScanType"
,
SCAN_VIDEOS
)
putExtra
(
"ScanType"
,
SCAN_VIDEOS
)
}
}
...
@@ -96,7 +95,7 @@ class StayNotificationService : Service() {
...
@@ -96,7 +95,7 @@ class StayNotificationService : Service() {
// expendView.setOnClickPendingIntent(R.id.id_screenshot, pendingIntent4)
// expendView.setOnClickPendingIntent(R.id.id_screenshot, pendingIntent4)
val
requestCode4
=
Random
.
nextInt
(
1800
)
val
requestCode4
=
Random
.
nextInt
(
1800
)
val
intent4
=
Intent
(
context
,
SplashActivity
::
class
.
java
).
apply
{
val
intent4
=
Intent
(
context
,
Splash
2
Activity
::
class
.
java
).
apply
{
putExtra
(
"actionId"
,
ConstObject
.
ID_RECOVERY_DOCUMENTS
)
putExtra
(
"actionId"
,
ConstObject
.
ID_RECOVERY_DOCUMENTS
)
putExtra
(
"ScanType"
,
SCAN_DOCUMENTS
)
putExtra
(
"ScanType"
,
SCAN_DOCUMENTS
)
}
}
...
...
app/src/main/res/mipmap-xxhdpi/zhanweitu2.png
View replaced file @
360af580
View file @
cad27b05
118 KB
|
W:
|
H:
10.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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