mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-15 02:36:12 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b48d61571 | ||
|
|
92d5e2a40d | ||
|
|
234857c414 | ||
|
|
b1bbe785ea | ||
|
|
487fb49bff | ||
|
|
b14b7fa926 | ||
|
|
4cc1ab143d |
@@ -90,7 +90,7 @@ class RecorderModule @Inject constructor(
|
|||||||
|
|
||||||
private fun createRecordingFilePath() = File(
|
private fun createRecordingFilePath() = File(
|
||||||
File(context.cacheDir, "debug/logs"),
|
File(context.cacheDir, "debug/logs"),
|
||||||
"bb_logfile_${System.currentTimeMillis()}.log"
|
"capod_logfile_${System.currentTimeMillis()}.log"
|
||||||
)
|
)
|
||||||
|
|
||||||
suspend fun startRecorder(): File {
|
suspend fun startRecorder(): File {
|
||||||
@@ -123,6 +123,6 @@ class RecorderModule @Inject constructor(
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
internal val TAG = logTag("Debug", "Log", "Recorder", "Module")
|
internal val TAG = logTag("Debug", "Log", "Recorder", "Module")
|
||||||
private const val FORCE_FILE = "bb_force_debug_run"
|
private const val FORCE_FILE = "capod_force_debug_run"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
@@ -34,6 +34,7 @@ class DebugSettingsFragment : PreferenceFragment2() {
|
|||||||
vm.toggleRecorder()
|
vm.toggleRecorder()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+19
@@ -3,10 +3,15 @@ package eu.darken.capod.main.ui.settings.general.debug
|
|||||||
import androidx.lifecycle.SavedStateHandle
|
import androidx.lifecycle.SavedStateHandle
|
||||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||||
import eu.darken.capod.common.coroutine.DispatcherProvider
|
import eu.darken.capod.common.coroutine.DispatcherProvider
|
||||||
|
import eu.darken.capod.common.debug.autoreport.DebugSettings
|
||||||
|
import eu.darken.capod.common.debug.logging.log
|
||||||
import eu.darken.capod.common.debug.logging.logTag
|
import eu.darken.capod.common.debug.logging.logTag
|
||||||
import eu.darken.capod.common.debug.recording.core.RecorderModule
|
import eu.darken.capod.common.debug.recording.core.RecorderModule
|
||||||
import eu.darken.capod.common.uix.ViewModel3
|
import eu.darken.capod.common.uix.ViewModel3
|
||||||
|
import eu.darken.capod.main.core.GeneralSettings
|
||||||
|
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||||
import kotlinx.coroutines.flow.first
|
import kotlinx.coroutines.flow.first
|
||||||
|
import kotlinx.coroutines.flow.onEach
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@HiltViewModel
|
@HiltViewModel
|
||||||
@@ -14,10 +19,24 @@ class DebugSettingsFragmentVM @Inject constructor(
|
|||||||
private val handle: SavedStateHandle,
|
private val handle: SavedStateHandle,
|
||||||
dispatcherProvider: DispatcherProvider,
|
dispatcherProvider: DispatcherProvider,
|
||||||
private val recorderModule: RecorderModule,
|
private val recorderModule: RecorderModule,
|
||||||
|
private val generalSettings: GeneralSettings,
|
||||||
|
private val debugSettings: DebugSettings,
|
||||||
) : ViewModel3(dispatcherProvider) {
|
) : ViewModel3(dispatcherProvider) {
|
||||||
|
|
||||||
val state = recorderModule.state.asLiveData2()
|
val state = recorderModule.state.asLiveData2()
|
||||||
|
|
||||||
|
init {
|
||||||
|
debugSettings.showUnfiltered.flow
|
||||||
|
.distinctUntilChanged()
|
||||||
|
.onEach { showUnfiltered ->
|
||||||
|
if (showUnfiltered) {
|
||||||
|
log(TAG) { "Enabling 'show all' due to debug setting 'show unfiltered' enabled" }
|
||||||
|
generalSettings.showAll.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.launchInViewModel()
|
||||||
|
}
|
||||||
|
|
||||||
fun toggleRecorder() = launch {
|
fun toggleRecorder() = launch {
|
||||||
if (recorderModule.state.first().isRecording) {
|
if (recorderModule.state.first().isRecording) {
|
||||||
recorderModule.stopRecorder()
|
recorderModule.stopRecorder()
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ interface PodDevice {
|
|||||||
"TWS i99999"
|
"TWS i99999"
|
||||||
),
|
),
|
||||||
@Json(name = "fakes.varunr.airpodspro") VARUNR_AIRPODS_PRO(
|
@Json(name = "fakes.varunr.airpodspro") VARUNR_AIRPODS_PRO(
|
||||||
"Varunr AirPods Pro"
|
"Fake AirPods Pro"
|
||||||
),
|
),
|
||||||
@Json(name = "unknown") UNKNOWN(
|
@Json(name = "unknown") UNKNOWN(
|
||||||
"Unknown"
|
"Unknown"
|
||||||
|
|||||||
@@ -135,5 +135,5 @@
|
|||||||
<string name="settings_compatibility_mode_label">Kompatibilitätsmodus</string>
|
<string name="settings_compatibility_mode_label">Kompatibilitätsmodus</string>
|
||||||
<string name="settings_compatibility_mode_description">Deaktivieren Sie Optimierungen, um die Kompatibilität zu verbessern. Versuchen Sie dies, wenn Sie keine Daten sehen.</string>
|
<string name="settings_compatibility_mode_description">Deaktivieren Sie Optimierungen, um die Kompatibilität zu verbessern. Versuchen Sie dies, wenn Sie keine Daten sehen.</string>
|
||||||
<string name="translators_thanks_title">Übersetzer</string>
|
<string name="translators_thanks_title">Übersetzer</string>
|
||||||
<string name="translators_thanks_description" comment="translators_thanks_description You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings>Acknowledgements>Thank you section. Separate names by semicolons and an optional email may be included in brackets, example: darken(darken@darken.eu);John Doe(john@example.com) "darken" is just a placeholder and does not have to be kept if/when you add yours. Be nice to each other!">darken</string>
|
<string name="translators_thanks_description" comment="translators_thanks_description You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings>Acknowledgements>Thank you section. Separate names by semicolons and an optional email may be included in brackets, example: darken(darken@darken.eu);John Doe(john@example.com) "darken" is just a placeholder and does not have to be kept if/when you add yours. Be nice to each other!">Gamechanger181</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -134,4 +134,14 @@
|
|||||||
<string name="permission_required_title">Izin berikut diperlukan:</string>
|
<string name="permission_required_title">Izin berikut diperlukan:</string>
|
||||||
<string name="settings_compatibility_mode_label">Mode kompatibilitas</string>
|
<string name="settings_compatibility_mode_label">Mode kompatibilitas</string>
|
||||||
<string name="settings_compatibility_mode_description">Nonaktifkan pengoptimalan untuk meningkatkan kompatibilitas. Coba ini jika anda tidak melihat data apa pun.</string>
|
<string name="settings_compatibility_mode_description">Nonaktifkan pengoptimalan untuk meningkatkan kompatibilitas. Coba ini jika anda tidak melihat data apa pun.</string>
|
||||||
|
<string name="translators_thanks_title">Penerjemah</string>
|
||||||
|
<string name="translators_thanks_description" comment="translators_thanks_description You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings>Acknowledgements>Thank you section. Separate names by semicolons and an optional email may be included in brackets, example: darken(darken@darken.eu);John Doe(john@example.com) "darken" is just a placeholder and does not have to be kept if/when you add yours. Be nice to each other!">nama anda dapat ditambahkan sebagai relawan di sini dan ditampilkan di aplikasi. Itu akan ditampilkan pada bagian Pengaturan>Penghargaan>Terima kasih
|
||||||
|
|
||||||
|
Pisahkan nama dengan titik koma dan email opsional dapat dimasukkan dalam tanda kurung, contoh:
|
||||||
|
|
||||||
|
𝓼𝓾𝓵𝓽𝓪𝓷 𝓱𝓪𝓶𝓴𝓪(sultanhamka@gmail.com); John Doe(john@example.com)
|
||||||
|
|
||||||
|
\"𝓼𝓾𝓵𝓽𝓪𝓷 𝓱𝓪𝓶𝓴𝓪\" hanyalah pengganti dan tidak harus disimpan jika/ketika anda menambahkan milik anda.
|
||||||
|
|
||||||
|
Bersikap baik satu sama lain!</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
<string name="upgrade_capod_label">Atualizar CAPod</string>
|
<string name="upgrade_capod_label">Atualizar CAPod</string>
|
||||||
<string name="upgrade_capod_description">Obtenha recursos adicionais e dê suporte ao desenvolvedor.</string>
|
<string name="upgrade_capod_description">Obtenha recursos adicionais e dê suporte ao desenvolvedor.</string>
|
||||||
<string name="settings_popup_caseopen_label">Mostrar pop-up</string>
|
<string name="settings_popup_caseopen_label">Mostrar pop-up</string>
|
||||||
<string name="settings_popup_caseopen_description">Mostrar um pop-up quando o estojo do dispositivo for aberta (experimental).</string>
|
<string name="settings_popup_caseopen_description">Mostrar um pop-up quando o estojo do dispositivo for aberto (experimental).</string>
|
||||||
<string name="overview_bluetooth_disabled_label">Bluetooth está desativado</string>
|
<string name="overview_bluetooth_disabled_label">Bluetooth está desativado</string>
|
||||||
<string name="overview_bluetooth_disabled_description">O Bluetooth está desabilitado, habilite-o ;)</string>
|
<string name="overview_bluetooth_disabled_description">O Bluetooth está desabilitado, habilite-o ;)</string>
|
||||||
<string name="help_translate_label">Tradução</string>
|
<string name="help_translate_label">Tradução</string>
|
||||||
@@ -135,5 +135,5 @@
|
|||||||
<string name="settings_compatibility_mode_label">Modo de compatibilidade</string>
|
<string name="settings_compatibility_mode_label">Modo de compatibilidade</string>
|
||||||
<string name="settings_compatibility_mode_description">Desative as otimizações para melhorar a compatibilidade. Tente isso se você não estiver vendo nenhum dado.</string>
|
<string name="settings_compatibility_mode_description">Desative as otimizações para melhorar a compatibilidade. Tente isso se você não estiver vendo nenhum dado.</string>
|
||||||
<string name="translators_thanks_title">Tradutores</string>
|
<string name="translators_thanks_title">Tradutores</string>
|
||||||
<string name="translators_thanks_description" comment="translators_thanks_description You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings>Acknowledgements>Thank you section. Separate names by semicolons and an optional email may be included in brackets, example: darken(darken@darken.eu);John Doe(john@example.com) "darken" is just a placeholder and does not have to be kept if/when you add yours. Be nice to each other!">Igor Silva(ferrare42@gmail.com)</string>
|
<string name="translators_thanks_description" comment="translators_thanks_description You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings>Acknowledgements>Thank you section. Separate names by semicolons and an optional email may be included in brackets, example: darken(darken@darken.eu);John Doe(john@example.com) "darken" is just a placeholder and does not have to be kept if/when you add yours. Be nice to each other!">Igor Silva (ferrare42@gmail.com)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
<string name="debug_debuglog_size_label">大小</string>
|
<string name="debug_debuglog_size_label">大小</string>
|
||||||
<string name="debug_debuglog_size_compressed_label">壓縮後大小</string>
|
<string name="debug_debuglog_size_compressed_label">壓縮後大小</string>
|
||||||
<string name="debug_notification_channel_label">偵錯通知</string>
|
<string name="debug_notification_channel_label">偵錯通知</string>
|
||||||
<string name="debug_debuglog_file_label">已記錄的日誌檔</string>
|
<string name="debug_debuglog_file_label">已記錄的記錄檔</string>
|
||||||
<string name="debug_debuglog_record_action">記錄偵錯日誌</string>
|
<string name="debug_debuglog_record_action">記錄偵錯記錄</string>
|
||||||
<string name="permission_bluetooth_connect_label">藍牙連線</string>
|
<string name="permission_bluetooth_connect_label">藍牙連線</string>
|
||||||
<string name="permission_bluetooth_connect_description">本應用程式需要「藍牙連線」權限以與已配對的裝置交互或配對新裝置。</string>
|
<string name="permission_bluetooth_connect_description">本應用程式需要「藍牙連線」權限以與已配對的裝置交互或配對新裝置。</string>
|
||||||
<string name="permission_bluetooth_scan_label">藍牙掃描</string>
|
<string name="permission_bluetooth_scan_label">藍牙掃描</string>
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ buildscript {
|
|||||||
'version' : [
|
'version' : [
|
||||||
'major': 1,
|
'major': 1,
|
||||||
'minor': 3,
|
'minor': 3,
|
||||||
'patch': 9,
|
'patch': 11,
|
||||||
'build': 0,
|
'build': 0,
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
CAPod - Companion for AirPods
|
CAPod - Companion app per le Airpods
|
||||||
Reference in New Issue
Block a user