File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
library/src/main/java/com/google/android/media/tv/companionlibrary/sync Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 3131import android .media .tv .TvInputInfo ;
3232import android .net .Uri ;
3333import android .os .AsyncTask ;
34+ import android .os .Build ;
3435import android .os .PersistableBundle ;
3536import android .os .RemoteException ;
3637import android .support .annotation .VisibleForTesting ;
@@ -349,8 +350,10 @@ public static void requestImmediateSync(
349350 throw new IllegalArgumentException ("This class does not extend EpgSyncJobService" );
350351 }
351352 PersistableBundle persistableBundle = new PersistableBundle ();
352- persistableBundle .putBoolean (ContentResolver .SYNC_EXTRAS_MANUAL , true );
353- persistableBundle .putBoolean (ContentResolver .SYNC_EXTRAS_EXPEDITED , true );
353+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .LOLLIPOP_MR1 ) {
354+ persistableBundle .putBoolean (ContentResolver .SYNC_EXTRAS_MANUAL , true );
355+ persistableBundle .putBoolean (ContentResolver .SYNC_EXTRAS_EXPEDITED , true );
356+ }
354357 persistableBundle .putString (EpgSyncJobService .BUNDLE_KEY_INPUT_ID , inputId );
355358 persistableBundle .putLong (EpgSyncJobService .BUNDLE_KEY_SYNC_PERIOD , syncDuration );
356359 JobInfo .Builder builder = new JobInfo .Builder (REQUEST_SYNC_JOB_ID , jobServiceComponent );
You can’t perform that action at this time.
0 commit comments