Add @Keep annotations to avoid dead code elimination of classes only referenced by JNI (flutter/engine#44337)
Missing piece
This commit is contained in:
@@ -12,6 +12,7 @@ import android.media.Image;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.view.Surface;
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
@@ -319,6 +320,7 @@ public class FlutterRenderer implements TextureRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
@Keep
|
||||
final class ImageTextureRegistryEntry implements TextureRegistry.ImageTextureEntry {
|
||||
private final long id;
|
||||
private boolean released;
|
||||
|
||||
@@ -6,6 +6,7 @@ package io.flutter.view;
|
||||
|
||||
import android.graphics.SurfaceTexture;
|
||||
import android.media.Image;
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -75,6 +76,7 @@ public interface TextureRegistry {
|
||||
default void setOnTrimMemoryListener(@Nullable OnTrimMemoryListener listener) {}
|
||||
}
|
||||
|
||||
@Keep
|
||||
interface ImageTextureEntry extends TextureEntry {
|
||||
/** @return the identity of this ImageTextureEntry */
|
||||
long id();
|
||||
|
||||
Reference in New Issue
Block a user