Skip to content

Commit 5c7d52c

Browse files
committed
fix: Log errors and warnings when compiling resources
1 parent 841d612 commit 5c7d52c

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import android.os.Handler
99
import android.os.Looper
1010
import app.revanced.library.ApkUtils
1111
import app.revanced.library.ApkUtils.applyTo
12-
import app.revanced.library.installation.installer.LocalInstaller
1312
import app.revanced.manager.flutter.utils.Aapt
1413
import app.revanced.manager.flutter.utils.packageInstaller.InstallerReceiver
1514
import app.revanced.manager.flutter.utils.packageInstaller.UninstallerReceiver
@@ -169,7 +168,8 @@ class MainActivity : FlutterActivity() {
169168
putValue(option.default)
170169

171170
option.values?.let { values ->
172-
put("values",
171+
put(
172+
"values",
173173
JSONObject().apply {
174174
values.forEach { (key, value) ->
175175
putValue(value, key)
@@ -257,16 +257,19 @@ class MainActivity : FlutterActivity() {
257257

258258
// Setup logger
259259
Logger.getLogger("").apply {
260-
handlers.forEach {
261-
it.close()
262-
removeHandler(it)
260+
handlers.forEach { handler ->
261+
handler.close()
262+
removeHandler(handler)
263263
}
264264

265265
object : java.util.logging.Handler() {
266266
override fun publish(record: LogRecord) {
267-
if (record.loggerName?.startsWith("app.revanced") != true || cancel) return
268-
269-
updateProgress(-1.0, "", record.message)
267+
if (cancel) return
268+
if (
269+
record.loggerName?.startsWith("app.revanced") == true ||
270+
// Logger in class brut.util.OS.
271+
record.loggerName == ""
272+
) updateProgress(-1.0, "", record.message)
270273
}
271274

272275
override fun flush() = Unit

0 commit comments

Comments
 (0)