[Android] Enable debug logs for debug builds
Nicolas Pomepuy
git at videolan.org
Mon Sep 5 12:57:33 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Sep 5 14:51:56 2022 +0200| [0d93c33a0c42a79887e3477900897e22de65451f] | committer: Nicolas Pomepuy
Enable debug logs for debug builds
> https://code.videolan.org/videolan/vlc-android/commit/0d93c33a0c42a79887e3477900897e22de65451f
---
application/app/flavors/release/AndroidManifest.xml | 14 ++------------
application/vlc-android/AndroidManifest.xml | 6 ++++++
.../videolan/vlc/gui/preferences/PreferencesAdvanced.kt | 2 --
3 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/application/app/flavors/release/AndroidManifest.xml b/application/app/flavors/release/AndroidManifest.xml
index fc24b1ae1..36cfd0af5 100644
--- a/application/app/flavors/release/AndroidManifest.xml
+++ b/application/app/flavors/release/AndroidManifest.xml
@@ -24,12 +24,8 @@
~
-->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
- <uses-permission android:name="android.permission.READ_LOGS" tools:node="remove" />
-
- <!-- Extensions API permissions -->
<permission
android:name="org.videolan.vlc.permission.READ_EXTENSION_DATA"
android:protectionLevel="normal" />
@@ -41,12 +37,6 @@
<uses-permission android:name="org.videolan.vlc.permission.READ_EXTENSION_DATA" />
<uses-permission android:name="org.videolan.vlc.permission.BIND_DATA_CONSUMER" />
- <application>
- <activity android:name="${applicationId}.gui.DebugLogActivity"
- android:theme="@style/Theme.VLC"
- android:launchMode="singleTop" />
- <service android:name="${applicationId}.DebugLogService"
- android:process=":logger" />
- </application>
+ <application/>
</manifest>
diff --git a/application/vlc-android/AndroidManifest.xml b/application/vlc-android/AndroidManifest.xml
index e169bb27d..5d093891d 100644
--- a/application/vlc-android/AndroidManifest.xml
+++ b/application/vlc-android/AndroidManifest.xml
@@ -682,6 +682,12 @@
android:name="android.media.tv.input"
android:resource="@xml/previewinputservice"/>
</service>
+
+ <activity android:name=".gui.DebugLogActivity"
+ android:theme="@style/Theme.VLC"
+ android:launchMode="singleTop" />
+ <service android:name=".DebugLogService"
+ android:process=":logger" />
</application>
</manifest>
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt b/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
index d5ecc5779..bfc37bcfc 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.kt
@@ -48,7 +48,6 @@ import org.videolan.resources.*
import org.videolan.tools.BitmapCache
import org.videolan.tools.Settings
import org.videolan.tools.putSingle
-import org.videolan.vlc.BuildConfig
import org.videolan.vlc.R
import org.videolan.vlc.gui.DebugLogActivity
import org.videolan.vlc.gui.dialogs.ConfirmDeleteDialog
@@ -72,7 +71,6 @@ class PreferencesAdvanced : BasePreferenceFragment(), SharedPreferences.OnShared
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- if (BuildConfig.DEBUG) findPreference<Preference>("debug_logs")?.isVisible = false
if (FeatureFlag.values().isNotEmpty()) findPreference<Preference>("optional_features")?.isVisible = true
findPreference<EditTextPreference>("network_caching")?.setOnBindEditTextListener {
More information about the Android
mailing list