Commit ecd3cb54 authored by Mygod's avatar Mygod

Code styling

parent b0d0be1f
...@@ -146,7 +146,7 @@ class App : Application() { ...@@ -146,7 +146,7 @@ class App : Application() {
val assetManager = assets val assetManager = assets
for (dir in arrayOf("acl", "overture")) for (dir in arrayOf("acl", "overture"))
try { try {
for (file in assetManager.list(dir)) assetManager.open(dir + '/' + file).use { input -> for (file in assetManager.list(dir)) assetManager.open("$dir/$file").use { input ->
File(deviceContext.filesDir, file).outputStream().use { output -> input.copyTo(output) } File(deviceContext.filesDir, file).outputStream().use { output -> input.copyTo(output) }
} }
} catch (e: IOException) { } catch (e: IOException) {
......
...@@ -72,8 +72,7 @@ object LocalDnsService { ...@@ -72,8 +72,7 @@ object LocalDnsService {
.put("MinimumTTL", 120) .put("MinimumTTL", 120)
.put("CacheSize", 4096) .put("CacheSize", 4096)
val remoteDns = JSONArray(profile.remoteDns.split(",") val remoteDns = JSONArray(profile.remoteDns.split(",")
.mapIndexed { i, dns -> makeDns("UserDef-" + i, .mapIndexed { i, dns -> makeDns("UserDef-$i", dns.trim() + ":53", 9) })
dns.trim() + ":53", 9) })
val localDns = JSONArray(arrayOf( val localDns = JSONArray(arrayOf(
makeDns("Primary-1", "208.67.222.222:443", 3, false), makeDns("Primary-1", "208.67.222.222:443", 3, false),
makeDns("Primary-2", "119.29.29.29:53", 3, false), makeDns("Primary-2", "119.29.29.29:53", 3, false),
......
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