set max to max int
This commit is contained in:
parent
3c2515d17a
commit
361a090afa
1 changed files with 2 additions and 1 deletions
|
|
@ -141,7 +141,8 @@ public class MainActivity extends AppCompatThemeActivity {
|
|||
}
|
||||
|
||||
public void setProgress(long cur, long total) {
|
||||
setMax(total > Integer.MAX_VALUE ? (int) (total / (Long.MAX_VALUE / Integer.MAX_VALUE)) : (int) total);
|
||||
long max = total / info.hz / info.channels;
|
||||
setMax(max > Integer.MAX_VALUE ? (int) (max / (Long.MAX_VALUE / Integer.MAX_VALUE)) : (int) max);
|
||||
if (current == null) {
|
||||
current = new SpeedInfo();
|
||||
current.start(cur);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue