Skip to content

Commit 16223d0

Browse files
DaVinci9196mar-v-in
authored andcommitted
Phenotype: Add supported Gemini languages for GMail app
1 parent 4ae174e commit 16223d0

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

play-services-core/src/main/kotlin/org/microg/gms/phenotype/PhenotypeService.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ private val CONFIGURATION_OPTIONS = mapOf(
6262
Flag("45620220", true, 0),
6363
// Show Audio Call Button
6464
Flag("45613814", true, 0),
65-
)
65+
),
66+
"com.google.apps_mobile.common.services.gmail.android#com.google.android.gm" to arrayOf(
67+
Flag("45661535", encodeSupportedLanguageList(), 0),
68+
Flag("45700179", encodeSupportedLanguageList(), 0)
69+
),
6670
)
6771

6872
class PhenotypeServiceImpl(val packageName: String?) : IPhenotypeService.Stub() {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* SPDX-FileCopyrightText: 2025 microG Project Team
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
package org.microg.gms.phenotype
7+
8+
private val supportedLanguages = listOf(
9+
"bs", "pt", "ja", "ko", "fr", "it", "de", "zh", "nl",
10+
"iw", "he", "tr", "cs", "id", "in", "sv", "da", "no",
11+
"nb", "pl", "vi", "th", "fi", "uk", "ar", "el", "ru",
12+
"hu", "ro", "ca"
13+
)
14+
15+
fun encodeSupportedLanguageList(): ByteArray {
16+
return supportedLanguages.flatMap { lang ->
17+
listOf(0x0A.toByte(), 0x02.toByte()) + lang.toByteArray(Charsets.UTF_8).toList()
18+
}.toByteArray()
19+
}

0 commit comments

Comments
 (0)