From 4febbc51e03000520e6c013926e0c30bbc9fdc65 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Wed, 21 Aug 2013 17:23:13 +0800 Subject: [PATCH] fix speed notification --- src/main/scala/com/github/shadowsocks/ShadowsocksService.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksService.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksService.scala index fb20f2df..242e5ff0 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksService.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksService.scala @@ -212,7 +212,7 @@ class ShadowsocksService extends Service { lastTxRate = txRate lastRxRate = rxRate } - if (pm.isScreenOn && state == State.CONNECTED) { + if ((pm.isScreenOn && state == State.CONNECTED) || (txRate == 0 && rxRate == 0)) { notifyForegroundAlert(getString(R.string.forward_success), getString(R.string.service_status).format(math.max(txRate, rxRate)), math.max(txRate, rxRate)) }