Magisk/app/src/main/java/com/topjohnwu/magisk/services/UpdateCheckService.java
2017-07-19 16:10:17 +08:00

24 lines
616 B
Java

package com.topjohnwu.magisk.services;
import android.app.job.JobParameters;
import android.app.job.JobService;
import com.topjohnwu.magisk.asyncs.CheckUpdates;
import com.topjohnwu.magisk.utils.Utils;
public class UpdateCheckService extends JobService {
@Override
public boolean onStartJob(JobParameters params) {
Utils.getMagiskManager(this).updateMagiskInfo();
new CheckUpdates(this, true)
.setCallBack(() -> jobFinished(params, false)).exec();
return true;
}
@Override
public boolean onStopJob(JobParameters params) {
return true;
}
}