Gamepad support for search suggestions

RESOLVED FIXED in Firefox 26

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bnicholson, Assigned: bnicholson)

Tracking

Trunk
Firefox 26
All
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: abouthome-hackathon, fixed-fig)

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Bug 876765 needs to be ported to fig so a game controller can be used to navigate search suggestions.

Comment 1

5 years ago
I just merged m-c into fig, and I punted on properly merging over the changes from bug 876765, but we should now be able to go ahead and port over that functionality without worrying about more conflicts.

Part of the problem was that on fig there was already a home/SearchEngineRow class, and I didn't want to try to manually go through the SearchEngineRow class on m-c to compare exactly what changes needed to make their way over.
(Assignee)

Updated

5 years ago
Assignee: nobody → bnicholson
Status: NEW → ASSIGNED
Whiteboard: abouthome-hackathon
(Assignee)

Comment 2

5 years ago
Created attachment 781300 [details] [diff] [review]
Add gamepad support for search suggestions

Pretty much just a copy/paste from central.
Attachment #781300 - Flags: review?(lucasr.at.mozilla)
Comment on attachment 781300 [details] [diff] [review]
Add gamepad support for search suggestions

Review of attachment 781300 [details] [diff] [review]:
-----------------------------------------------------------------

Nice.

::: mobile/android/base/home/BrowserSearch.java
@@ +232,5 @@
> +
> +        mList.setOnKeyListener(new View.OnKeyListener() {
> +            @Override
> +            public boolean onKey(View v, int keyCode, android.view.KeyEvent event) {
> +                View selected = mList.getSelectedView();

final

@@ +235,5 @@
> +            public boolean onKey(View v, int keyCode, android.view.KeyEvent event) {
> +                View selected = mList.getSelectedView();
> +
> +                if (selected instanceof SearchEngineRow) {
> +                    return ((SearchEngineRow) selected).onKeyDown(keyCode, event);

Do you really need this casting here? AFAIK, onKeyDown is part of View's API.
Attachment #781300 - Flags: review?(lucasr.at.mozilla) → review+
(Assignee)

Comment 4

5 years ago
(In reply to Lucas Rocha (:lucasr) from comment #3)
> @@ +235,5 @@
> > +            public boolean onKey(View v, int keyCode, android.view.KeyEvent event) {
> > +                View selected = mList.getSelectedView();
> > +
> > +                if (selected instanceof SearchEngineRow) {
> > +                    return ((SearchEngineRow) selected).onKeyDown(keyCode, event);
> 
> Do you really need this casting here? AFAIK, onKeyDown is part of View's API.

Nope, good catch.

https://hg.mozilla.org/projects/fig/rev/962211a2b765
Whiteboard: abouthome-hackathon → abouthome-hackathon, fixed-fig

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/962211a2b765
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
You need to log in before you can comment on or make changes to this bug.