Skip to content

Commit 4d08217

Browse files
author
Jonah Williams
authored
[Android] add lint ignores to Flutter JNI. (flutter#162527)
These API calls are triggering lints in g3, which has stricter lints for transitively calling higher API level methods.
1 parent f56d5a9 commit 4d08217

File tree

1 file changed

+8
-0
lines changed
  • engine/src/flutter/shell/platform/android/io/flutter/embedding/engine

1 file changed

+8
-0
lines changed

engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import static io.flutter.Build.API_LEVELS;
88

9+
import android.annotation.SuppressLint;
910
import android.content.Context;
1011
import android.content.res.AssetManager;
1112
import android.graphics.Bitmap;
@@ -1287,6 +1288,7 @@ public void destroyOverlaySurfaces() {
12871288
// ----- New Platform Views ----------
12881289

12891290
@SuppressWarnings("unused")
1291+
@SuppressLint("NewApi")
12901292
@UiThread
12911293
public SurfaceControl.Transaction createTransaction() {
12921294
if (platformViewsController2 == null) {
@@ -1296,6 +1298,7 @@ public SurfaceControl.Transaction createTransaction() {
12961298
}
12971299

12981300
@SuppressWarnings("unused")
1301+
@SuppressLint("NewApi")
12991302
@UiThread
13001303
public void swapTransactions() {
13011304
if (platformViewsController2 == null) {
@@ -1305,6 +1308,7 @@ public void swapTransactions() {
13051308
}
13061309

13071310
@SuppressWarnings("unused")
1311+
@SuppressLint("NewApi")
13081312
@UiThread
13091313
public void applyTransactions() {
13101314
if (platformViewsController2 == null) {
@@ -1314,6 +1318,7 @@ public void applyTransactions() {
13141318
}
13151319

13161320
@SuppressWarnings("unused")
1321+
@SuppressLint("NewApi")
13171322
@UiThread
13181323
public FlutterOverlaySurface createOverlaySurface2() {
13191324
if (platformViewsController2 == null) {
@@ -1324,6 +1329,7 @@ public FlutterOverlaySurface createOverlaySurface2() {
13241329
}
13251330

13261331
@SuppressWarnings("unused")
1332+
@SuppressLint("NewApi")
13271333
@UiThread
13281334
public void destroyOverlaySurface2() {
13291335
ensureRunningOnMainThread();
@@ -1335,6 +1341,8 @@ public void destroyOverlaySurface2() {
13351341
}
13361342

13371343
@UiThread
1344+
@SuppressWarnings("unused")
1345+
@SuppressLint("NewApi")
13381346
public void onDisplayPlatformView2(
13391347
int viewId,
13401348
int x,

0 commit comments

Comments
 (0)