@Test @Config(sdk = Build.VERSION_CODES.O) public void verifyApiDisabled() { assertThat(JobApi.getDefault(context())).isEqualTo(JobApi.V_26); JobConfig.setApiEnabled(JobApi.V_26, false); assertThat(JobApi.getDefault(context())).isEqualTo(JobApi.V_24); JobConfig.setApiEnabled(JobApi.V_24, false); assertThat(JobApi.getDefault(context())).isEqualTo(JobApi.V_21); JobConfig.setApiEnabled(JobApi.V_21, false); assertThat(JobApi.getDefault(context())).isEqualTo(JobApi.V_19); JobConfig.setApiEnabled(JobApi.V_19, false); assertThat(JobApi.getDefault(context())).isEqualTo(JobApi.V_14); }
public static void setApiEnabled(@NonNull JobApi api, boolean enabled) { ENABLED_APIS.put(api, enabled); CAT.w("setApiEnabled - %s, %b", api, enabled); }
JobConfig { public static void setApiEnabled(@NonNull JobApi api, boolean enabled) { ENABLED_APIS.put(api, enabled); CAT.w("setApiEnabled - %s, %b", api, enabled); } }
JobConfig { public static void setApiEnabled(@NonNull JobApi api, boolean enabled) { ENABLED_APIS.put(api, enabled); CAT.w("setApiEnabled - %s, %b", api, enabled); } private  JobConfig(); }
JobConfig { public static void setApiEnabled(@NonNull JobApi api, boolean enabled) { ENABLED_APIS.put(api, enabled); CAT.w("setApiEnabled - %s, %b", api, enabled); } 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 setApiEnabled(@NonNull JobApi api, boolean enabled) { ENABLED_APIS.put(api, enabled); CAT.w("setApiEnabled - %s, %b", api, enabled); } 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();  }