Closed Bug 1040206 Opened 10 years ago Closed 3 years ago

Improvements to SuggestClient

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: Margaret, Unassigned, Mentored)

References

Details

Follow-ups to bug 1035341. We'll want to land these changes in the current version of SuggestClient in the tree, since eventually we'll move over to using that version of the file for the search activity.

From bug 1035341 comment 22:

:::
mobile/android/search/java/org/mozilla/search/autocomplete/SuggestClient.java
@@ +84,5 @@
> +                json = convertStreamToString(in);
> +            } finally {
> +                if (urlConnection != null)
> +                    urlConnection.disconnect();
> +                if (in != null) {

Blergh, you know how I hate this kind of thing :D

More precise try blocks, please!

@@ +93,5 @@
> +                    }
> +                }
> +            }
> +
> +            if (json != null) {

Early return.

@@ +131,5 @@
> +        ConnectivityManager connectivity = (ConnectivityManager) mContext
> +                .getSystemService(Context.CONNECTIVITY_SERVICE);
> +        if (connectivity == null)
> +            return null;
> +        return connectivity.getActiveNetworkInfo();

IIRC all of this is platform version dependent. Comment accordingly?
FYI, the file I'm referring to is:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/SuggestClient.java

We will probably want to move that out of the home package when we start using it for both BrowserSearch and the search activity.
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.