Compare commits

..
9 Commits
Author SHA1 Message Date
darken 78ccddf87c Fix notification icon/text color to match light/dark theme. 2022-05-01 17:48:32 +02:00
darken df1bc48e84 Version bump (1.3.12) 2022-05-01 17:36:17 +02:00
darken 3b48d61571 Version bump (1.3.11) 2022-05-01 17:17:53 +02:00
darken 92d5e2a40d Updated translations 2022-05-01 17:13:42 +02:00
darken 234857c414 When enabling unfiltered BLE data, also enable "show all" to make debugging easier. 2022-05-01 16:42:17 +02:00
darken b1bbe785ea Fix debug log naming 2022-04-18 11:10:10 +02:00
darken 487fb49bff Update translations 2022-04-17 13:27:23 +02:00
darken b14b7fa926 Version bump (1.3.10) 2022-04-17 13:08:42 +02:00
darken 4cc1ab143d Change fake airpods pro name. 2022-04-17 13:07:27 +02:00
14 changed files with 68 additions and 28 deletions
@@ -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"
} }
} }
@@ -34,6 +34,7 @@ class DebugSettingsFragment : PreferenceFragment2() {
vm.toggleRecorder() vm.toggleRecorder()
true true
} }
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
} }
@@ -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"
@@ -18,12 +18,12 @@
<ImageView <ImageView
android:id="@+id/pod_left_icon" android:id="@+id/pod_left_icon"
style="@style/PodInfoItemIcon" style="@style/PodInfoItemIcon.Notification"
android:src="@drawable/ic_airpod_left_24" /> android:src="@drawable/ic_airpod_left_24" />
<TextView <TextView
android:id="@+id/pod_left_label" android:id="@+id/pod_left_label"
style="@style/TextAppearance.Compat.Notification.Title" style="@style/PodInfoItemText.Notification"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
@@ -31,12 +31,12 @@
<ImageView <ImageView
android:id="@+id/pod_left_charging" android:id="@+id/pod_left_charging"
style="@style/PodInfoItemIcon" style="@style/PodInfoItemIcon.Notification"
android:src="@drawable/ic_baseline_power_24" /> android:src="@drawable/ic_baseline_power_24" />
<ImageView <ImageView
android:id="@+id/pod_left_ear" android:id="@+id/pod_left_ear"
style="@style/PodInfoItemIcon" style="@style/PodInfoItemIcon.Notification"
android:src="@drawable/ic_baseline_hearing_24" /> android:src="@drawable/ic_baseline_hearing_24" />
</LinearLayout> </LinearLayout>
@@ -52,12 +52,12 @@
<ImageView <ImageView
android:id="@+id/pod_case_icon" android:id="@+id/pod_case_icon"
style="@style/PodInfoItemIcon" style="@style/PodInfoItemIcon.Notification"
android:src="@drawable/ic_airpod_case_24" /> android:src="@drawable/ic_airpod_case_24" />
<TextView <TextView
android:id="@+id/pod_case_label" android:id="@+id/pod_case_label"
style="@style/TextAppearance.Compat.Notification.Title" style="@style/PodInfoItemText.Notification"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
@@ -65,7 +65,7 @@
<ImageView <ImageView
android:id="@+id/pod_case_charging" android:id="@+id/pod_case_charging"
style="@style/PodInfoItemIcon" style="@style/PodInfoItemIcon.Notification"
android:src="@drawable/ic_baseline_power_24" /> android:src="@drawable/ic_baseline_power_24" />
</LinearLayout> </LinearLayout>
@@ -81,12 +81,12 @@
<ImageView <ImageView
android:id="@+id/pod_right_icon" android:id="@+id/pod_right_icon"
style="@style/PodInfoItemIcon" style="@style/PodInfoItemIcon.Notification"
android:src="@drawable/ic_airpod_right_24" /> android:src="@drawable/ic_airpod_right_24" />
<TextView <TextView
android:id="@+id/pod_right_label" android:id="@+id/pod_right_label"
style="@style/TextAppearance.Compat.Notification.Title" style="@style/PodInfoItemText.Notification"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
@@ -94,12 +94,12 @@
<ImageView <ImageView
android:id="@+id/pod_right_charging" android:id="@+id/pod_right_charging"
style="@style/PodInfoItemIcon" style="@style/PodInfoItemIcon.Notification"
android:src="@drawable/ic_baseline_power_24" /> android:src="@drawable/ic_baseline_power_24" />
<ImageView <ImageView
android:id="@+id/pod_right_ear" android:id="@+id/pod_right_ear"
style="@style/PodInfoItemIcon" style="@style/PodInfoItemIcon.Notification"
android:src="@drawable/ic_baseline_hearing_24" /> android:src="@drawable/ic_baseline_hearing_24" />
</LinearLayout> </LinearLayout>
@@ -7,7 +7,7 @@
<TextView <TextView
android:id="@+id/headphones_label" android:id="@+id/headphones_label"
style="@style/TextAppearance.Compat.Notification.Title" style="@style/PodInfoItemText.Notification"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
@@ -21,12 +21,12 @@
<ImageView <ImageView
android:id="@+id/headphones_battery_icon" android:id="@+id/headphones_battery_icon"
style="@style/PodInfoItemIcon" style="@style/PodInfoItemIcon.Notification"
android:src="@drawable/ic_baseline_battery_unknown_24" /> android:src="@drawable/ic_baseline_battery_unknown_24" />
<TextView <TextView
android:id="@+id/headphones_battery_label" android:id="@+id/headphones_battery_label"
style="@style/TextAppearance.Compat.Notification.Title" style="@style/PodInfoItemText.Notification"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
@@ -35,12 +35,12 @@
<ImageView <ImageView
android:id="@+id/headphones_charging" android:id="@+id/headphones_charging"
style="@style/PodInfoItemIcon" style="@style/PodInfoItemIcon.Notification"
android:src="@drawable/ic_baseline_power_24" /> android:src="@drawable/ic_baseline_power_24" />
<ImageView <ImageView
android:id="@+id/headphones_worn" android:id="@+id/headphones_worn"
style="@style/PodInfoItemIcon" style="@style/PodInfoItemIcon.Notification"
android:src="@drawable/ic_baseline_hearing_24" /> android:src="@drawable/ic_baseline_hearing_24" />
</LinearLayout> </LinearLayout>
@@ -6,7 +6,7 @@
<TextView <TextView
android:id="@+id/device" android:id="@+id/device"
style="@style/TextAppearance.Compat.Notification.Title" style="@style/PodInfoItemText.Notification"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp" android:layout_marginHorizontal="8dp"
+1 -1
View File
@@ -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&#10;&#10;You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings&gt;Acknowledgements&gt;Thank you section.&#10;&#10;Separate names by semicolons and an optional email may be included in brackets, example:&#10;&#10;darken(darken@darken.eu);John Doe(john@example.com)&#10;&#10;&quot;darken&quot; is just a placeholder and does not have to be kept if/when you add yours.&#10;&#10;Be nice to each other!">darken</string> <string name="translators_thanks_description" comment="translators_thanks_description&#10;&#10;You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings&gt;Acknowledgements&gt;Thank you section.&#10;&#10;Separate names by semicolons and an optional email may be included in brackets, example:&#10;&#10;darken(darken@darken.eu);John Doe(john@example.com)&#10;&#10;&quot;darken&quot; is just a placeholder and does not have to be kept if/when you add yours.&#10;&#10;Be nice to each other!">Gamechanger181</string>
</resources> </resources>
+10
View File
@@ -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&#10;&#10;You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings&gt;Acknowledgements&gt;Thank you section.&#10;&#10;Separate names by semicolons and an optional email may be included in brackets, example:&#10;&#10;darken(darken@darken.eu);John Doe(john@example.com)&#10;&#10;&quot;darken&quot; is just a placeholder and does not have to be kept if/when you add yours.&#10;&#10;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>
+2 -2
View File
@@ -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&#10;&#10;You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings&gt;Acknowledgements&gt;Thank you section.&#10;&#10;Separate names by semicolons and an optional email may be included in brackets, example:&#10;&#10;darken(darken@darken.eu);John Doe(john@example.com)&#10;&#10;&quot;darken&quot; is just a placeholder and does not have to be kept if/when you add yours.&#10;&#10;Be nice to each other!">Igor Silva(ferrare42@gmail.com)</string> <string name="translators_thanks_description" comment="translators_thanks_description&#10;&#10;You can voluntarily add your name here to have it displayed in the app. It will be shown in the Settings&gt;Acknowledgements&gt;Thank you section.&#10;&#10;Separate names by semicolons and an optional email may be included in brackets, example:&#10;&#10;darken(darken@darken.eu);John Doe(john@example.com)&#10;&#10;&quot;darken&quot; is just a placeholder and does not have to be kept if/when you add yours.&#10;&#10;Be nice to each other!">Igor Silva (ferrare42@gmail.com)</string>
</resources> </resources>
+2 -2
View File
@@ -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>
+11 -1
View File
@@ -7,7 +7,17 @@
<item name="android:layout_marginEnd">8dp</item> <item name="android:layout_marginEnd">8dp</item>
</style> </style>
<style name="PodInfoItemIcon"> <style name="PodInfoItemIcon.Notification" parent="TextAppearance.Compat.Notification.Title">
<item name="android:layout_height">20dp</item>
<item name="android:layout_width">20dp</item>
</style>
<style name="PodInfoItemText.Notification" parent="TextAppearance.Compat.Notification.Title">
<item name="android:singleLine">true</item>
<item name="android:ellipsize">end</item>
</style>
<style name="PodInfoItemIcon" parent="TextAppearance.MaterialComponents.Body2">
<item name="android:layout_height">20dp</item> <item name="android:layout_height">20dp</item>
<item name="android:layout_width">20dp</item> <item name="android:layout_width">20dp</item>
</style> </style>
+1 -1
View File
@@ -8,7 +8,7 @@ buildscript {
'version' : [ 'version' : [
'major': 1, 'major': 1,
'minor': 3, 'minor': 3,
'patch': 9, 'patch': 12,
'build': 0, 'build': 0,
], ],
] ]
+1 -1
View File
@@ -1 +1 @@
CAPod - Companion for AirPods CAPod - Companion app per le Airpods