Commit 1268376b authored by Mygod's avatar Mygod

Fix hostname not displayed correctly in notification

parent b7101914
...@@ -124,6 +124,7 @@ trait BaseService extends Service { ...@@ -124,6 +124,7 @@ trait BaseService extends Service {
} else true } else true
def connect() { def connect() {
profile.name = profile.getName // save original name before it's (possibly) overwritten by IP addresses
if (profile.host == "198.199.101.152") { if (profile.host == "198.199.101.152") {
val holder = app.containerHolder val holder = app.containerHolder
val container = holder.getContainer val container = holder.getContainer
......
...@@ -204,7 +204,7 @@ class ShadowsocksNatService extends BaseService { ...@@ -204,7 +204,7 @@ class ShadowsocksNatService extends BaseService {
AclSyncJob.schedule(profile.route) AclSyncJob.schedule(profile.route)
changeState(State.CONNECTED) 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) { override def stopRunner(stopService: Boolean, msg: String = null) {
......
...@@ -138,7 +138,7 @@ class ShadowsocksVpnService extends VpnService with BaseService { ...@@ -138,7 +138,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
if (profile.route != Acl.ALL && profile.route != Acl.CUSTOM_RULES) if (profile.route != Acl.ALL && profile.route != Acl.CUSTOM_RULES)
AclSyncJob.schedule(profile.route) AclSyncJob.schedule(profile.route)
notification = new ShadowsocksNotification(this, profile.getName) notification = new ShadowsocksNotification(this, profile.name)
} }
/** Called when the activity is first created. */ /** Called when the activity is first created. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment