Closed Bug 1287651 Opened 4 years ago Closed 2 years ago

Correctly override InputConnection.getHandler() in GeckoInputConnection when we switch to SDK 24 (Android N)

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect, P3)

defect

Tracking

(firefox62 fixed)

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: ahunt, Assigned: JanH)

References

Details

Attachments

(1 file)

GeckoInputConnection extends InputConnection.

In the 24 SDK this adds a getHandler() method, which didn't exist in 23. We also implement our own getHandler().

We build against 23. If 24 is present on your system at build time, Lint will complain about the lack of the @Override annotation (it doesn't care that we're actually building against 23). Therefore an annotation-suppression was added in Bug 1284544.

Once we update to SDK24 we need to revisit this and add the correct annotations / check that we're still exhibiting expected behaviour.
Depends on: 1284544
Priority: -- → P3
Assignee: nobody → jh+bugzilla
Comment on attachment 8975945 [details]
Bug 1287651 - Mark methods as @Override now that we're compiling with a newer SDK.

https://reviewboard.mozilla.org/r/244160/#review250096

::: mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoInputConnection.java:584
(Diff revision 1)
>          }
>          final Configuration config = v.getContext().getResources().getConfiguration();
>          return config.keyboard != Configuration.KEYBOARD_NOKEYS;
>      }
>  
> -    // Android N: @Override // InputConnection
> +    @Override

I prefer to add the name of the interface as a comment after `@Override`, which is what the Android source does. It makes things more clear in a class that implements multiple interfaces.
Attachment #8975945 - Flags: review?(nchen) → review+
Comment on attachment 8975945 [details]
Bug 1287651 - Mark methods as @Override now that we're compiling with a newer SDK.

https://reviewboard.mozilla.org/r/244160/#review250096

> I prefer to add the name of the interface as a comment after `@Override`, which is what the Android source does. It makes things more clear in a class that implements multiple interfaces.

Ah right, sorry for not realising that.
Pushed by mozilla@buttercookie.de:
https://hg.mozilla.org/integration/autoland/rev/aa0018292597
Mark methods as @Override now that we're compiling with a newer SDK. r=jchen
https://hg.mozilla.org/mozilla-central/rev/aa0018292597
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 62 → mozilla62
You need to log in before you can comment on or make changes to this bug.