@@ -216,12 +216,12 @@ private String stringForTime(int timeMs) {
216
216
}
217
217
}
218
218
219
- public int updateProgress () {
219
+ public long updateProgress () {
220
220
if (mController == null || mDragging ) {
221
221
return 0 ;
222
222
}
223
- int position = mController .getCurrentPosition ();
224
- int duration = mController .getDuration ();
223
+ long position = mController .getCurrentPosition ();
224
+ long duration = mController .getDuration ();
225
225
if (mProgress != null ) {
226
226
if (duration > 0 ) {
227
227
// use long to avoid overflow
@@ -233,9 +233,9 @@ public int updateProgress() {
233
233
}
234
234
235
235
if (mEndTime != null )
236
- mEndTime .setText (stringForTime (duration ));
236
+ mEndTime .setText (stringForTime (( int ) duration ));
237
237
if (mCurrentTime != null )
238
- mCurrentTime .setText (stringForTime (position ));
238
+ mCurrentTime .setText (stringForTime (( int ) position ));
239
239
240
240
return position ;
241
241
}
@@ -323,7 +323,7 @@ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
323
323
324
324
private View .OnClickListener mRewListener = new View .OnClickListener () {
325
325
public void onClick (View v ) {
326
- int pos = mController .getCurrentPosition ();
326
+ long pos = mController .getCurrentPosition ();
327
327
pos -= 5000 ; // milliseconds
328
328
mController .seekTo (pos );
329
329
updateProgress ();
@@ -332,7 +332,7 @@ public void onClick(View v) {
332
332
333
333
private View .OnClickListener mFfwdListener = new View .OnClickListener () {
334
334
public void onClick (View v ) {
335
- int pos = mController .getCurrentPosition ();
335
+ long pos = mController .getCurrentPosition ();
336
336
pos += 15000 ; // milliseconds
337
337
mController .seekTo (pos );
338
338
updateProgress ();
0 commit comments