[Android] Disable TV recommendations on Oreo

Geoffrey Métais git at videolan.org
Tue Dec 12 11:14:07 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec 12 10:04:57 2017 +0100| [0cc56b83769c36aa9818c9b0e57de95e4bc930f2] | committer: Geoffrey Métais

Disable TV recommendations on Oreo

> https://code.videolan.org/videolan/vlc-android/commit/0cc56b83769c36aa9818c9b0e57de95e4bc930f2
---

 vlc-android/src/org/videolan/vlc/BootupReceiver.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/BootupReceiver.java b/vlc-android/src/org/videolan/vlc/BootupReceiver.java
index 8c66ab6a9..a33f6f325 100644
--- a/vlc-android/src/org/videolan/vlc/BootupReceiver.java
+++ b/vlc-android/src/org/videolan/vlc/BootupReceiver.java
@@ -27,6 +27,7 @@ import android.content.Context;
 import android.content.Intent;
 import android.util.Log;
 
+import org.videolan.libvlc.util.AndroidUtil;
 import org.videolan.vlc.util.AndroidDevices;
 
 public class BootupReceiver extends BroadcastReceiver {
@@ -38,8 +39,9 @@ public class BootupReceiver extends BroadcastReceiver {
 
     @Override
     public void onReceive(Context context, Intent intent) {
-        if (AndroidDevices.isAndroidTv && intent.getAction().endsWith(Intent.ACTION_BOOT_COMPLETED)) {
-            Log.d(TAG, "ACTION_BOOT_COMPLETED ");
+        final String action = intent.getAction();
+        if (action != null && AndroidDevices.isAndroidTv && !AndroidUtil.isOOrLater && action.endsWith(Intent.ACTION_BOOT_COMPLETED)) {
+            if (BuildConfig.DEBUG) Log.d(TAG, "ACTION_BOOT_COMPLETED ");
             scheduleRecommendationUpdate(context);
         }
     }



More information about the Android mailing list