Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4ad2928 authored by Teng-Hui Zhu's avatar Teng-Hui Zhu Committed by Android (Google) Code Review
Browse files

Merge "getDuration can be only called after prepared."

parents 0df0ed58 0d1d30b3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -311,7 +311,11 @@ class HTML5Audio extends Handler
    }

    private float getMaxTimeSeekable() {
        if (mState >= PREPARED) {
            return mMediaPlayer.getDuration() / 1000.0f;
        } else {
            return 0;
        }
    }

    private native void nativeOnBuffering(int percent, int nativePointer);