mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-03 08:55:40 +00:00
25 lines
671 B
Java
25 lines
671 B
Java
![]() |
package com.topjohnwu.magisk.asyncs;
|
||
|
|
||
|
import android.app.Activity;
|
||
|
import android.os.AsyncTask;
|
||
|
|
||
|
import com.topjohnwu.magisk.MagiskManager;
|
||
|
import com.topjohnwu.magisk.utils.Utils;
|
||
|
|
||
|
public abstract class ParallelTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result> {
|
||
|
protected Activity activity;
|
||
|
protected MagiskManager magiskManager;
|
||
|
|
||
|
public ParallelTask() {}
|
||
|
|
||
|
public ParallelTask(Activity context) {
|
||
|
activity = context;
|
||
|
magiskManager = Utils.getMagiskManager(context);
|
||
|
}
|
||
|
|
||
|
@SafeVarargs
|
||
|
public final void exec(Params... params) {
|
||
|
executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params);
|
||
|
}
|
||
|
}
|