|
|
@ -380,8 +380,10 @@ public class SearchAdapter extends BaseAdapter implements Filterable { |
|
|
|
language = DEFAULT_LANGUAGE; |
|
|
|
language = DEFAULT_LANGUAGE; |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try { |
|
|
|
URL url = new URL("https://google.com/complete/search?q=" + query |
|
|
|
// Old API that doesn't support HTTPS
|
|
|
|
+ "&output=toolbar&hl=" + language); |
|
|
|
// http://google.com/complete/search?q= + query + &output=toolbar&hl= + language
|
|
|
|
|
|
|
|
URL url = new URL("https://suggestqueries.google.com/complete/search?output=toolbar&hl=" |
|
|
|
|
|
|
|
+ language + "&q=" + query); |
|
|
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
|
|
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
|
|
|
connection.setDoInput(true); |
|
|
|
connection.setDoInput(true); |
|
|
|
connection.connect(); |
|
|
|
connection.connect(); |
|
|
|