Skip to content

Commit

Permalink
Add Fennec as search provider (#5227)
Browse files Browse the repository at this point in the history
  • Loading branch information
elisenlebkuch authored Jan 30, 2025
1 parent 02207fa commit b61765e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lawnchair/res/drawable/ic_fennec.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="37.571" android:viewportWidth="37.571" android:width="24dp">

<path android:fillColor="#ffd87a" android:fillType="evenOdd" android:pathData="m21.647,25.09c0,1.185 0.961,2.146 2.146,2.146 1.185,0 2.146,-0.961 2.146,-2.146 0,-1.185 -0.961,-2.146 -2.146,-2.146 -1.185,0 -2.146,0.961 -2.146,2.146zM35.719,24.851V4.341c-0,-0.954 -0.954,-1.192 -1.669,-0.715L18.785,13.165 3.522,3.625C2.806,3.148 1.852,3.387 1.852,4.341V24.851L16.913,34.154c-1.012,-0.937 -1,-2.442 0.026,-3.366 1.026,-0.924 2.681,-0.92 3.702,0.009 1.021,0.929 1.069,2.423 0.052,3.355zM33.083,7.658V21.968l-7.632,-4.77 4.293,-7.632zM15.923,25.09c0,1.185 -0.961,2.146 -2.146,2.146 -1.185,0 -2.146,-0.961 -2.146,-2.146 0,-1.185 0.961,-2.146 2.146,-2.146 1.185,0 2.146,0.961 2.146,2.146zM4.476,7.68V21.989L12.107,17.22 7.815,9.588Z" android:strokeColor="#00000000" android:strokeWidth="0"/>

</vector>
5 changes: 5 additions & 0 deletions lawnchair/res/drawable/ic_fennec_tinted.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="37.571" android:viewportWidth="37.571" android:width="24dp">

<path android:fillColor="#000000" android:fillType="evenOdd" android:pathData="m21.647,25.09c0,1.185 0.961,2.146 2.146,2.146 1.185,0 2.146,-0.961 2.146,-2.146 0,-1.185 -0.961,-2.146 -2.146,-2.146 -1.185,0 -2.146,0.961 -2.146,2.146zM35.719,24.851L35.719,4.341c0,-0.954 -0.954,-1.192 -1.669,-0.715L18.785,13.165 3.522,3.625C2.806,3.148 1.852,3.387 1.852,4.341L1.852,24.851L16.913,34.154c-1.012,-0.937 -1,-2.442 0.026,-3.366 1.026,-0.924 2.681,-0.92 3.702,0.01 1.021,0.929 1.069,2.423 0.052,3.355zM33.083,7.658L33.083,21.968l-7.632,-4.77 4.293,-7.632zM15.923,25.09c0,1.185 -0.961,2.146 -2.146,2.146 -1.185,0 -2.146,-0.961 -2.146,-2.146 0,-1.185 0.961,-2.146 2.146,-2.146 1.185,0 2.146,0.961 2.146,2.146zM4.476,7.68L4.476,21.989L12.107,17.22 7.815,9.588Z" android:strokeColor="#00000000" android:strokeWidth="0"/>

</vector>
1 change: 1 addition & 0 deletions lawnchair/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@
<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_fennec" translatable="false">Fennec</string>
<string name="search_provider_firefox" translatable="false">Firefox</string>
<string name="search_provider_iceraven" translatable="false">Iceraven</string>
<string name="search_provider_mull" translatable="false">Mull</string>
Expand Down
24 changes: 24 additions & 0 deletions lawnchair/src/app/lawnchair/qsb/providers/Fennec.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package app.lawnchair.qsb.providers

import android.content.Intent
import app.lawnchair.qsb.ThemingMethod
import com.android.launcher3.R

data object Fennec : QsbSearchProvider(
id = "Fennec",
name = R.string.search_provider_fennec,
icon = R.drawable.ic_fennec,
themedIcon = R.drawable.ic_fennec_tinted,
themingMethod = ThemingMethod.TINT,
packageName = "org.mozilla.fennec_fdroid",
action = "org.mozilla.fenix.OPEN_TAB",
className = "org.mozilla.fenix.IntentReceiverActivity",
website = "https://f-droid.org/packages/org.mozilla.fennec_fdroid/",
type = QsbSearchProviderType.APP,
supportVoiceIntent = true,
) {

override fun handleCreateVoiceIntent(): Intent = Intent(action)
.addFlags(INTENT_FLAGS)
.setClassName(packageName, "org.chromium.chrome.browser.VoiceSearchActivity")
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ sealed class QsbSearchProvider(
Bing,
Brave,
Yandex,
Fennec,
Firefox,
Iceraven,
Startpage,
Expand Down

0 comments on commit b61765e

Please sign in to comment.