[Android] Avoid refreshing the widgets on TV as it's useless
Nicolas Pomepuy
git at videolan.org
Thu May 19 14:05:38 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu May 19 11:52:25 2022 +0200| [96ab574d9c4a9be4e2a5fa5416356e7b145754ae] | committer: Nicolas Pomepuy
Avoid refreshing the widgets on TV as it's useless
> https://code.videolan.org/videolan/vlc-android/commit/96ab574d9c4a9be4e2a5fa5416356e7b145754ae
---
.../app/src/main/java/org/videolan/mobile/app/AppSetupDelegate.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/application/app/src/main/java/org/videolan/mobile/app/AppSetupDelegate.kt b/application/app/src/main/java/org/videolan/mobile/app/AppSetupDelegate.kt
index edef8b473..44a8f57c5 100644
--- a/application/app/src/main/java/org/videolan/mobile/app/AppSetupDelegate.kt
+++ b/application/app/src/main/java/org/videolan/mobile/app/AppSetupDelegate.kt
@@ -39,6 +39,7 @@ import org.videolan.mobile.app.delegates.IIndexersDelegate
import org.videolan.mobile.app.delegates.IMediaContentDelegate
import org.videolan.mobile.app.delegates.IndexersDelegate
import org.videolan.mobile.app.delegates.MediaContentDelegate
+import org.videolan.resources.AndroidDevices
import org.videolan.resources.AppContextProvider
import org.videolan.resources.VLCInstance
import org.videolan.tools.AppScope
@@ -97,7 +98,7 @@ class AppSetupDelegate : AppDelegate,
packageManager.setComponentEnabledSetting(ComponentName(this at backgroundInit, SendCrashActivity::class.java),
if (BuildConfig.BETA) PackageManager.COMPONENT_ENABLED_STATE_ENABLED else PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP)
VersionMigration.migrateVersion(this at backgroundInit)
- sendBroadcast(Intent(MiniPlayerAppWidgetProvider.ACTION_WIDGET_INIT).apply {
+ if (!AndroidDevices.isAndroidTv) sendBroadcast(Intent(MiniPlayerAppWidgetProvider.ACTION_WIDGET_INIT).apply {
component = ComponentName(appContextProvider.appContext, MiniPlayerAppWidgetProvider::class.java)
})
More information about the Android
mailing list