content: package top.niunaijun.blackbox.fake.frameworks;
  
  import android.app.job.JobInfo;
  import android.os.RemoteException;
  
  import top.niunaijun.blackbox.app.BActivityThread;
  import top.niunaijun.blackbox.core.system.ServiceManager;
  import top.niunaijun.blackbox.core.system.am.IBJobManagerService;
  import top.niunaijun.blackbox.entity.JobRecord;
  
  /**
   * updated by alex5402 on 4/14/21.
   * * ∧＿∧
   * (`･ω･∥
   * 丶　つ０
   * しーＪ
   * TFNQw5HgWUS33Ke1eNmSFTwoQySGU7XNsK (USDT TRC20)
   */
  public class BJobManager extends BlackManager<IBJobManagerService> {
      private static final BJobManager sJobManager = new BJobManager();
  
      public static BJobManager get() {
          return sJobManager;
      }
  
      @Override
      protected String getServiceName() {
          return ServiceManager.JOB_MANAGER;
      }
  
      public JobInfo schedule(JobInfo info) {
          try {
              return getService().schedule(info, BActivityThread.getUserId());
          } catch (RemoteException e) {
              e.printStackTrace();
          }
          return null;
      }
  
      public JobRecord queryJobRecord(String processName, int jobId) {
          try {
              return getService().queryJobRecord(processName, jobId, BActivityThread.getUserId());
          } catch (RemoteException e) {
              e.printStackTrace();
          }
          return null;
      }
  
      public void cancelAll(String processName) {
          try {
              getService().cancelAll(processName, BActivityThread.getUserId());
          } catch (RemoteException e) {
              e.printStackTrace();
          }
      }
  
      public int cancel(String processName, int jobId) {
          try {
              return getService().cancel(processName, jobId, BActivityThread.getUserId());
          } catch (RemoteException e) {
              e.printStackTrace();
          }
          return -1;
      }
  }
  