[Android] Add a log in beta to understand an IllegalStateException crash
Nicolas Pomepuy
git at videolan.org
Thu Oct 17 13:38:14 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Oct 17 11:49:55 2024 +0200| [69a4d8eb3786d96b2b679598415188b8f341822c] | committer: Duncan McNamara
Add a log in beta to understand an IllegalStateException crash
> https://code.videolan.org/videolan/vlc-android/commit/69a4d8eb3786d96b2b679598415188b8f341822c
---
.../java/org/videolan/television/ui/browser/VerticalGridActivity.kt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/application/television/src/main/java/org/videolan/television/ui/browser/VerticalGridActivity.kt b/application/television/src/main/java/org/videolan/television/ui/browser/VerticalGridActivity.kt
index 8f22d96470..2dcf178cc7 100644
--- a/application/television/src/main/java/org/videolan/television/ui/browser/VerticalGridActivity.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/browser/VerticalGridActivity.kt
@@ -23,6 +23,7 @@ package org.videolan.television.ui.browser
import android.annotation.TargetApi
import android.os.Build
import android.os.Bundle
+import android.util.Log
import android.view.KeyEvent
import android.view.LayoutInflater
import android.view.View
@@ -38,6 +39,7 @@ import org.videolan.television.databinding.TvVerticalGridBinding
import org.videolan.television.ui.MainTvActivity
import org.videolan.television.ui.browser.interfaces.BrowserActivityInterface
import org.videolan.television.ui.browser.interfaces.DetailsFragment
+import org.videolan.vlc.BuildConfig
import org.videolan.vlc.interfaces.BrowserFragmentInterface
import org.videolan.vlc.interfaces.Sortable
import org.videolan.vlc.viewmodels.browser.TYPE_FILE
@@ -84,6 +86,7 @@ class VerticalGridActivity : BaseTvActivity(), BrowserActivityInterface {
finish()
return
}
+ if (!::fragment.isInitialized && BuildConfig.BETA) Log.i("VerticalGridActivity", "Fragment not initialized: $type")
supportFragmentManager.beginTransaction()
.add(R.id.tv_fragment_placeholder, fragment as Fragment)
.commit()
More information about the Android
mailing list