Closed
Bug 1510661
Opened 6 years ago
Closed 4 months ago
Lint Warning: Using inlined constants on older versions
Categories
(GeckoView :: General, enhancement, P5)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: fluffyemily, Unassigned)
References
(Blocks 1 open bug)
Details
This check scans through all the Android API field references in the application and flags certain constants, such as static final integers and Strings, which were introduced in later versions. These will actually be copied into the class files rather than being referenced, which means that the value is available even when running on older devices. In some cases that's fine, and in other cases it can result in a runtime crash or incorrect behavior. It depends on the context, so consider the code carefully and decide whether it's safe and can be suppressed or whether the code needs to be guarded.
If you really want to use this API and don't need to support older devices just set the minSdkVersion in your build.gradle or AndroidManifest.xml files. If your code is deliberately accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the @TargetApi annotation specifying the local minimum SDK to apply, such as @TargetApi(11), such that this check considers 11 rather than your manifest file's minimum SDK as the required API level.
Affected classes:
BasicSelectionActionDelegate
Codec
FormatParam
GeckoAppShell
GeckoHlsAudioRenderer
GeckoHLSSample
GeckoHlsVideoRenderer
GeckoMediaDrmBridgeV21
GeckoSystemStateListener
JellyBeanAsyncCodec
LollipopAsyncCodec
SessionAccessibility
VsyncSource
Updated•6 years ago
|
Updated•6 years ago
|
Product: Firefox for Android → GeckoView
Updated•2 years ago
|
Severity: normal → S3
Comment 2•4 months ago
|
||
This is no longer relevant.
Closing as WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•