From 02ad38614abd0b5bffd17b5d32e938bc58175d20 Mon Sep 17 00:00:00 2001 From: Abdelaziz Mahdy Date: Wed, 11 Dec 2024 22:35:06 -0400 Subject: [PATCH 1/2] fix warning on android --- android/src/main/java/com/mediadevkit/fvp/FvpPlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/mediadevkit/fvp/FvpPlugin.java b/android/src/main/java/com/mediadevkit/fvp/FvpPlugin.java index a32892f..39f9244 100644 --- a/android/src/main/java/com/mediadevkit/fvp/FvpPlugin.java +++ b/android/src/main/java/com/mediadevkit/fvp/FvpPlugin.java @@ -93,8 +93,8 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) { sp.setCallback( new TextureRegistry.SurfaceProducer.Callback() { @Override - public void onSurfaceCreated() { - Log.d("FvpPlugin", "SurfaceProducer.onSurfaceCreated for textureId " + texId); + public void onSurfaceAvailable() { + Log.d("FvpPlugin", "SurfaceProducer.onSurfaceAvailable for textureId " + texId); final Surface newSurface = sp.getSurface(); surfaces.put(texId, newSurface); // will do nothing if same surface From 2e8d6bf730ecddaa61feaad8f30960fe85e6dee3 Mon Sep 17 00:00:00 2001 From: Abdelaziz Mahdy Date: Thu, 12 Dec 2024 10:00:16 -0400 Subject: [PATCH 2/2] add gradle condition to allow older versions of sdk --- android/build.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index 8f0b13a..4ca025a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -122,4 +122,10 @@ if (flutterSdkVersionInt < 32400) { preprocessJava(['//// FLUTTER_3.24_BEGIN': '/\\*// FLUTTER_3.24_BEGIN-', '//// FLUTTER_3.24_END': '\\*/// FLUTTER_3.24_END-']) } else { preprocessJava(['/\\*// FLUTTER_3.24_BEGIN-': '//// FLUTTER_3.24_BEGIN', '\\*/// FLUTTER_3.24_END-': '//// FLUTTER_3.24_END']) + /// rename onSurfaceAvailable to onSurfaceCreated if flutterSdkVersionInt < 32700 + if (flutterSdkVersionInt < 32700) { + println 'rename onSurfaceAvailable to onSurfaceCreated' + preprocessJava(['onSurfaceAvailable': 'onSurfaceCreated']) + } } +