diff --git a/services/backup/lint-baseline.xml b/services/backup/lint-baseline.xml
deleted file mode 100644
index 28bb937cfd9c7..0000000000000
--- a/services/backup/lint-baseline.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/services/companion/lint-baseline.xml b/services/companion/lint-baseline.xml
deleted file mode 100644
index 03eae3901e51e..0000000000000
--- a/services/companion/lint-baseline.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/services/usb/lint-baseline.xml b/services/usb/lint-baseline.xml
deleted file mode 100644
index c2c0a350d5ada..0000000000000
--- a/services/usb/lint-baseline.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/tools/lint/checks/src/main/java/com/google/android/lint/CallingSettingsNonUserGetterMethodsDetector.kt b/tools/lint/checks/src/main/java/com/google/android/lint/CallingSettingsNonUserGetterMethodsDetector.kt
index fe567da7c017f..641f337ab9870 100644
--- a/tools/lint/checks/src/main/java/com/google/android/lint/CallingSettingsNonUserGetterMethodsDetector.kt
+++ b/tools/lint/checks/src/main/java/com/google/android/lint/CallingSettingsNonUserGetterMethodsDetector.kt
@@ -45,8 +45,7 @@ class CallingSettingsNonUserGetterMethodsDetector : Detector(), SourceCodeScanne
evaluator.isMemberInClass(method, "android.provider.Settings.System")
) {
val message = getIncidentMessageNonUserGetterMethods(getMethodSignature(method))
- context.report(ISSUE_NON_USER_GETTER_CALLED, node, context.getNameLocation(node),
- message)
+ context.report(ISSUE_NON_USER_GETTER_CALLED, node, context.getLocation(node), message)
}
}
@@ -69,7 +68,7 @@ class CallingSettingsNonUserGetterMethodsDetector : Detector(), SourceCodeScanne
""",
category = Category.CORRECTNESS,
priority = 6,
- severity = Severity.ERROR,
+ severity = Severity.WARNING,
implementation = Implementation(
CallingSettingsNonUserGetterMethodsDetector::class.java,
Scope.JAVA_FILE_SCOPE
diff --git a/tools/lint/checks/src/test/java/com/google/android/lint/CallingSettingsNonUserGetterMethodsIssueDetectorTest.kt b/tools/lint/checks/src/test/java/com/google/android/lint/CallingSettingsNonUserGetterMethodsIssueDetectorTest.kt
index e72f384163102..1034029f6e9d8 100644
--- a/tools/lint/checks/src/test/java/com/google/android/lint/CallingSettingsNonUserGetterMethodsIssueDetectorTest.kt
+++ b/tools/lint/checks/src/test/java/com/google/android/lint/CallingSettingsNonUserGetterMethodsIssueDetectorTest.kt
@@ -71,13 +71,13 @@ class CallingSettingsNonUserGetterMethodsIssueDetectorTest : LintDetectorTest()
.run()
.expect(
"""
- src/test/pkg/TestClass1.java:5: Error: \
+ src/test/pkg/TestClass1.java:5: Warning: \
android.provider.Settings.Secure#getInt() called from system process. \
Please call android.provider.Settings.Secure#getIntForUser() instead. \
[NonUserGetterCalled]
final int value = Secure.getInt(context.getContentResolver(),
- ~~~~~~
- 1 errors, 0 warnings
+ ^
+ 0 errors, 1 warnings
""".addLineContinuation()
)
}
@@ -100,13 +100,13 @@ class CallingSettingsNonUserGetterMethodsIssueDetectorTest : LintDetectorTest()
.run()
.expect(
"""
- src/test/pkg/TestClass1.java:5: Error: \
+ src/test/pkg/TestClass1.java:5: Warning: \
android.provider.Settings.System#getFloat() called from system process. \
Please call android.provider.Settings.System#getFloatForUser() instead. \
[NonUserGetterCalled]
final float value = System.getFloat(context.getContentResolver(),
- ~~~~~~~~
- 1 errors, 0 warnings
+ ^
+ 0 errors, 1 warnings
""".addLineContinuation()
)
}
@@ -130,13 +130,13 @@ class CallingSettingsNonUserGetterMethodsIssueDetectorTest : LintDetectorTest()
.run()
.expect(
"""
- src/test/pkg/TestClass1.java:5: Error: \
+ src/test/pkg/TestClass1.java:5: Warning: \
android.provider.Settings.System#getFloat() called from system process. \
Please call android.provider.Settings.System#getFloatForUser() instead. \
[NonUserGetterCalled]
float value = Settings.System.getFloat(context.getContentResolver(),
- ~~~~~~~~
- 1 errors, 0 warnings
+ ^
+ 0 errors, 1 warnings
""".addLineContinuation()
)
}
@@ -163,19 +163,19 @@ class CallingSettingsNonUserGetterMethodsIssueDetectorTest : LintDetectorTest()
.run()
.expect(
"""
- src/test/pkg/TestClass1.java:6: Error: \
+ src/test/pkg/TestClass1.java:6: Warning: \
android.provider.Settings.Secure#getLong() called from system process. \
Please call android.provider.Settings.Secure#getLongForUser() instead. \
[NonUserGetterCalled]
final long value1 = Secure.getLong(context.getContentResolver(),
- ~~~~~~~
- src/test/pkg/TestClass1.java:8: Error: \
+ ^
+ src/test/pkg/TestClass1.java:8: Warning: \
android.provider.Settings.System#getString() called from system process. \
Please call android.provider.Settings.System#getStringForUser() instead. \
[NonUserGetterCalled]
final String value2 = System.getString(context.getContentResolver(),
- ~~~~~~~~~
- 2 errors, 0 warnings
+ ^
+ 0 errors, 2 warnings
""".addLineContinuation()
)
}