Skip to content

Commit

Permalink
Update PlayerHelper.java
Browse files Browse the repository at this point in the history
  • Loading branch information
pecially520 committed Mar 1, 2023
1 parent 274bcc3 commit dea9d1c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.json.JSONException;
import org.json.JSONObject;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;

Expand Down Expand Up @@ -265,7 +266,7 @@ public static String getScaleName(int screenScaleType) {

public static String getDisplaySpeed(long speed) {
if(speed > 1048576)
return (speed / 1048576) + "Mb/s";
return new DecimalFormat("#.00").format(speed / 1048576d) + "Mb/s";
else if(speed > 1024)
return (speed / 1024) + "Kb/s";
else
Expand Down

0 comments on commit dea9d1c

Please sign in to comment.