diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index b0c75307..7e40bc2a 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/app/src/main/java/com/cookiegames/smartcookie/search/suggestions/BaseSuggestionsModel.kt b/app/src/main/java/com/cookiegames/smartcookie/search/suggestions/BaseSuggestionsModel.kt index fb5d4104..c31cce02 100644 --- a/app/src/main/java/com/cookiegames/smartcookie/search/suggestions/BaseSuggestionsModel.kt +++ b/app/src/main/java/com/cookiegames/smartcookie/search/suggestions/BaseSuggestionsModel.kt @@ -32,6 +32,9 @@ abstract class BaseSuggestionsModel internal constructor( private val language = locale.language.takeIf(String::isNotEmpty) ?: DEFAULT_LANGUAGE + + + /** * Create a URL for the given query in the given language. * diff --git a/app/src/main/java/com/cookiegames/smartcookie/search/suggestions/GoogleSuggestionsModel.kt b/app/src/main/java/com/cookiegames/smartcookie/search/suggestions/GoogleSuggestionsModel.kt index 0405f185..bbffb0eb 100644 --- a/app/src/main/java/com/cookiegames/smartcookie/search/suggestions/GoogleSuggestionsModel.kt +++ b/app/src/main/java/com/cookiegames/smartcookie/search/suggestions/GoogleSuggestionsModel.kt @@ -34,13 +34,13 @@ class GoogleSuggestionsModel( .host("suggestqueries.google.com") .encodedPath("/complete/search") .addQueryParameter("output", "toolbar") - .addQueryParameter("hl", language) + //.addQueryParameter("hl", language) .addEncodedQueryParameter("q", query) .build() @Throws(Exception::class) override fun parseResults(responseBody: ResponseBody): List { - parser.setInput(responseBody.byteStream(), "ISO-8859-1") + parser.setInput(responseBody.byteStream(), encoding) val suggestions = mutableListOf() var eventType = parser.eventType while (eventType != XmlPullParser.END_DOCUMENT) { @@ -63,5 +63,7 @@ class GoogleSuggestionsModel( }.newPullParser() } + var encoding = "ISO-8859-1" + } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0a379aae..5025454a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -237,7 +237,7 @@ Tabs App theme Light theme - Black theme + AMOLED theme Blue theme Yellow theme Green theme