Closed
Bug 1048525
Opened 10 years ago
Closed 10 years ago
Use SuggestClient from MC.
Categories
(Firefox for Android Graveyard :: Search Activity, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 34
People
(Reporter: eedens, Assigned: eedens)
References
Details
Attachments
(1 file, 6 obsolete files)
13.29 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
We should remove the temporarily-bundled version of SuggestClient in favor of the SuggestClient in org.mozilla.gecko.home.
Updated•10 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•10 years ago
|
||
Here's the associated PR: https://github.com/mozilla/fennec-search/pull/54
Assignee: nobody → eric.edens
Status: NEW → ASSIGNED
Attachment #8471166 -
Flags: review?(margaret.leibovic)
Comment 2•10 years ago
|
||
Comment on attachment 8471166 [details] [diff] [review]
bug-1048525-fix.patch
Review of attachment 8471166 [details] [diff] [review]:
-----------------------------------------------------------------
Nice.
Attachment #8471166 -
Flags: review?(margaret.leibovic) → review+
Comment 3•10 years ago
|
||
Assignee | ||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
Backed out at eedens's request, because of crash when Gecko isn't running.
https://hg.mozilla.org/integration/fx-team/rev/07f040c1f11c
Assignee | ||
Comment 6•10 years ago
|
||
Revert in Github:
https://github.com/mozilla/fennec-search/commit/6c7d5ba014cb9811e0f1b83758e2ca91d8487dfb
The root issue was the static init in SuggestClient [1]. This init works when gecko is running, but fails with a NPE otherwise.
[1] https://lxr.mozilla.org/mozilla-central/source/mobile/android/base/home/SuggestClient.java#31
Comment 7•10 years ago
|
||
bnicholson, what do you think we should do about this? I think we should just have a fallback user agent string. I feel like the user agent isn't too important in this case, because it's not like we're getting web content.
Right now we're just sending an empty string with search activity requests... I wonder if that's an adequate solution.
Flags: needinfo?(bnicholson)
Assignee | ||
Comment 8•10 years ago
|
||
Alternatively, we can inject the UA through the constructor.
Then, for the search activity, we can use any UA -- blank, the webview's, something else ...
Comment 9•10 years ago
|
||
Assuming we plan to eventually replace WebView with GeckoView, I would just bypass GeckoInterface for now with a comment:
// This should go through GeckoInterface to get the UA, but the search activity
// doesn't use a GeckoView yet. Until it does, get the UA directly.
String USER_AGENT = HardwareUtils.isTablet() ? AppConstants.USER_AGENT_FENNEC_TABLET :
AppConstants.USER_AGENT_FENNEC_MOBILE;
Flags: needinfo?(bnicholson)
Assignee | ||
Comment 10•10 years ago
|
||
Thanks Brian!
PR: https://github.com/mozilla/fennec-search/pull/57
Try: https://tbpl.mozilla.org/?tree=Try&rev=54599c90adf5
Attachment #8471166 -
Attachment is obsolete: true
Attachment #8471800 -
Flags: review?(margaret.leibovic)
Comment 11•10 years ago
|
||
Comment on attachment 8471800 [details] [diff] [review]
bug-1048525-fix.v2.patch
Review of attachment 8471800 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/home/SuggestClient.java
@@ +32,5 @@
> private static final String LOGTAG = "GeckoSuggestClient";
> +
> + // This should go through GeckoInterface to get the UA, but the search activity
> + // doesn't use a GeckoView yet. Until it does, get the UA directly.
> + String USER_AGENT = HardwareUtils.isTablet() ? AppConstants.USER_AGENT_FENNEC_TABLET :
This should be 'private static final'.
Assignee | ||
Comment 12•10 years ago
|
||
bnicholson, good catch! Your code snippet was so nice I just copied and pasted it. :)
Attachment #8471800 -
Attachment is obsolete: true
Attachment #8471800 -
Flags: review?(margaret.leibovic)
Attachment #8471812 -
Flags: review?(margaret.leibovic)
Attachment #8471812 -
Flags: review?(bnicholson)
Assignee | ||
Comment 13•10 years ago
|
||
Fixed code tabbing.
Attachment #8471812 -
Attachment is obsolete: true
Attachment #8471812 -
Flags: review?(margaret.leibovic)
Attachment #8471812 -
Flags: review?(bnicholson)
Attachment #8471814 -
Flags: review?(margaret.leibovic)
Attachment #8471814 -
Flags: review?(bnicholson)
Comment 14•10 years ago
|
||
Comment on attachment 8471814 [details] [diff] [review]
bug-1048525-fix.v4.patch
Review of attachment 8471814 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me, though we should probably move SuggestClient out of the home package since it's more general-purpose.
Attachment #8471814 -
Flags: review?(bnicholson) → review+
Updated•10 years ago
|
Attachment #8471814 -
Flags: review?(margaret.leibovic) → review+
Comment 15•10 years ago
|
||
(In reply to Brian Nicholson (:bnicholson) from comment #14)
> Comment on attachment 8471814 [details] [diff] [review]
> bug-1048525-fix.v4.patch
>
> Review of attachment 8471814 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Looks good to me, though we should probably move SuggestClient out of the
> home package since it's more general-purpose.
Yeah, I've had the same thought. Do you think we should just move it to /base? Or /util maybe?
Comment 16•10 years ago
|
||
(In reply to :Margaret Leibovic from comment #15)
> Yeah, I've had the same thought. Do you think we should just move it to
> /base? Or /util maybe?
I'd vote /base since since it seems more like its own component than a helper util, but I don't have strong opinions either way.
Assignee | ||
Comment 17•10 years ago
|
||
Changed location of SuggestClient to /base. I'll post a try build when the tree is open.
PR: https://github.com/mozilla/fennec-search/pull/57/files
Attachment #8471814 -
Attachment is obsolete: true
Attachment #8472649 -
Flags: review?(margaret.leibovic)
Attachment #8472649 -
Flags: review?(bnicholson)
Comment 18•10 years ago
|
||
Comment on attachment 8472649 [details] [diff] [review]
bug-1048525-fix.v5.patch
Review of attachment 8472649 [details] [diff] [review]:
-----------------------------------------------------------------
Looks like you ended up copying the old SuggestClient without your changes!
Attachment #8472649 -
Flags: review?(bnicholson) → review-
Updated•10 years ago
|
Attachment #8472649 -
Flags: review?(margaret.leibovic)
Assignee | ||
Comment 19•10 years ago
|
||
> Looks like you ended up copying the old SuggestClient without your changes!
Oh hell. Thanks for catching that! Here's a fresh patch that includes the changes.
Try: https://tbpl.mozilla.org/?tree=Try&rev=35790a387068
PR: https://github.com/mozilla/fennec-search/pull/57/files
Attachment #8472649 -
Attachment is obsolete: true
Attachment #8473079 -
Flags: review?(margaret.leibovic)
Attachment #8473079 -
Flags: review?(bnicholson)
Comment 20•10 years ago
|
||
Comment on attachment 8473079 [details] [diff] [review]
bug-1048525-fix.v6.patch
Review of attachment 8473079 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM
Attachment #8473079 -
Flags: review?(bnicholson) → review+
Comment 21•10 years ago
|
||
Comment on attachment 8473079 [details] [diff] [review]
bug-1048525-fix.v6.patch
Review of attachment 8473079 [details] [diff] [review]:
-----------------------------------------------------------------
The try run looks green, so I can this for you.
Attachment #8473079 -
Flags: review?(margaret.leibovic) → review+
Assignee | ||
Comment 22•10 years ago
|
||
Assignee | ||
Comment 23•10 years ago
|
||
Rebased for landing
Attachment #8473079 -
Attachment is obsolete: true
Attachment #8473382 -
Flags: review?(margaret.leibovic)
Comment 24•10 years ago
|
||
Comment on attachment 8473382 [details] [diff] [review]
bug-1048525-fix.v7.patch
https://hg.mozilla.org/integration/fx-team/rev/e0ffa340816c
Attachment #8473382 -
Flags: review?(margaret.leibovic) → review+
Comment 25•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Updated•7 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•