Commit 4febbc51 authored by Max Lv's avatar Max Lv

fix speed notification

parent 5597f25e
...@@ -212,7 +212,7 @@ class ShadowsocksService extends Service { ...@@ -212,7 +212,7 @@ class ShadowsocksService extends Service {
lastTxRate = txRate lastTxRate = txRate
lastRxRate = rxRate lastRxRate = rxRate
} }
if (pm.isScreenOn && state == State.CONNECTED) { if ((pm.isScreenOn && state == State.CONNECTED) || (txRate == 0 && rxRate == 0)) {
notifyForegroundAlert(getString(R.string.forward_success), notifyForegroundAlert(getString(R.string.forward_success),
getString(R.string.service_status).format(math.max(txRate, rxRate)), math.max(txRate, rxRate)) getString(R.string.service_status).format(math.max(txRate, rxRate)), math.max(txRate, rxRate))
} }
......
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