@Test(expected = IllegalStateException.class) @Config(sdk = Build.VERSION_CODES.N) public void verifyMinIntervalCantBeChangedAfterN() { JobConfig.setAllowSmallerIntervalsForMarshmallow(true); }
public static void setAllowSmallerIntervalsForMarshmallow(boolean allowSmallerIntervals) { if (allowSmallerIntervals && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { throw new IllegalStateException("This method is only allowed to call on Android M or earlier"); } JobConfig.allowSmallerIntervals = allowSmallerIntervals; }
JobConfig { public static void setAllowSmallerIntervalsForMarshmallow(boolean allowSmallerIntervals) { if (allowSmallerIntervals && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { throw new IllegalStateException("This method is only allowed to call on Android M or earlier"); } JobConfig.allowSmallerIntervals = allowSmallerIntervals; } }
JobConfig { public static void setAllowSmallerIntervalsForMarshmallow(boolean allowSmallerIntervals) { if (allowSmallerIntervals && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { throw new IllegalStateException("This method is only allowed to call on Android M or earlier"); } JobConfig.allowSmallerIntervals = allowSmallerIntervals; } private  JobConfig(); }
JobConfig { public static void setAllowSmallerIntervalsForMarshmallow(boolean allowSmallerIntervals) { if (allowSmallerIntervals && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { throw new IllegalStateException("This method is only allowed to call on Android M or earlier"); } JobConfig.allowSmallerIntervals = allowSmallerIntervals; } private  JobConfig(); static boolean isApiEnabled(@NonNull JobApi api); static void setApiEnabled(@NonNull JobApi api, boolean enabled); static void forceApi(@NonNull JobApi api); static boolean isAllowSmallerIntervalsForMarshmallow(); static void setAllowSmallerIntervalsForMarshmallow(boolean allowSmallerIntervals); static void setForceAllowApi14(boolean forceAllowApi14); static boolean isForceAllowApi14(); static synchronized boolean addLogger(@NonNull JobLogger logger); static synchronized void removeLogger(@NonNull JobLogger logger); static void setLogcatEnabled(boolean enabled); static boolean isLogcatEnabled(); static long getJobReschedulePause(); static void setJobReschedulePause(long pause, @NonNull TimeUnit timeUnit); static int getJobIdOffset(); static void setJobIdOffset(int jobIdOffset); static boolean isForceRtc(); static void setForceRtc(boolean forceRtc); static Clock getClock(); static ExecutorService getExecutorService(); static void setExecutorService(@NonNull ExecutorService executorService); static boolean isCloseDatabase(); static void setCloseDatabase(boolean closeDatabase); static void reset(); }
JobConfig { public static void setAllowSmallerIntervalsForMarshmallow(boolean allowSmallerIntervals) { if (allowSmallerIntervals && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { throw new IllegalStateException("This method is only allowed to call on Android M or earlier"); } JobConfig.allowSmallerIntervals = allowSmallerIntervals; } private  JobConfig(); static boolean isApiEnabled(@NonNull JobApi api); static void setApiEnabled(@NonNull JobApi api, boolean enabled); static void forceApi(@NonNull JobApi api); static boolean isAllowSmallerIntervalsForMarshmallow(); static void setAllowSmallerIntervalsForMarshmallow(boolean allowSmallerIntervals); static void setForceAllowApi14(boolean forceAllowApi14); static boolean isForceAllowApi14(); static synchronized boolean addLogger(@NonNull JobLogger logger); static synchronized void removeLogger(@NonNull JobLogger logger); static void setLogcatEnabled(boolean enabled); static boolean isLogcatEnabled(); static long getJobReschedulePause(); static void setJobReschedulePause(long pause, @NonNull TimeUnit timeUnit); static int getJobIdOffset(); static void setJobIdOffset(int jobIdOffset); static boolean isForceRtc(); static void setForceRtc(boolean forceRtc); static Clock getClock(); static ExecutorService getExecutorService(); static void setExecutorService(@NonNull ExecutorService executorService); static boolean isCloseDatabase(); static void setCloseDatabase(boolean closeDatabase); static void reset();  }