From 5a39f7cddefdb22510590a3460d3f4823ec1e58e Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 14 Feb 2022 02:28:48 -0800 Subject: [PATCH] Reduce duplicate initialization --- .../java/com/topjohnwu/magisk/core/utils/RootRegistry.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/core/utils/RootRegistry.kt b/app/src/main/java/com/topjohnwu/magisk/core/utils/RootRegistry.kt index ca79cf317..a5587960e 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/utils/RootRegistry.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/utils/RootRegistry.kt @@ -12,11 +12,7 @@ import kotlin.system.exitProcess class RootRegistry(stub: Any?) : RootService() { - constructor() : this(null) - - private val className: String? = stub?.javaClass?.name - - init { + constructor() : this(null) { // Always log full stack trace with Timber Timber.plant(Timber.DebugTree()) Thread.setDefaultUncaughtExceptionHandler { _, e -> @@ -25,6 +21,8 @@ class RootRegistry(stub: Any?) : RootService() { } } + private val className: String? = stub?.javaClass?.name + override fun onBind(intent: Intent): IBinder { // TODO: PLACEHOLDER return Binder()