Commit f5e9c787 authored by Mygod's avatar Mygod

Do not ignore exceptions when flattening

parent 86c21de6
...@@ -153,13 +153,8 @@ class Acl { ...@@ -153,13 +153,8 @@ class Acl {
suspend fun flatten(depth: Int, connect: suspend (URL) -> URLConnection): Acl { suspend fun flatten(depth: Int, connect: suspend (URL) -> URLConnection): Acl {
if (depth > 0) for (url in urls.asIterable()) { if (depth > 0) for (url in urls.asIterable()) {
val child = Acl() val child = Acl().fromReader(connect(url).getInputStream().bufferedReader(), bypass)
try { child.flatten(depth - 1, connect)
child.fromReader(connect(url).getInputStream().bufferedReader(), bypass).flatten(depth - 1, connect)
} catch (e: IOException) {
e.printStackTrace()
continue
}
if (bypass != child.bypass) { if (bypass != child.bypass) {
Crashlytics.log(Log.WARN, TAG, "Imported network ACL has a conflicting mode set. " + Crashlytics.log(Log.WARN, TAG, "Imported network ACL has a conflicting mode set. " +
"This will probably not work as intended. URL: $url") "This will probably not work as intended. URL: $url")
......
...@@ -76,7 +76,8 @@ ...@@ -76,7 +76,8 @@
android:process=":bg" android:process=":bg"
android:directBootAware="true" android:directBootAware="true"
android:icon="@drawable/ic_service_active" android:icon="@drawable/ic_service_active"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"> android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
tools:targetApi="n">
<intent-filter> <intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" /> <action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter> </intent-filter>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment