Skip to content

Commit

Permalink
foi será?
Browse files Browse the repository at this point in the history
  • Loading branch information
BrayanDSO committed Dec 25, 2024
1 parent 4ab55c6 commit a711700
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 223 deletions.

This file was deleted.

15 changes: 15 additions & 0 deletions AnkiDroid/src/main/java/com/ichi2/anki/analytics/UsageAnalytics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,21 @@ object UsageAnalytics {
"binding_USER_ACTION_7",
"binding_USER_ACTION_8",
"binding_USER_ACTION_9",
// ******************************** Controls - Previewer *******************************
"previewer_NEXT",
"previewer_BACK",
"previewer_MARK",
"previewer_EDIT",
"previewer_REPLAY_AUDIO",
"previewer_BACKSIDE_ONLY",
"previewer_TOGGLE_FLAG_RED",
"previewer_TOGGLE_FLAG_ORANGE",
"previewer_TOGGLE_FLAG_GREEN",
"previewer_TOGGLE_FLAG_BLUE",
"previewer_TOGGLE_FLAG_PINK",
"previewer_TOGGLE_FLAG_TURQUOISE",
"previewer_TOGGLE_FLAG_PURPLE",
"previewer_UNSET_FLAG",
// ******************************** Accessibility ******************************************
"cardZoom",
"imageZoom",
Expand Down
108 changes: 0 additions & 108 deletions AnkiDroid/src/main/java/com/ichi2/anki/reviewer/PeripheralKeymap.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class PreferencesAnalyticsTest : RobolectricTest() {
"widgetVibrate",
// Blink light
"widgetBlink",
// Special views
"controlsTabLayout",
// potential personal data
"syncAccount",
"syncBaseUrl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,19 @@ object PreferenceTestUtils {
@XmlRes xml: Int,
): List<String> = getAttrFromXml(context, xml, "key").map { attrValueToString(it, context) }

fun getAllPreferenceKeys(context: Context): Set<String> =
getAllPreferencesFragments(context)
.filterIsInstance<SettingsFragment>()
.map { it.preferenceResource }
.flatMapTo(hashSetOf()) { getKeysFromXml(context, it) }
fun getAllPreferenceKeys(context: Context): Set<String> {
val controlPreferencesKeys =
ControlPreferenceScreen.entries.flatMap {
getKeysFromXml(context, it.xmlRes)
}
val staticPreferencesKeys =
getAllPreferencesFragments(context)
.filterIsInstance<SettingsFragment>()
.map { it.preferenceResource }
.flatMapTo(hashSetOf()) { getKeysFromXml(context, it) }

return staticPreferencesKeys + controlPreferencesKeys
}

fun getAllCustomButtonKeys(context: Context): Set<String> {
val keys = getKeysFromXml(context, R.xml.preferences_custom_buttons).toMutableSet()
Expand Down

This file was deleted.

0 comments on commit a711700

Please sign in to comment.