Merge pull request #7541 from zackhow/notoreo

AndroidTv: Don't run oreo channels when not on oreo
This commit is contained in:
JosJuice 2018-11-03 18:54:27 +01:00 committed by GitHub
commit 710b893b91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -197,6 +197,9 @@ public class TvUtil
*/
public static void scheduleSyncingChannel(Context context)
{
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O)
return;
ComponentName componentName = new ComponentName(context, SyncChannelJobService.class);
JobInfo.Builder builder = new JobInfo.Builder(1, componentName);
builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY);