Fix InvalidConfigurationError

This commit is contained in:
Mygod
2018-10-04 15:50:07 +08:00
parent 48d6307b2b
commit 395e5da871
2 changed files with 2 additions and 2 deletions

View File

@@ -172,7 +172,7 @@ class RepeaterManager(private val parent: TetheringFragment) : Manager(), Servic
data.getParcelableExtra<P2pSupplicantConfiguration>(WifiP2pDialogFragment.KEY_CONFIGURER)
.update(data.getParcelableExtra(WifiP2pDialogFragment.KEY_CONFIGURATION))
app.handler.postDelayed(binder!!::requestGroupUpdate, 1000)
} catch (e: RuntimeException) {
} catch (e: Exception) {
Timber.w(e)
SmartSnackbar.make(e.localizedMessage).show()
}

View File

@@ -31,7 +31,7 @@ class P2pSupplicantConfiguration(private val initContent: String? = null) : Parc
private val confPath = if (Build.VERSION.SDK_INT >= 28)
"/data/vendor/wifi/wpa/p2p_supplicant.conf" else "/data/misc/wifi/p2p_supplicant.conf"
}
private class InvalidConfigurationError : IOException()
private class InvalidConfigurationError : IOException("Invalid configuration")
override fun writeToParcel(out: Parcel, flags: Int) {
out.writeString(if (contentDelegate.isInitialized()) content else null)