Commit 3f916e57 authored by Max Lv's avatar Max Lv

show profile name on notification bar

parent 74bbddbe
......@@ -47,7 +47,7 @@
<!-- notification category -->
<string name="forward_success">Shadowsocks started.</string>
<string name="service_running">Running in the background.</string>
<string name="service_running">Connected to Profile %s.</string>
<string name="service_status" formatted="false">Current Speed: %d KB/s</string>
<string name="forward_fail">Shadowsocks failed to start.</string>
<string name="service_stopped">Shadowsocks stopped.</string>
......
......@@ -256,7 +256,7 @@ class ShadowVpnService extends VpnService {
val builder = new Builder()
builder
.setSession(getString(R.string.app_name))
.setSession(config.profileName)
.setMtu(VPN_MTU)
.addAddress(PRIVATE_VLAN.format("1"), 24)
.addDnsServer("8.8.8.8")
......
......@@ -256,7 +256,7 @@ class ShadowsocksService extends Service {
if (resolved && handleConnection) {
notifyForegroundAlert(getString(R.string.forward_success),
getString(R.string.service_running))
getString(R.string.service_running).format(config.profileName))
handler.sendEmptyMessageDelayed(MSG_CONNECT_SUCCESS, 500)
} else {
notifyAlert(getString(R.string.forward_fail), getString(R.string.service_failed))
......
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