Commit 2e70c24e authored by Geoffrey Métais's avatar Geoffrey Métais

Set recommendations only on Android TV

parent 4234f905
......@@ -28,6 +28,7 @@ import android.content.Intent;
import android.util.Log;
import org.videolan.vlc.VLCApplication;
import org.videolan.vlc.util.AndroidDevices;
public class BootupReceiver extends BroadcastReceiver {
public BootupReceiver() {
......@@ -38,7 +39,7 @@ public class BootupReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().endsWith(Intent.ACTION_BOOT_COMPLETED)) {
if (AndroidDevices.isAndroidTv() && intent.getAction().endsWith(Intent.ACTION_BOOT_COMPLETED)) {
Log.d(TAG, "ACTION_BOOT_COMPLETED ");
scheduleRecommendationUpdate(context);
}
......
......@@ -164,9 +164,11 @@ public class MainTvActivity extends BaseTvActivity implements IVideoBrowser, OnI
if (mService != null)
mService.removeCallback(this);
super.onStop();
Intent recommendationIntent = new Intent(this,
RecommendationsService.class);
startService(recommendationIntent);
if (AndroidDevices.isAndroidTv()) {
Intent recommendationIntent = new Intent(this,
RecommendationsService.class);
startService(recommendationIntent);
}
}
protected void onResume() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment