Skip to content

[camera_android_camerax][video_player_android] Suppresses deprecation of the SurfaceProducer.Callback.onSurfaceDestroyed method #8388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/camera/camera_android_camerax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## NEXT

* Suppresses deprecation and removal warnings for
`TextureRegistry.SurfaceProducer.onSurfaceDestroyed`.

## 0.6.11

* Replaces deprecated Android embedder APIs (`onSurfaceCreated` -> `onSurfaceAvailable`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ public void onSurfaceAvailable() {
}

@Override
// TODO(bparrishMines): Replace with onSurfaceCleanup once available on stable. See
// https://github.com/flutter/flutter/issues/161256.
@SuppressWarnings({"deprecation", "removal"})
public void onSurfaceDestroyed() {
// Invalidate the SurfaceRequest so that CameraX knows to to make a new request
// for a surface.
Expand Down
5 changes: 5 additions & 0 deletions packages/video_player/video_player_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## NEXT

* Suppresses deprecation and removal warnings for
`TextureRegistry.SurfaceProducer.onSurfaceDestroyed`.

## 2.7.17

* Replaces deprecated Android embedder APIs (`onSurfaceCreated` -> `onSurfaceAvailable`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ public void onSurfaceAvailable() {
}

@RestrictTo(RestrictTo.Scope.LIBRARY)
// TODO(bparrishMines): Replace with onSurfaceCleanup once available on stable. See
// https://github.com/flutter/flutter/issues/161256.
@SuppressWarnings({"deprecation", "removal"})
public void onSurfaceDestroyed() {
// Intentionally do not call pause/stop here, because the surface has already been released
// at this point (see https://github.com/flutter/flutter/issues/156451).
Expand Down
Loading