[Android] Disable TV recommendations on Oreo

Geoffrey Métais git at videolan.org
Tue Dec 12 17:13:03 CET 2017


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

Disable TV recommendations on Oreo

(cherry picked from commit 0cc56b83769c36aa9818c9b0e57de95e4bc930f2)

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

 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