diff --git a/mobile/src/main/scala/com/github/shadowsocks/BaseService.scala b/mobile/src/main/scala/com/github/shadowsocks/BaseService.scala index f5e6fdb1..2a40349b 100644 --- a/mobile/src/main/scala/com/github/shadowsocks/BaseService.scala +++ b/mobile/src/main/scala/com/github/shadowsocks/BaseService.scala @@ -124,6 +124,7 @@ trait BaseService extends Service { } else true def connect() { + profile.name = profile.getName // save original name before it's (possibly) overwritten by IP addresses if (profile.host == "198.199.101.152") { val holder = app.containerHolder val container = holder.getContainer diff --git a/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala b/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala index 3ba848a5..ef105f73 100644 --- a/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala +++ b/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala @@ -204,7 +204,7 @@ class ShadowsocksNatService extends BaseService { AclSyncJob.schedule(profile.route) changeState(State.CONNECTED) - notification = new ShadowsocksNotification(this, profile.getName, true) + notification = new ShadowsocksNotification(this, profile.name, true) } override def stopRunner(stopService: Boolean, msg: String = null) { diff --git a/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala b/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala index 1efe035f..1963fadd 100644 --- a/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala +++ b/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala @@ -138,7 +138,7 @@ class ShadowsocksVpnService extends VpnService with BaseService { if (profile.route != Acl.ALL && profile.route != Acl.CUSTOM_RULES) AclSyncJob.schedule(profile.route) - notification = new ShadowsocksNotification(this, profile.getName) + notification = new ShadowsocksNotification(this, profile.name) } /** Called when the activity is first created. */