From 099d798126f63b6659e32cda7b336c5886e43af9 Mon Sep 17 00:00:00 2001 From: JunioJsv Date: Thu, 9 Nov 2023 19:25:48 -0300 Subject: [PATCH] chore: fix mistake on setup banner ad --- .../java/juniojsv/mtk/easy/su/MainActivity.kt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/app/src/main/java/juniojsv/mtk/easy/su/MainActivity.kt b/app/src/main/java/juniojsv/mtk/easy/su/MainActivity.kt index 148f041..03904f9 100644 --- a/app/src/main/java/juniojsv/mtk/easy/su/MainActivity.kt +++ b/app/src/main/java/juniojsv/mtk/easy/su/MainActivity.kt @@ -31,8 +31,6 @@ import kotlinx.coroutines.withContext import retrofit2.Retrofit import retrofit2.await import retrofit2.converter.gson.GsonConverterFactory -import java.util.Timer -import java.util.TimerTask import kotlin.coroutines.CoroutineContext class MainActivity : AppCompatActivity(), CoroutineScope { @@ -201,18 +199,7 @@ class MainActivity : AppCompatActivity(), CoroutineScope { } private fun onSetupBannerAd() { - fun onLoadNewAd() = launch(Dispatchers.Main) { - binding.mBannerAd.loadAd(AdRequest.Builder().build()) - } - - Timer().scheduleAtFixedRate( - object : TimerTask() { - override fun run() { - onLoadNewAd() - } - }, - 0, 3000, - ) + binding.mBannerAd.loadAd(AdRequest.Builder().build()) } private fun onLoadFullScreenAd(onComplete: (error: LoadAdError?) -> Unit) =