Closed
Bug 1510662
Opened 6 years ago
Closed 2 years ago
Lint Warning: Using Private APIs
Categories
(GeckoView :: General, enhancement, P5)
Tracking
(firefox112 wontfix, firefox113 fixed)
RESOLVED
FIXED
113 Branch
People
(Reporter: fluffyemily, Assigned: nkitanand, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=java])
Attachments
(1 file)
Using reflection to access hidden/private Android APIs is not safe; it will often not work on devices from other vendors, and it may suddenly stop working (if the API is removed) or crash spectacularly (if the API behavior changes, since there are no guarantees for compatibility).
Affected Classes:
SharedMemory
Util
Updated•6 years ago
|
Updated•6 years ago
|
Product: Firefox for Android → GeckoView
Updated•2 years ago
|
Severity: normal → S3
Updated•2 years ago
|
Mentor: m_kato
Whiteboard: [lang=java]
Assignee | ||
Comment 2•2 years ago
|
||
I wish to work on this issue.
Comment 3•2 years ago
•
|
||
We use reflection in the following. This needs @SuppressLint("DiscouragedPrivateApi")
.
- https://searchfox.org/mozilla-central/rev/42747dfd314e4c939dc7c33a13e1a2fddf4926fc/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/SharedMemory.java#27
- https://searchfox.org/mozilla-central/rev/42747dfd314e4c939dc7c33a13e1a2fddf4926fc/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/OverscrollEdgeEffect.java#46
Assignee: nobody → nkitanand
Assignee | ||
Comment 4•2 years ago
|
||
Shall I change @SuppressLint("PrivateApi")
to @SuppressLint({"PrivateApi", "DiscouragedPrivateApi"})
in Util.java ?
Comment 5•2 years ago
|
||
(In reply to Ankit Anand from comment #4)
Shall I change
@SuppressLint("PrivateApi")
to@SuppressLint({"PrivateApi", "DiscouragedPrivateApi"})
in Util.java ?
No, don't touch this file since under mobile/android/exoplayer2 is third party source code.
Assignee | ||
Comment 6•2 years ago
|
||
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/75ea2b4ddd60
Suppress Lint Warning: Using Private APIs. r=m_kato,geckoview-reviewers
Comment 8•2 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox113:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Updated•2 years ago
|
status-firefox112:
--- → wontfix
You need to log in
before you can comment on or make changes to this bug.
Description
•