Commit f8e9eca7 authored by wanglei's avatar wanglei

...

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