Show 0kb/s if non-zero small transfer
This commit is contained in:
parent
a99d8c8f14
commit
579597aa89
@ -99,7 +99,7 @@ public class TrafficService extends Service {
|
||||
ittSettings.setComponent(new ComponentName("com.android.settings", CMP));
|
||||
PendingIntent pitSettings = PendingIntent.getActivity(getApplicationContext(), 0, ittSettings, PendingIntent.FLAG_IMMUTABLE);
|
||||
notBuilder = new NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID);
|
||||
notBuilder.setSmallIcon(R.drawable.wkb000);
|
||||
notBuilder.setSmallIcon(R.drawable.empty);
|
||||
notBuilder.setContentIntent(pitSettings);
|
||||
notBuilder.setOngoing(true);
|
||||
notBuilder.setWhen(0);
|
||||
@ -296,10 +296,12 @@ public class TrafficService extends Service {
|
||||
lngPrevious = lngCurrent;
|
||||
|
||||
try {
|
||||
|
||||
if (lngSpeed < 1024) {
|
||||
if (lngSpeed == 0) {
|
||||
TrafficService.notBuilder.setSmallIcon(R.drawable.empty);
|
||||
updateIcon(R.drawable.empty);
|
||||
} else if (lngSpeed < 1024) {
|
||||
TrafficService.notBuilder.setSmallIcon(R.drawable.wkb000);
|
||||
updateIcon(R.drawable.wkb000);
|
||||
} else if (lngSpeed < 1048576L) {
|
||||
|
||||
TrafficService.notBuilder.setSmallIcon(R.drawable.wkb000 + (int) (lngSpeed / 1024L));
|
||||
|
Loading…
Reference in New Issue
Block a user