fix speed notification

This commit is contained in:
Max Lv
2013-08-21 17:23:13 +08:00
parent 5597f25e51
commit 4febbc51e0
@@ -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))
}