Migrate to ktx API

This commit is contained in:
Mygod
2020-04-20 03:29:05 +08:00
parent cf2beb8aac
commit 3260783eec
6 changed files with 26 additions and 20 deletions

View File

@@ -14,7 +14,6 @@ import android.provider.Settings
import android.view.View
import android.widget.Toast
import androidx.core.content.getSystemService
import androidx.core.os.bundleOf
import androidx.recyclerview.widget.RecyclerView
import be.mygod.vpnhotspot.App.Companion.app
import be.mygod.vpnhotspot.LocalOnlyHotspotService
@@ -61,7 +60,7 @@ class LocalOnlyHotspotManager(private val parent: TetheringFragment) : Manager()
context.startActivity(Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS))
Toast.makeText(context, R.string.tethering_temp_hotspot_location, Toast.LENGTH_LONG).show()
} catch (e: ActivityNotFoundException) {
app.logEvent("location_settings", bundleOf("message" to e.message))
app.logEvent("location_settings") { param("message", e.message.toString()) }
SmartSnackbar.make(R.string.tethering_temp_hotspot_location).show()
}
return