Fix crash when no profile is selected

This commit is contained in:
Mygod
2017-12-17 05:53:35 -08:00
parent b25e9a0905
commit f381ad6300
4 changed files with 10 additions and 9 deletions
@@ -33,8 +33,8 @@ class TransproxyService : Service(), LocalDnsService.Interface {
}
override val tag: String get() = "ShadowsocksTransproxyService"
override fun createNotification(): ServiceNotification =
ServiceNotification(this, data.profile!!.formattedName, "service-transproxy", true)
override fun createNotification(profileName: String): ServiceNotification =
ServiceNotification(this, profileName, "service-transproxy", true)
override fun onBind(intent: Intent): IBinder? = super.onBind(intent)
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int =