Skip to content

Commit 53e0f20

Browse files
hamdikahloundanielroek
authored andcommitted
[camera] CameraPlugin.java uses or overrides a deprecated API (flutter#3018)
1 parent 72254cf commit 53e0f20

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

packages/camera/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.8+6
2+
3+
* Avoiding uses or overrides a deprecated API in CameraPlugin.java.
4+
15
## 0.5.8+5
26

37
* Fix compilation/availability issues on iOS.

packages/camera/android/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
group 'io.flutter.plugins.camera'
22
version '1.0-SNAPSHOT'
3+
def args = ["-Xlint:deprecation","-Xlint:unchecked","-Werror"]
34

45
buildscript {
56
repositories {
@@ -19,6 +20,10 @@ rootProject.allprojects {
1920
}
2021
}
2122

23+
project.getTasks().withType(JavaCompile){
24+
options.compilerArgs.addAll(args)
25+
}
26+
2227
apply plugin: 'com.android.library'
2328

2429
android {

packages/camera/android/src/main/java/io/flutter/plugins/camera/CameraPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) {
7070
binding.getActivity(),
7171
flutterPluginBinding.getBinaryMessenger(),
7272
binding::addRequestPermissionsResultListener,
73-
flutterPluginBinding.getFlutterEngine().getRenderer());
73+
flutterPluginBinding.getTextureRegistry());
7474
}
7575

7676
@Override

packages/camera/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: camera
22
description: A Flutter plugin for getting information about and controlling the
33
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
44
and streaming image buffers to dart.
5-
version: 0.5.8+5
5+
version: 0.5.8+6
66

77
homepage: https://github.com/flutter/plugins/tree/master/packages/camera
88

0 commit comments

Comments
 (0)