Refinements
This commit is contained in:
@@ -134,7 +134,7 @@ class RepeaterService : Service(), WifiP2pManager.ChannelListener, SharedPrefere
|
||||
p2pManager = getSystemService()!!
|
||||
onChannelDisconnected()
|
||||
app.pref.registerOnSharedPreferenceChangeListener(this)
|
||||
} catch (exc: KotlinNullPointerException) {
|
||||
} catch (exc: RuntimeException) {
|
||||
exc.printStackTrace()
|
||||
Crashlytics.logException(exc)
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.io.InputStream
|
||||
private const val NOISYSU_TAG = "NoisySU"
|
||||
private const val NOISYSU_SUFFIX = "SUCCESS\n"
|
||||
|
||||
private class SuFailure : RuntimeException()
|
||||
private class SuFailure(msg: String?) : RuntimeException(msg)
|
||||
|
||||
fun loggerSuStream(command: String): InputStream? {
|
||||
val process = try {
|
||||
@@ -44,7 +44,7 @@ echo $NOISYSU_SUFFIX""")
|
||||
out = out?.removeSuffix(NOISYSU_SUFFIX)
|
||||
if (!out.isNullOrBlank()) {
|
||||
Crashlytics.log(Log.INFO, NOISYSU_TAG, out)
|
||||
if (report) Crashlytics.logException(SuFailure())
|
||||
if (report) Crashlytics.logException(SuFailure(out))
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user