Skip to content

Commit

Permalink
link #3673
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Aug 24, 2022
1 parent 4604b4b commit 9c45597
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,9 @@ protected void showPauseCover() {
try {
RectF rectF = new RectF(0, 0, mTextureView.getWidth(), mTextureView.getHeight());
Canvas canvas;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
canvas = mSurface.lockHardwareCanvas();
} else {
canvas = mSurface.lockCanvas(new Rect(0, 0, mTextureView.getWidth(), mTextureView.getHeight()));
}

canvas = mSurface.lockCanvas(new Rect(0, 0, mTextureView.getWidth(), mTextureView.getHeight()));

if (canvas != null) {
canvas.drawBitmap(mFullPauseBitmap, null, rectF, null);
mSurface.unlockCanvasAndPost(canvas);
Expand Down

0 comments on commit 9c45597

Please sign in to comment.