Skip to content

Commit 099d798

Browse files
committed
chore: fix mistake on setup banner ad
1 parent 2d86d73 commit 099d798

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

app/src/main/java/juniojsv/mtk/easy/su/MainActivity.kt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ import kotlinx.coroutines.withContext
3131
import retrofit2.Retrofit
3232
import retrofit2.await
3333
import retrofit2.converter.gson.GsonConverterFactory
34-
import java.util.Timer
35-
import java.util.TimerTask
3634
import kotlin.coroutines.CoroutineContext
3735

3836
class MainActivity : AppCompatActivity(), CoroutineScope {
@@ -201,18 +199,7 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
201199
}
202200

203201
private fun onSetupBannerAd() {
204-
fun onLoadNewAd() = launch(Dispatchers.Main) {
205-
binding.mBannerAd.loadAd(AdRequest.Builder().build())
206-
}
207-
208-
Timer().scheduleAtFixedRate(
209-
object : TimerTask() {
210-
override fun run() {
211-
onLoadNewAd()
212-
}
213-
},
214-
0, 3000,
215-
)
202+
binding.mBannerAd.loadAd(AdRequest.Builder().build())
216203
}
217204

218205
private fun onLoadFullScreenAd(onComplete: (error: LoadAdError?) -> Unit) =

0 commit comments

Comments
 (0)