Skip to content

Commit cef3ed4

Browse files
committed
Baseline NewApi issues
NewApi is a lint check that you don't call framework methods that were introduced in versions later than your min_sdk_version. We want to make this an error, so we're baselineing all existing issues. This cl was generated automatically, by taking all the NewApi issues from the reference baselines, and all the non-NewApi issues from the existing checked in baselines. Bug: 268261262 Test: Presubmits Change-Id: If1b1214da673fec9f1e8bede86d5780a6b5f347b
1 parent 1085e5a commit cef3ed4

1 file changed

Lines changed: 22 additions & 13 deletions

File tree

java/lint-baseline.xml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">
2+
<issues format="6" by="lint 8.4.0-alpha01" type="baseline" client="" dependencies="true" name="" variant="all" version="8.4.0-alpha01">
33

44
<issue
55
id="NewApi"
@@ -26,36 +26,45 @@
2626
<issue
2727
id="NewApi"
2828
message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`"
29-
errorLine1=" final UserManager userManager = context.getSystemService(UserManager.class);"
30-
errorLine2=" ~~~~~~~~~~~~~~~~">
29+
errorLine1=" final WindowManager wm = getSystemService(WindowManager.class);"
30+
errorLine2=" ~~~~~~~~~~~~~~~~">
3131
<location
32-
file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/UserManagerCompatUtils.java"
33-
line="69"
34-
column="49"/>
32+
file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
33+
line="605"
34+
column="34"/>
3535
</issue>
3636

3737
<issue
3838
id="NewApi"
39-
message="Call requires API level 23 (current min is 21): `android.app.ActivityOptions#makeBasic`">
39+
message="Call requires API level 23 (current min is 21): `android.app.ActivityOptions#makeBasic`"
40+
errorLine1=" ActivityOptions.makeBasic().setLaunchDisplayId(currentDisplayId).toBundle());"
41+
errorLine2=" ~~~~~~~~~">
4042
<location
4143
file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
42-
line="1842"/>
44+
line="1857"
45+
column="33"/>
4346
</issue>
4447

4548
<issue
4649
id="NewApi"
47-
message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`">
50+
message="Call requires API level 26 (current min is 21): `android.app.ActivityOptions#setLaunchDisplayId`"
51+
errorLine1=" ActivityOptions.makeBasic().setLaunchDisplayId(currentDisplayId).toBundle());"
52+
errorLine2=" ~~~~~~~~~~~~~~~~~~">
4853
<location
4954
file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
50-
line="605"/>
55+
line="1857"
56+
column="45"/>
5157
</issue>
5258

5359
<issue
5460
id="NewApi"
55-
message="Call requires API level 26 (current min is 21): `android.app.ActivityOptions#setLaunchDisplayId`">
61+
message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`"
62+
errorLine1=" final UserManager userManager = context.getSystemService(UserManager.class);"
63+
errorLine2=" ~~~~~~~~~~~~~~~~">
5664
<location
57-
file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
58-
line="1842"/>
65+
file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/UserManagerCompatUtils.java"
66+
line="69"
67+
column="49"/>
5968
</issue>
6069

6170
</issues>

0 commit comments

Comments
 (0)