Create Brave QSB Provider (closes #2706)

This commit is contained in:
SuperDragonXD committed 2022-10-17 14:19:17 +08:00
1 parent b0933fbb29
commit 89bb0e6464
5 files changed
+76 -1

No files matched your search

+49
View File
@@ -0,0 +1,49 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="24dp"
android:height="24dp"
android:viewportWidth="218"
android:viewportHeight="256">
<path
android:pathData="M210.1,61.28L216.08,46.58C216.08,46.58 208.47,38.41 199.22,29.15C189.97,19.89 170.39,25.34 170.39,25.34L148.08,0L108.91,0L69.75,0L47.44,25.34C47.44,25.34 27.86,19.89 18.61,29.15C9.36,38.41 1.75,46.58 1.75,46.58L7.73,61.28L0.11,83.07C0.11,83.07 22.51,168.02 25.14,178.39C30.31,198.82 33.84,206.71 48.53,217.06C63.22,227.41 89.87,245.39 94.23,248.11C98.58,250.83 104.02,255.47 108.91,255.47C113.81,255.47 119.25,250.83 123.6,248.11C127.95,245.39 154.61,227.41 169.3,217.06C183.99,206.71 187.52,198.82 192.69,178.39C195.31,168.02 217.71,83.07 217.71,83.07L210.1,61.28Z"
android:strokeWidth="1"
android:fillType="evenOdd"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:startX="0.11"
android:startY="129.54"
android:endX="217.71"
android:endY="129.54"
android:type="linear">
<item android:offset="0" android:color="#FFFF5500"/>
<item android:offset="0.41" android:color="#FFFF5500"/>
<item android:offset="0.58" android:color="#FFFF2000"/>
<item android:offset="1" android:color="#FFFF2000"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M164.13,41.4C164.13,41.4 192.82,76.13 192.82,83.55C192.82,90.97 189.21,92.93 185.58,96.79C181.95,100.64 166.11,117.49 164.07,119.66C162.04,121.82 157.8,125.1 160.29,131.01C162.78,136.91 166.46,144.43 162.37,152.05C158.28,159.67 151.28,164.75 146.79,163.91C142.3,163.07 131.76,157.56 127.89,155.04C124.01,152.52 111.73,142.37 111.73,138.49C111.73,134.61 124.42,127.64 126.77,126.06C129.12,124.48 139.82,118.35 140.04,115.94C140.26,113.54 140.17,112.83 137.01,106.89C133.86,100.95 128.17,93.01 129.12,87.74C130.06,82.46 139.23,79.72 145.78,77.24C152.32,74.77 164.93,70.09 166.5,69.37C168.07,68.64 167.67,67.95 162.9,67.49C158.13,67.04 144.6,65.24 138.5,66.94C132.4,68.65 121.97,71.24 121.13,72.61C120.28,73.99 119.54,74.03 120.41,78.77C121.27,83.51 125.74,106.25 126.17,110.29C126.6,114.32 127.45,116.99 123.1,117.99C118.75,118.99 111.43,120.72 108.91,120.72C106.4,120.72 99.08,118.99 94.73,117.99C90.38,116.99 91.22,114.32 91.66,110.29C92.09,106.25 96.56,83.51 97.42,78.77C98.29,74.03 97.54,73.99 96.7,72.61C95.86,71.24 85.43,68.65 79.33,66.94C73.23,65.24 59.7,67.04 54.93,67.49C50.16,67.95 49.75,68.64 51.33,69.37C52.9,70.09 65.5,74.77 72.05,77.24C78.59,79.72 87.77,82.46 88.71,87.74C89.66,93.01 83.97,100.95 80.81,106.89C77.66,112.83 77.57,113.54 77.79,115.94C78.01,118.35 88.71,124.48 91.06,126.06C93.4,127.64 106.1,134.61 106.1,138.49C106.1,142.37 93.82,152.52 89.94,155.04C86.07,157.56 75.53,163.07 71.04,163.91C66.55,164.75 59.55,159.67 55.46,152.05C51.37,144.43 55.05,136.91 57.54,131.01C60.03,125.1 55.79,121.82 53.76,119.66C51.72,117.49 35.88,100.64 32.25,96.79C28.62,92.93 25.01,90.97 25.01,83.55C25.01,76.13 53.7,41.4 53.7,41.4C53.7,41.4 77.91,46.03 81.17,46.03C84.43,46.03 91.51,43.31 98.03,41.13C104.56,38.95 108.91,38.94 108.91,38.94C108.91,38.94 113.27,38.95 119.79,41.13C126.32,43.31 133.39,46.03 136.66,46.03C139.92,46.03 164.13,41.4 164.13,41.4ZM142.62,174.23C144.4,175.34 143.32,177.44 141.7,178.58C140.08,179.73 118.34,196.58 116.23,198.45C114.12,200.31 111.02,203.39 108.91,203.39C106.81,203.39 103.71,200.31 101.6,198.45C99.49,196.58 77.75,179.73 76.13,178.58C74.51,177.44 73.43,175.34 75.2,174.23C76.98,173.12 82.54,170.31 90.2,166.33C97.87,162.36 107.42,158.99 108.91,158.99C110.41,158.99 119.96,162.36 127.63,166.33C135.29,170.31 140.85,173.12 142.62,174.23Z"
android:strokeWidth="1"
android:fillColor="#FFFFFF"
android:fillType="evenOdd"
android:strokeColor="#00000000"/>
<path
android:pathData="M170.38,25.34L148.08,0L108.91,0L69.74,0L47.44,25.34C47.44,25.34 27.85,19.89 18.61,29.15C18.61,29.15 44.72,26.79 53.69,41.4C53.69,41.4 77.9,46.03 81.17,46.03C84.43,46.03 91.5,43.31 98.03,41.13C104.56,38.95 108.91,38.94 108.91,38.94C108.91,38.94 113.26,38.95 119.79,41.13C126.32,43.31 133.39,46.03 136.65,46.03C139.92,46.03 164.13,41.4 164.13,41.4C173.1,26.79 199.21,29.15 199.21,29.15C189.97,19.89 170.38,25.34 170.38,25.34"
android:strokeWidth="1"
android:fillType="evenOdd"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:startX="22.49"
android:startY="23.34"
android:endX="199.21"
android:endY="23.34"
android:type="linear">
<item android:offset="0" android:color="#FFFF452A"/>
<item android:offset="1" android:color="#FFFF2000"/>
</gradient>
</aapt:attr>
</path>
</vector>
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="84"
android:viewportHeight="98">
<path
android:pathData="M81.029,24.739L83.562,32.004C83.694,32.383 83.71,32.792 83.608,33.18C83.59,33.248 83.59,33.248 83.505,33.574C83.388,34.02 83.388,34.02 83.212,34.689C82.896,35.89 82.544,37.228 82.165,38.669C81.083,42.787 80.001,46.909 78.991,50.759C76.497,60.264 74.863,66.523 74.469,68.082C72.326,76.572 70.627,79.519 65.132,83.4C60.318,86.801 50.274,93.624 48.342,94.835C48.158,94.951 47.954,95.086 47.683,95.27C47.578,95.341 47.068,95.691 46.921,95.791C45.983,96.428 45.313,96.836 44.591,97.173C43.676,97.601 42.8,97.839 41.911,97.839C41.023,97.839 40.147,97.601 39.232,97.173C38.51,96.836 37.84,96.428 36.901,95.791C36.755,95.691 36.245,95.341 36.14,95.27C35.869,95.086 35.665,94.951 35.481,94.835C33.549,93.624 23.504,86.801 18.691,83.4C13.196,79.519 11.496,76.572 9.354,68.082C8.96,66.523 7.325,60.264 4.85,50.829C3.822,46.909 2.74,42.788 1.657,38.669C1.279,37.228 0.927,35.89 0.611,34.689C0.435,34.02 0.435,34.02 0.318,33.574C0.232,33.248 0.232,33.248 0.214,33.18C0.112,32.792 0.128,32.383 0.26,32.004L2.793,24.739L0.892,20.055C0.598,19.33 0.75,18.5 1.283,17.927C1.517,17.676 1.639,17.546 1.778,17.398C2.173,16.978 2.622,16.504 3.114,15.988C4.521,14.512 6.004,12.987 7.493,11.492C8.92,10.06 10.839,9.288 13.082,9.025C14.838,8.818 16.667,8.932 18.441,9.244C18.539,9.261 18.634,9.278 18.726,9.296L26.094,0.905C26.474,0.471 27.022,0.223 27.598,0.223L56.225,0.223C56.8,0.223 57.349,0.471 57.729,0.905L65.097,9.296C65.188,9.278 65.283,9.261 65.381,9.244C67.156,8.932 68.985,8.818 70.741,9.025C72.984,9.288 74.903,10.06 76.329,11.492C77.819,12.987 79.301,14.512 80.709,15.988C81.201,16.504 81.649,16.978 82.045,17.398C82.183,17.546 82.306,17.676 82.41,17.788C83.072,18.5 83.225,19.33 82.931,20.055L81.029,24.739ZM76.995,25.349C76.834,24.887 76.846,24.381 77.03,23.928L78.732,19.736C78.447,19.434 78.139,19.11 77.811,18.766C76.423,17.31 74.96,15.805 73.493,14.332C72.786,13.623 71.694,13.184 70.274,13.017C68.958,12.862 67.497,12.953 66.073,13.203C65.748,13.26 65.453,13.321 65.194,13.381C65.047,13.416 64.951,13.44 64.912,13.451C64.172,13.658 63.378,13.421 62.87,12.843L55.319,4.243L28.504,4.243L20.952,12.843C20.444,13.421 19.651,13.658 18.911,13.451C18.872,13.44 18.776,13.416 18.628,13.381C18.37,13.321 18.075,13.26 17.749,13.203C16.326,12.953 14.865,12.862 13.549,13.017C12.129,13.184 11.037,13.623 10.33,14.332C8.863,15.805 7.4,17.31 6.012,18.766C5.684,19.11 5.376,19.434 5.091,19.736L6.793,23.928C6.977,24.381 6.989,24.887 6.828,25.349L4.248,32.75C4.318,33.016 4.343,33.113 4.488,33.664C4.804,34.865 5.155,36.204 5.534,37.645C6.617,41.764 7.699,45.886 8.709,49.737C11.209,59.266 12.842,65.518 13.241,67.096C15.168,74.734 16.395,76.862 21,80.114C25.759,83.476 35.751,90.263 37.607,91.428C37.841,91.575 38.082,91.734 38.39,91.943C38.504,92.021 39.013,92.37 39.149,92.462C39.924,92.988 40.444,93.305 40.924,93.53C41.352,93.729 41.683,93.819 41.911,93.819C42.14,93.819 42.471,93.729 42.898,93.53C43.379,93.305 43.898,92.988 44.673,92.462C44.81,92.37 45.319,92.021 45.433,91.943C45.74,91.734 45.982,91.575 46.215,91.428C48.072,90.263 58.064,83.476 62.823,80.114C67.427,76.862 68.655,74.734 70.582,67.096C70.98,65.518 72.614,59.266 75.095,49.806C76.124,45.886 77.206,41.764 78.288,37.645C78.667,36.203 79.019,34.865 79.335,33.664C79.48,33.113 79.505,33.016 79.575,32.75L76.995,25.349ZM62.089,17.402C62.089,17.402 72.572,30.123 72.572,32.842C72.572,35.561 71.254,36.279 69.928,37.692C68.602,39.105 62.811,45.278 62.067,46.071C61.323,46.864 59.775,48.066 60.686,50.229C61.597,52.392 62.94,55.145 61.446,57.937C59.952,60.73 57.392,62.593 55.752,62.285C54.112,61.977 50.261,59.956 48.844,59.033C47.428,58.11 42.939,54.394 42.939,52.972C42.939,51.55 47.579,48.997 48.436,48.417C49.294,47.837 53.204,45.592 53.284,44.711C53.364,43.829 53.334,43.571 52.18,41.393C51.026,39.216 48.948,36.31 49.294,34.376C49.639,32.443 52.991,31.438 55.383,30.531C57.775,29.624 62.38,27.912 62.955,27.646C63.53,27.379 63.381,27.126 61.639,26.96C59.896,26.794 54.951,26.135 52.722,26.759C50.492,27.383 46.683,28.332 46.375,28.835C46.066,29.338 45.794,29.355 46.111,31.091C46.428,32.828 48.059,41.158 48.217,42.638C48.376,44.117 48.685,45.096 47.096,45.46C45.506,45.825 42.831,46.459 41.911,46.459C40.992,46.459 38.316,45.825 36.727,45.46C35.137,45.096 35.447,44.117 35.605,42.638C35.764,41.158 37.395,32.828 37.712,31.091C38.029,29.355 37.756,29.338 37.448,28.835C37.14,28.332 33.33,27.383 31.101,26.759C28.872,26.135 23.927,26.794 22.184,26.96C20.441,27.126 20.293,27.379 20.868,27.646C21.443,27.912 26.048,29.624 28.44,30.531C30.831,31.438 34.183,32.443 34.529,34.376C34.875,36.31 32.797,39.216 31.643,41.393C30.489,43.571 30.458,43.829 30.538,44.711C30.618,45.592 34.529,47.837 35.386,48.417C36.244,48.997 40.884,51.55 40.884,52.972C40.884,54.394 36.395,58.11 34.978,59.033C33.562,59.956 29.71,61.977 28.07,62.285C26.43,62.593 23.871,60.73 22.377,57.937C20.883,55.145 22.226,52.392 23.137,50.229C24.047,48.066 22.499,46.864 21.756,46.071C21.012,45.278 15.221,39.105 13.895,37.692C12.569,36.279 11.25,35.561 11.25,3Line truncated
android:fillColor="#000000"/>
</vector>
+1
View File
@@ -271,6 +271,7 @@
<string name="search_provider_presearch" translatable="false">Presearch</string>
<string name="search_provider_bing" translatable="false">Bing</string>
<string name="search_provider_sesame" translatable="false">Sesame</string>
<string name="search_provider_brave" translatable="false">Brave</string>
<string name="app_label">App</string>
<string name="website_label">Website</string>
<string name="qsb_search_provider_app_required">App required.</string>
@@ -0,0 +1,15 @@
package app.lawnchair.qsb.providers
import app.lawnchair.qsb.ThemingMethod
import com.android.launcher3.R
object Brave : QsbSearchProvider(
id = "brave",
name = R.string.search_provider_brave,
icon = R.drawable.ic_brave,
themedIcon = R.drawable.ic_brave_tinted,
themingMethod = ThemingMethod.TINT,
packageName = "com.brave.browser",
className = "org.chromium.chrome.browser.searchwidget.SearchWidgetProviderActivity",
website = "https://search.brave.com/"
)
@@ -123,7 +123,8 @@ open class QsbSearchProvider(
Presearch,
Wikipedia,
Bing,
Sesame
Sesame,
Brave
)
/**