Closed Bug 1489528 Opened 7 years ago Closed 1 year ago

FinderFindFlags IntDef annotation should include a zero value as a default

Categories

(GeckoView :: General, task, P5)

task

Tracking

(firefox127 fixed)

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: jonalmeida, Assigned: Gela, Mentored)

Details

(Keywords: good-first-bug)

Attachments

(1 file, 1 obsolete file)

When using GeckoSession.getFinder().find, a flag is needed from the IntDef FinderFindFlags even if searching in a forward direction - for that we pass 0. The Android linter complains that by passing 0 we're not adhering to the IntDef values which don't have a 0 attribute there. Consider this snippet of code: val findFlags = if (forward) 0 else GeckoSession.FINDER_FIND_BACKWARDS geckoSession.finder.find(text, 0).then { result: GeckoSession.FinderResult? -> result?.let { notifyObservers { onFindResult(it.current, it.total, true) } } GeckoResult<Void>() } To avoid the linter from complaining, we should add a default attribute to the IntDef.
Product: Firefox for Android → GeckoView

Hi! I would like to work on this bug

davidb, can we assign a new mentor for this bug?

Flags: needinfo?(dbolter)
Mentor: jimnchen+bmo
Flags: needinfo?(dbolter) → needinfo?(esawin)
Mentor: esawin
Flags: needinfo?(esawin)

(In reply to clairebitterness from comment #1)

Hi! I would like to work on this bug

Hi, are you still interested in working on this bug?

Flags: needinfo?(clairebitterness)
Flags: needinfo?(clairebitterness)

Hello,

What is the status of this bug? I am new to contributing to Mozilla code base, but I would like to lend a hand if possible.

thank you,

(In reply to phu.thai888 from comment #4)

Hello,

What is the status of this bug? I am new to contributing to Mozilla code base, but I would like to lend a hand if possible.

thank you,

Welcome! This bug is still open to be worked on. Maybe esawin can help?

Flags: needinfo?(esawin)
Mentor: esawin → bugzeeeeee
Flags: needinfo?(esawin)
Flags: needinfo?(bugzeeeeee)

Hi (In reply to phu.thai888 from comment #4)

Hello,

What is the status of this bug? I am new to contributing to Mozilla code base, but I would like to lend a hand if possible.

thank you,

Hi there, I'll be your mentor for the bug :)

If you don't already, set up your development environment. You can find the instructions here https://firefox-source-docs.mozilla.org/mobile/android/geckoview/contributor/geckoview-quick-start.html

Here is the function in question: https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionFinder.java#82-83 <--- this is a SearchFox link. SearchFox is out tool we use to search our codebase. So you can see there the second parameter annotated @FinderFindFlags, and that's the interface we're interested in. You can find it in SearchFox by pasting FinderFindFlags into the search field and then selecting the file it's defined in.

Let me know if you have any questions or difficulties! Our team also has a Matrix channel #geckoview:mozilla.org which you can also use to ask questions.

Flags: needinfo?(bugzeeeeee)
Severity: normal → S3

Enhancements should have severity N/A.

Severity: S3 → N/A
Assignee: nobody → gmalekpour
Status: NEW → ASSIGNED
Attachment #9395356 - Attachment description: Bug 1489528 - FinderFindFlags IntDef annotation should include a zero value as a default → WIP: Bug 1489528 - FinderFindFlags IntDef annotation should include a zero value as a default
Attachment #9398252 - Attachment is obsolete: true
Attachment #9395356 - Attachment description: WIP: Bug 1489528 - FinderFindFlags IntDef annotation should include a zero value as a default → Bug 1489528 - FinderFindFlags IntDef annotation should include a zero value as a default
Pushed by gmalekpour@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d6c43b10944a FinderFindFlags IntDef annotation should include a zero value as a default r=kaya,geckoview-reviewers,ohall
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: