Skip to content

Commit

Permalink
Merge pull request #191 from abdelaziz-mahdy/fix-warning
Browse files Browse the repository at this point in the history
fix warning on android
  • Loading branch information
wang-bin authored Dec 12, 2024
2 parents b8ff988 + 2e8d6bf commit a39b8c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
}
}

4 changes: 2 additions & 2 deletions android/src/main/java/com/mediadevkit/fvp/FvpPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a39b8c3

Please sign in to comment.