Bug 1366644 - Part 3b: Ignore new lint warnings. r=maliu draft
authorNick Alexander <nalexander@mozilla.com>
Tue, 17 Oct 2017 14:09:50 -0700
changeset 681833 a0ec7eac5d1a0801d7620b65d7e708a8001d208d
parent 681832 12d132c0c3e0dbe2b8873b31360ea96d612de44c
child 736254 b5dd71742a048c764d08c2af3be23dd2e67ecfaa
push id84947
push usernalexander@mozilla.com
push dateTue, 17 Oct 2017 21:26:05 +0000
reviewersmaliu
bugs1366644
milestone58.0a1
Bug 1366644 - Part 3b: Ignore new lint warnings. r=maliu MozReview-Commit-ID: 4bPUQkELdd
mobile/android/app/lint.xml
mobile/android/app/src/main/res/values-v21/integers.xml
mobile/android/base/java/org/mozilla/gecko/menu/GeckoMenuInflater.java
--- a/mobile/android/app/lint.xml
+++ b/mobile/android/app/lint.xml
@@ -35,16 +35,19 @@
     <issue id="MissingPermission" severity="warning" />
     <issue id="OnClick" severity="warning" />
     <issue id="ReferenceType" severity="warning" />
     <issue id="ResourceAsColor" severity="warning" />
     <issue id="ResourceType" severity="warning" />
     <issue id="ValidFragment" severity="warning" />
     <issue id="WrongConstant" severity="warning" />
 
+    <!-- New Android-Gradle lint integration regressed this check. -->
+    <issue id="MissingRegistered" severity="warning" />
+
     <!-- Fixes are in progress but we would like to block future candidates.
          The ** in the path are wildcards. We need these wildcards to not change our code structure.
          See: http://stackoverflow.com/questions/43994420/what-path-is-the-issue-ignore-path-element-in-lint-xml-relative-to -->
     <issue id="NewApi" severity="error">
         <ignore path="**/mobile/android/base/java/org/mozilla/gecko/activitystream/ActivityStreamPreference.java"/>
         <ignore path="**/mobile/android/base/java/org/mozilla/gecko/dlc/DownloadContentTelemetry.java"/>
         <ignore path="**/mobile/android/base/java/org/mozilla/gecko/preferences/LocaleListPreference.java"/>
         <ignore path="**/mobile/android/base/java/org/mozilla/gecko/media/MediaControlService.java"/>
@@ -62,16 +65,40 @@
         <ignore path="src/photon/res/values/styles.xml"/>
     </issue>
 
     <!-- We fixed all "Registered" lint errors. However the current gradle plugin has a bug where
          it ignores @SuppressLint annotations for this check. See CrashReporter class and
          https://code.google.com/p/android/issues/detail?id=204846 -->
     <issue id="Registered" severity="warning" />
 
+    <issue id="ObjectAnimatorBinding" severity="error">
+        <!-- Two animated properties are provided by the underlying
+             View implementation. -->
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/firstrun/FirstrunPager.java"/>
+    </issue>
+
+    <!-- Tracked by Bug 1409550. -->
+    <issue id="AppCompatCustomView" severity="error">
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/firstrun/FirstrunPager.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/home/PanelHeaderView.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/menu/MenuItemDefault.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/tabs/TabPanelBackButton.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/AllCapsTextView.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/ClickableWhenDisabledEditText.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/EllipsisTextView.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/SquaredImageView.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedEditText.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedImageButton.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedImageView.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedTextView.java"/>
+        <ignore path="**/mobile/android/search/java/org/mozilla/search/ui/BackCaptureEditText.java"/>
+        <ignore path="**/mobile/android/search/java/org/mozilla/search/ui/FacetBar.java"/>
+    </issue>
+
     <!-- WHEN YOU FIX A LINT WARNING, ADD IT TO THIS LIST.
 
          We want all lint warnings to be fatal errors.
          This is the list of checks that we've explicitly
          set as errors. Ideally, once we have no more warnings,
          we switch to the `warningsAsErrors` lint option
          (bug 1253737) rather than listing everything explicitly. -->
     <issue id="AaptCrash" severity="error" />
@@ -146,17 +173,16 @@
     <issue id="ManifestTypo" severity="error" />
     <issue id="MenuTitle" severity="error" />
     <issue id="MergeRootFrame" severity="error" />
     <issue id="MipmapIcons" severity="error" />
     <issue id="MissingApplicationIcon" severity="error" />
     <issue id="MissingId" severity="error" />
     <issue id="MissingPrefix" severity="error" />
     <issue id="MissingQuantity" severity="error" />
-    <issue id="MissingRegistered" severity="error" />
     <issue id="MissingSuperCall" severity="error" />
     <issue id="MissingTranslation" severity="error" />
     <issue id="MissingVersion" severity="error" />
     <issue id="MockLocation" severity="error" />
     <issue id="MultipleUsesSdk" severity="error" />
     <issue id="NamespaceTypo" severity="error" />
     <issue id="NestedScrolling" severity="error" />
     <issue id="NfcTechWhitespace" severity="error" />
--- a/mobile/android/app/src/main/res/values-v21/integers.xml
+++ b/mobile/android/app/src/main/res/values-v21/integers.xml
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
-<resources>
+<resources xmlns:tools="http://schemas.android.com/tools">
 
-    <integer name="search_assist_launch_res">@drawable/search_launcher</integer>
+    <integer name="search_assist_launch_res" tools:ignore="ReferenceType">@drawable/search_launcher</integer>
 
 </resources>
--- a/mobile/android/base/java/org/mozilla/gecko/menu/GeckoMenuInflater.java
+++ b/mobile/android/base/java/org/mozilla/gecko/menu/GeckoMenuInflater.java
@@ -1,24 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.menu;
 
 import java.io.IOException;
 
-import org.mozilla.gecko.AppConstants.Versions;
 import org.mozilla.gecko.R;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 
 import android.content.Context;
 import android.content.res.TypedArray;
 import android.content.res.XmlResourceParser;
+import android.support.annotation.XmlRes;
 import android.util.AttributeSet;
 import android.util.Xml;
 import android.view.InflateException;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.SubMenu;
 
@@ -45,17 +45,17 @@ public class GeckoMenuInflater extends M
     }
 
     public GeckoMenuInflater(Context context) {
         super(context);
         mContext = context;
     }
 
     @Override
-    public void inflate(int menuRes, Menu menu) {
+    public void inflate(@XmlRes int menuRes, Menu menu) {
 
         // This does not check for a well-formed XML.
 
         XmlResourceParser parser = null;
         try {
             parser = mContext.getResources().getXml(menuRes);
             AttributeSet attrs = Xml.asAttributeSet(parser);