This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
io/flutter/embedding/engine/renderer
test/io/flutter/embedding/engine/renderer Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -414,11 +414,6 @@ final class ImageReaderSurfaceProducer
414414 // Flip when debugging to see verbose logs.
415415 private static final boolean VERBOSE_LOGS = false ;
416416
417- // If we cleanup the ImageReaders on memory pressure it breaks VirtualDisplay
418- // backed platform views. Disable for now as this is only necessary to work
419- // around a Samsung-specific Android 14 bug.
420- private static final boolean CLEANUP_ON_MEMORY_PRESSURE = false ;
421-
422417 private final long id ;
423418
424419 private boolean released ;
@@ -654,9 +649,6 @@ PerImage dequeueImage() {
654649
655650 @ Override
656651 public void onTrimMemory (int level ) {
657- if (!CLEANUP_ON_MEMORY_PRESSURE ) {
658- return ;
659- }
660652 cleanup ();
661653 createNewReader = true ;
662654 }
Original file line number Diff line number Diff line change @@ -648,12 +648,11 @@ public void ImageReaderSurfaceProducerTrimMemoryCallback() {
648648 assertEquals (1 , texture .numImages ());
649649
650650 // Invoke the onTrimMemory callback.
651- // This should do nothing.
652651 texture .onTrimMemory (0 );
653652 shadowOf (Looper .getMainLooper ()).idle ();
654653
655- assertEquals (1 , texture .numImageReaders ());
656- assertEquals (1 , texture .numImages ());
654+ assertEquals (0 , texture .numImageReaders ());
655+ assertEquals (0 , texture .numImages ());
657656 }
658657
659658 // A 0x0 ImageReader is a runtime error.
You can’t perform that action at this time.
0 commit comments