Skip to content

Commit 4f7ec8e

Browse files
committed
Fix a deprecation
1 parent 6a65d70 commit 4f7ec8e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sample/src/main/java/info/hannes/logcat/CrashlyticApplication.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package info.hannes.logcat
33
import android.annotation.SuppressLint
44
import android.app.Application
55
import android.os.Handler
6+
import android.os.Looper
67
import android.provider.Settings
78
import com.google.firebase.crashlytics.FirebaseCrashlytics
89
import info.hannes.crashlytic.CrashlyticsTree
@@ -33,10 +34,10 @@ class CrashlyticApplication : Application() {
3334
override fun run() {
3435
Timber.d("live=$x")
3536
x++
36-
Handler().postDelayed(this, 3000)
37+
Handler(Looper.getMainLooper()).postDelayed(this, 3000)
3738
}
3839
}
3940

40-
Handler().postDelayed(runner, 3000)
41+
Handler(Looper.getMainLooper()).postDelayed(runner, 3000)
4142
}
4243
}

0 commit comments

Comments
 (0)