From 010fd6158ff1c733e07d4eb91b452551c3195084 Mon Sep 17 00:00:00 2001 From: Mygod Date: Sat, 29 Jul 2017 14:43:42 +0800 Subject: [PATCH] Fix profile name display in notification --- .../src/main/scala/com/github/shadowsocks/BaseService.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/src/main/scala/com/github/shadowsocks/BaseService.scala b/mobile/src/main/scala/com/github/shadowsocks/BaseService.scala index 1e6e8f24..f5682e57 100644 --- a/mobile/src/main/scala/com/github/shadowsocks/BaseService.scala +++ b/mobile/src/main/scala/com/github/shadowsocks/BaseService.scala @@ -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()