Merge pull request #8598 from JosJuice/channel-sync-android-tv

Android: More robust check for whether to sync channels
This commit is contained in:
Léo Lam 2020-03-16 20:53:47 +01:00 committed by GitHub
commit d4085382dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -59,8 +59,6 @@ public final class TvMainActivity extends FragmentActivity implements MainView
{
StartupHandler.HandleInit(this);
}
// Setup and/or sync channels
TvUtil.scheduleSyncingChannel(getApplicationContext());
}
@Override

View File

@ -27,6 +27,10 @@ public final class StartupHandler
// Ask the user if he wants to enable analytics if we haven't yet.
Analytics.checkAnalyticsInit(parent);
// Set up and/or sync Android TV channels
if (TvUtil.isLeanback(parent))
TvUtil.scheduleSyncingChannel(parent);
String[] start_files = null;
Bundle extras = parent.getIntent().getExtras();
if (extras != null)