Commit f8e9eca7 authored by wanglei's avatar wanglei

...

parent 07bb4cdc
......@@ -130,8 +130,13 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
}
}
var jumped: Boolean = false
private fun jumpNext() {
LogEx.logDebug(TAG, " when (actionId) {:jumpNext: " + actionId)
if (jumped) {
return
}
jumped = true
LogEx.logDebug(TAG, "jumpNext actionId=$actionId")
when (actionId) {
ID_JUNK_CLEAN_PUSH -> {
......@@ -220,18 +225,12 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
val value = binding.pb.progress + 2
binding.pb.setProgress(value, true)
progress.emit(value)
LogEx.logDebug(TAG, "startProgress:" + isActive + " progress.emit(value)")
val delayTime = 450L
delay(delayTime)
LogEx.logDebug(TAG, "startProgress:" + isActive + " delay(delayTime)")
processTime += delayTime
LogEx.logDebug(TAG, "startProgress:" + isActive + " processTime += delayTime")
if (processTime >= Random.nextLong(3000, 4000)) {
LogEx.logDebug(TAG, "startProgress:" + isActive + " Random.nextLong(3000, 4000)")
if (!outTimeAdStart) {
outTimeAdStart = true
LogEx.logDebug(TAG, "outTimeAd:" + isActive)
outTimeAd()
}
}
......@@ -244,6 +243,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
AdmobMaxHelper.admobMaxShowOpenAd(this, showBeforeAction = {
job?.cancel()
}) {
LogEx.logDebug(TAG, "onHide")
binding.pb.progress = 100
jumpNext()
}
......
......@@ -16,6 +16,7 @@ import com.base.datarecovery.help.BaseActivity
import com.base.datarecovery.help.PermissionHelp.checkStorePermission
import com.base.datarecovery.help.PermissionHelp.requestStorePermission
import com.base.datarecovery.utils.BarUtils
import com.base.datarecovery.utils.LogEx
import com.base.datarecovery.view.DialogViews.showGerPermission
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
......@@ -34,6 +35,7 @@ class ScanJunkActivity : BaseActivity<ActivityLayoutScanJunkBinding>() {
private var job: Job? = null
override fun initView() {
LogEx.logDebug(TAG,"ScanJunkActivity initView")
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
......
......@@ -41,8 +41,8 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
override fun setListener() {
binding.flScan.setOnClickListener {
startActivity(Intent(requireContext(), ScanJunkActivity::class.java))
// sendNotification(requireContext(), ConstObject.ID_JUNK_CLEAN_PUSH)
// startActivity(Intent(requireContext(), ScanJunkActivity::class.java))
sendNotification(requireContext(), ConstObject.ID_JUNK_CLEAN_PUSH)
}
binding.flRyPhoto.setOnClickListener {
startActivity(Intent(requireContext(), FileScanResultActivity::class.java).apply {
......
......@@ -9,11 +9,11 @@ object LogEx {
"FileScanActivity",
"FileHexEx",
"FileGridAdapter",
"com.base.datarecovery.utils.EventUtils",
"EventUtils",
"ReportUtils"
)
fun logDebug(tag: String, content: String, isMust: Boolean = false) {
fun logDebug(tag: String, content: String, isMust: Boolean = true) {
if (isMust) {
Log.e(tag, content)
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment