Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit a43b79a

Browse files
author
Emmanuel Garcia
committed
Fixes
1 parent 43b9aee commit a43b79a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

shell/platform/android/io/flutter/embedding/android/FlutterImageView.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import android.media.Image;
1515
import android.media.Image.Plane;
1616
import android.media.ImageReader;
17+
import android.util.AttributeSet;
1718
import android.view.Surface;
1819
import android.view.View;
1920
import androidx.annotation.NonNull;
@@ -82,7 +83,8 @@ public FlutterImageView(@NonNull Context context, @NonNull AttributeSet attrs) {
8283
}
8384

8485
@VisibleForTesting
85-
FlutterImageView(@NonNull Context context, @NonNull ImageReader imageReader, SurfaceKind kind) {
86+
/*package*/ FlutterImageView(
87+
@NonNull Context context, @NonNull ImageReader imageReader, SurfaceKind kind) {
8688
super(context, null);
8789
this.imageReader = imageReader;
8890
this.kind = kind;
@@ -212,9 +214,7 @@ public void resizeIfNeeded(int width, int height) {
212214
return;
213215
}
214216
imageQueue.clear();
215-
if (currentImage != null) {
216-
currentImage = null;
217-
}
217+
currentImage = null;
218218
// Close all the resources associated with the image reader,
219219
// including the images.
220220
imageReader.close();

0 commit comments

Comments
 (0)