Run NewApi lint on tests

Updates baseline files and removes broken workarounds in baseline update
task configuration. Adds comments for manually updating baselines. Cleans up
failure modes in ExperimentalDetector.

Bug: 172331502
Fixes: 160156750
Test: ./gradlew lintDebug
Merged-In: Icb461c46cc6f36fc036d0b92b2c49784727979cf
Change-Id: Icb461c46cc6f36fc036d0b92b2c49784727979cf
diff --git a/buildSrc/lint.xml b/buildSrc/lint.xml
index 1837ce0..1fb6d32 100644
--- a/buildSrc/lint.xml
+++ b/buildSrc/lint.xml
@@ -4,4 +4,15 @@
     <issue id="LintBaseline" severity="ignore">
         <ignore regexp=".* filtered out because .* listed in the baseline file.*"/>
     </issue>
+    <!-- Disable all lint checks on tests by default. -->
+    <issue id="all">
+        <ignore path="**/src/test/**" />
+        <ignore path="**/src/androidTest/**" />
+        <!-- Required for Kotlin multi-platform tests. -->
+        <ignore path="**/src/androidAndroidTest/**" />
+        <!-- Required for AppSearch icing tests. -->
+        <ignore path="**/java/tests/**" />
+    </issue>
+    <!-- Re-enable NewApi for tests (and everything else). -->
+    <issue id="NewApi" severity="fatal" />
 </lint>