You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
33 lines
939 B
Java
33 lines
939 B
Java
package com.topjohnwu.magisk.services;
|
|
|
|
import android.app.job.JobParameters;
|
|
import android.app.job.JobService;
|
|
|
|
import com.topjohnwu.magisk.asyncs.CheckUpdates;
|
|
|
|
public class UpdateCheckService extends JobService {
|
|
@Override
|
|
public boolean onStartJob(JobParameters params) {
|
|
new CheckUpdates(this, true){
|
|
@Override
|
|
protected Void doInBackground(Void... voids) {
|
|
magiskManager.updateMagiskInfo();
|
|
magiskManager.updateNotification = magiskManager.prefs.getBoolean("notification", true);
|
|
return super.doInBackground(voids);
|
|
}
|
|
|
|
@Override
|
|
protected void onPostExecute(Void v) {
|
|
jobFinished(params, false);
|
|
super.onPostExecute(v);
|
|
}
|
|
}.exec();
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public boolean onStopJob(JobParameters params) {
|
|
return true;
|
|
}
|
|
}
|