Bug 1284544 - lint: suppress useless override error caused by presence of 24 sdk r?mcomella draft
authorAndrzej Hunt <ahunt@mozilla.com>
Tue, 05 Jul 2016 09:10:47 -0700
changeset 384132 0d298d5f1245286f5946d544422b87e6a51c04ed
parent 384131 d57914dde1953670a48d5e1d024fab2581816119
child 384133 f3e654849fff8a1bd0e10566e5382991d47cefb4
push id22173
push userahunt@mozilla.com
push dateTue, 05 Jul 2016 16:19:42 +0000
reviewersmcomella
bugs1284544
milestone50.0a1
Bug 1284544 - lint: suppress useless override error caused by presence of 24 sdk r?mcomella We're still building with the 23 sdk, but lint is now giving us errors based on the 24 sdk. We therefore need to explicitly suppress the error (even though in reality we don't want to suppress the error so that we don't miss adding the @Override annotation when we switch to 24). MozReview-Commit-ID: 3RqLMhiyAFh
mobile/android/base/java/org/mozilla/gecko/GeckoInputConnection.java
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoInputConnection.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoInputConnection.java
@@ -11,16 +11,17 @@ import java.lang.reflect.Proxy;
 import java.util.concurrent.SynchronousQueue;
 
 import org.mozilla.gecko.AppConstants.Versions;
 import org.mozilla.gecko.util.Clipboard;
 import org.mozilla.gecko.util.GamepadUtils;
 import org.mozilla.gecko.util.ThreadUtils;
 import org.mozilla.gecko.util.ThreadUtils.AssertBehavior;
 
+import android.annotation.SuppressLint;
 import android.content.Context;
 import android.content.res.Configuration;
 import android.media.AudioManager;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.SystemClock;
 import android.text.Editable;
@@ -450,16 +451,20 @@ class GeckoInputConnection
         if (v == null) {
             return false;
         }
         final Configuration config = v.getContext().getResources().getConfiguration();
         return config.keyboard != Configuration.KEYBOARD_NOKEYS;
     }
 
     // Android N: @Override // InputConnection
+    // We need to suppress lint complaining about the lack override here in the meantime: it wants us to build
+    // against sdk 24, even though we're using 23, and therefore complains about the lack of override.
+    // Once we update to 24, we can use the actual ovveride annotation and remove the lint suppression.
+    @SuppressLint("Override")
     public Handler getHandler() {
         if (isPhysicalKeyboardPresent()) {
             return ThreadUtils.getUiHandler();
         }
 
         return getBackgroundHandler();
     }