Fix IOException in direct boot

This commit is contained in:
Mygod
2018-12-29 00:29:56 +08:00
parent cfada8d0c2
commit 1ced7566f5
2 changed files with 2 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ class P2pSupplicantConfiguration(private val group: WifiP2pGroup, ownerAddress:
block[block.ssidLine!!] = "\tssid=" + ssid.toByteArray()
.joinToString("") { (it.toInt() and 255).toString(16).padStart(2, '0') }
block[block.pskLine!!] = "\tpsk=\"$psk\"" // no control chars or weird stuff
val tempFile = File.createTempFile("vpnhotspot-", ".conf", app.cacheDir)
val tempFile = File.createTempFile("vpnhotspot-", ".conf", app.deviceStorage.cacheDir)
try {
tempFile.printWriter().use { writer ->
lines.forEach { writer.println(it) }