mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 14:02:49 +00:00
Increase priority of DerivationTask and SlotCollectionTask
This commit is contained in:
parent
493ead1c68
commit
642784fe9d
2 changed files with 6 additions and 0 deletions
|
@ -3,6 +3,7 @@ package me.impy.aegis;
|
|||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Process;
|
||||
|
||||
import javax.crypto.SecretKey;
|
||||
|
||||
|
@ -21,6 +22,8 @@ public class DerivationTask extends AsyncTask<DerivationTask.Params, Void, Secre
|
|||
|
||||
@Override
|
||||
protected SecretKey doInBackground(DerivationTask.Params... args) {
|
||||
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND + Process.THREAD_PRIORITY_MORE_FAVORABLE);
|
||||
|
||||
DerivationTask.Params params = args[0];
|
||||
try {
|
||||
byte[] salt = CryptoUtils.generateSalt();
|
||||
|
|
|
@ -3,6 +3,7 @@ package me.impy.aegis;
|
|||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Process;
|
||||
|
||||
import java.lang.reflect.UndeclaredThrowableException;
|
||||
|
||||
|
@ -31,6 +32,8 @@ public class SlotCollectionTask<T extends Slot> extends AsyncTask<SlotCollection
|
|||
|
||||
@Override
|
||||
protected MasterKey doInBackground(SlotCollectionTask.Params... args) {
|
||||
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND + Process.THREAD_PRIORITY_MORE_FAVORABLE);
|
||||
|
||||
SlotCollectionTask.Params params = args[0];
|
||||
try {
|
||||
if (!params.Slots.has(_type)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue