Add Yandex to QSB providers (#4545)

* Added Yandex QSB Provider

* Icon updated

* Icon updated [2]

---------

Co-authored-by: SuperDragonXD <70206496+SuperDragonXD@users.noreply.github.com>
This commit is contained in:
Timur Khatmullin
2024-07-17 09:32:23 +03:00
committed by GitHub
parent 1b9239db15
commit 738263f774
7 changed files with 67 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#fc3f1d"
android:pathData="M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12z" />
<path
android:fillColor="#ffffff"
android:pathData="M13.6 6.8h-1.1c-2.05 0-3.1 1.05-3.1 2.55 0 1.7 0.75 2.5 2.25 3.55l1.25 0.85-3.6 5.4H6.6l3.25-4.8C8 13 6.95 11.7 6.95 9.55c0-2.75 1.9-4.6 5.55-4.6h3.6V19.2h-2.5V6.8z" />
</vector>
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#ffffff"
android:pathData="M9.953,0.176C12.32,-0.238 14.809,0.082 16.996,1.086C19.59,2.258 21.734,4.395 22.91,6.992C24.082,9.512 24.309,12.445 23.59,15.125C22.797,18.129 20.777,20.781 18.094,22.348C15.391,23.957 12.039,24.414 9,23.621C6.207,22.914 3.695,21.156 2.082,18.766C0.352,16.254 -0.344,13.059 0.16,10.055C0.523,7.785 1.563,5.633 3.109,3.938C4.883,1.965 7.34,0.617 9.953,0.176ZM10.379,2.172C7.035,2.695 4.07,5.063 2.797,8.191C1.813,10.516 1.777,13.215 2.699,15.566C3.688,18.16 5.813,20.305 8.414,21.289C10.645,22.176 13.203,22.188 15.449,21.344C18.035,20.398 20.188,18.332 21.215,15.777C22.012,13.879 22.172,11.727 21.699,9.727C21.172,7.469 19.832,5.402 17.961,4.027C15.832,2.414 13.016,1.703 10.379,2.172ZM8.727,6.754C9.828,5.637 11.457,5.313 12.969,5.273C14.184,5.277 15.398,5.293 16.609,5.262C16.617,9.746 16.609,14.23 16.613,18.715C15.828,18.719 15.043,18.715 14.254,18.719C14.254,14.832 14.258,10.945 14.254,7.059C13.094,7.078 11.773,6.906 10.809,7.699C9.828,8.445 9.875,9.887 10.266,10.934C10.844,12.297 12.324,12.84 13.402,13.723C12.238,15.367 11.141,17.059 9.996,18.723C9.098,18.711 8.199,18.715 7.301,18.715C8.367,17.203 9.449,15.699 10.52,14.188C9.438,13.406 8.293,12.52 7.871,11.195C7.418,9.703 7.605,7.914 8.727,6.754ZM8.727,6.754" />
</vector>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#fc3f1d"
android:pathData="M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12z" />
<path
android:fillColor="#ffffff"
android:pathData="M12.35 13.35c0.75 1.6 0.95 2.15 0.95 4.1V20h-2.6v-4.3L5.8 5h2.7l3.85 8.35zM15.55 5l-3.2 7.25H15L18.2 5h-2.65z" />
</vector>
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#ffffff"
android:pathData="M9.957,0.199C12.32,-0.215 14.805,0.105 16.984,1.105C19.578,2.277 21.715,4.41 22.891,7C24.059,9.516 24.285,12.445 23.57,15.117C22.777,18.117 20.762,20.766 18.082,22.324C15.383,23.934 12.039,24.387 9.004,23.598C6.219,22.891 3.711,21.137 2.102,18.754C0.375,16.246 -0.32,13.055 0.184,10.055C0.547,7.793 1.582,5.645 3.129,3.953C4.895,1.984 7.348,0.641 9.957,0.199ZM14.613,12.809L17.434,6.402L15.09,6.402L12.27,12.809ZM13.109,19.656L13.109,17.406C13.109,15.707 12.898,15.211 12.25,13.801L8.855,6.402L6.453,6.402L10.801,15.859L10.801,19.656ZM10.383,2.191C7.047,2.711 4.086,5.074 2.816,8.199C1.836,10.52 1.797,13.215 2.719,15.559C3.703,18.148 5.824,20.289 8.418,21.27C10.648,22.156 13.203,22.168 15.445,21.324C18.023,20.383 20.172,18.316 21.199,15.77C21.992,13.875 22.152,11.727 21.684,9.73C21.152,7.477 19.816,5.414 17.949,4.043C15.824,2.434 13.016,1.723 10.383,2.191ZM10.383,2.191" />
</vector>
+1
View File
@@ -545,6 +545,7 @@
<string name="search_provider_github" translatable="false">GitHub</string>
<string name="search_provider_youtube" translatable="false">YouTube</string>
<string name="search_provider_pixel_search" translatable="false">Pixel Search</string>
<string name="search_provider_yandex" translatable="false">Yandex</string>
<string name="search_provider_sponsored_description">%1$s and Lawnchair have a revenue share agreement.\n\nSearching with %1$s helps support Lawnchair.</string>
@@ -132,6 +132,7 @@ sealed class QsbSearchProvider(
Presearch,
Bing,
Brave,
Yandex,
Startpage,
)
@@ -0,0 +1,21 @@
package app.lawnchair.qsb.providers
import android.content.Intent
import com.android.launcher3.R
data object Yandex : QsbSearchProvider(
id = "yandex",
name = R.string.search_provider_yandex,
icon = R.drawable.ic_yandex,
themedIcon = R.drawable.ic_yandex_tinted,
packageName = "com.yandex.searchapp",
className = "ru.yandex.searchplugin.MainActivity",
supportVoiceIntent = true,
website = "https://ya.ru/",
) {
override fun handleCreateVoiceIntent(): Intent =
Intent(action)
.addFlags(INTENT_FLAGS)
.setClassName(packageName, "ru.yandex.searchplugin.AssistantActivityAlias")
}