Add option to show fake devices

This commit is contained in:
darken
2022-01-06 11:59:30 +01:00
parent 5637cff557
commit f9d39a6319
34 changed files with 307 additions and 107 deletions
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M15,4l0,2l3,0l0,12l-3,0l0,2l5,0l0,-16z" />
<path
android:fillColor="@android:color/white"
android:pathData="M4,20l5,0l0,-2l-3,0l0,-12l3,0l0,-2l-5,0z" />
</vector>
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M20.41,8.41l-4.83,-4.83C15.21,3.21 14.7,3 14.17,3H5C3.9,3 3,3.9 3,5v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V9.83C21,9.3 20.79,8.79 20.41,8.41zM7,7h7v2H7V7zM17,17H7v-2h10V17zM17,13H7v-2h10V13z" />
</vector>
+5 -5
View File
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_item_settings"
android:title="@string/settings_general_label" />
<item
android:id="@+id/menu_item_debuglog"
android:title="@string/debug_debuglog_record_action" />
android:icon="@drawable/ic_baseline_settings_24"
android:title="@string/settings_general_label"
app:showAsAction="always" />
</menu>
+4
View File
@@ -103,4 +103,8 @@
<string name="pods_single_basic_status_short">Headphones: %1$s</string>
<string name="permission_background_location_label">ACCESS_BACKGROUND_LOCATION</string>
<string name="permission_background_location_description">Allows an app to access location in the background.</string>
<string name="settings_fake_data_label">Fake data</string>
<string name="settings_fake_data_description">Show fake data, i.e. simulate device that don\'t exist.</string>
<string name="settings_debug_label">Debug settings</string>
<string name="settings_debug_description">Additional settings to help troubleshoot issues with the app.</string>
</resources>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<Preference
android:icon="@drawable/ic_baseline_text_snippet_24"
android:key="debug.log.record"
android:title="@string/debug_debuglog_record_action" />
<CheckBoxPreference
android:icon="@drawable/ic_baseline_bug_report_24"
android:key="debug.mode.enabled"
android:summary="@string/settings_debug_mode_description"
android:title="@string/settings_debug_mode_label" />
<CheckBoxPreference
android:icon="@drawable/ic_baseline_data_array_24"
android:key="debug.fakedata.enabled"
android:summary="@string/settings_fake_data_description"
android:title="@string/settings_fake_data_label" />
</PreferenceScreen>
+5 -4
View File
@@ -39,11 +39,12 @@
android:summary="@string/settings_debug_autoreports_description"
android:title="@string/settings_debug_autoreports_label" />
<CheckBoxPreference
<Preference
android:icon="@drawable/ic_baseline_bug_report_24"
android:key="debug.mode.enabled"
android:summary="@string/settings_debug_mode_description"
android:title="@string/settings_debug_mode_label" />
android:key="debug.settings"
android:fragment="eu.darken.capod.main.ui.settings.general.debug.DebugSettingsFragment"
android:summary="@string/settings_debug_description"
android:title="@string/settings_debug_label" />
</PreferenceCategory>