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
--- 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();
}