Fix profile name display in notification

This commit is contained in:
Mygod
2017-07-29 14:43:42 +08:00
parent 8b57b53788
commit 010fd6158f
@@ -124,8 +124,6 @@ trait BaseService extends Service {
}
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 client = new OkHttpClient.Builder()
.dns(hostname => Utils.resolve(hostname, enableIPv6 = false) match {
@@ -256,6 +254,8 @@ trait BaseService extends Service {
case _ => return Service.START_NOT_STICKY // ignore request
}
profile = app.currentProfile.orNull
profile.name = profile.getName // save original name before it's (possibly) overwritten by IP addresses
TrafficMonitor.reset()
trafficMonitorThread = new TrafficMonitorThread(getApplicationContext)
trafficMonitorThread.start()