mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 22:12:55 +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.app.ProgressDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Process;
|
||||||
|
|
||||||
import javax.crypto.SecretKey;
|
import javax.crypto.SecretKey;
|
||||||
|
|
||||||
|
@ -21,6 +22,8 @@ public class DerivationTask extends AsyncTask<DerivationTask.Params, Void, Secre
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SecretKey doInBackground(DerivationTask.Params... args) {
|
protected SecretKey doInBackground(DerivationTask.Params... args) {
|
||||||
|
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND + Process.THREAD_PRIORITY_MORE_FAVORABLE);
|
||||||
|
|
||||||
DerivationTask.Params params = args[0];
|
DerivationTask.Params params = args[0];
|
||||||
try {
|
try {
|
||||||
byte[] salt = CryptoUtils.generateSalt();
|
byte[] salt = CryptoUtils.generateSalt();
|
||||||
|
|
|
@ -3,6 +3,7 @@ package me.impy.aegis;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Process;
|
||||||
|
|
||||||
import java.lang.reflect.UndeclaredThrowableException;
|
import java.lang.reflect.UndeclaredThrowableException;
|
||||||
|
|
||||||
|
@ -31,6 +32,8 @@ public class SlotCollectionTask<T extends Slot> extends AsyncTask<SlotCollection
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected MasterKey doInBackground(SlotCollectionTask.Params... args) {
|
protected MasterKey doInBackground(SlotCollectionTask.Params... args) {
|
||||||
|
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND + Process.THREAD_PRIORITY_MORE_FAVORABLE);
|
||||||
|
|
||||||
SlotCollectionTask.Params params = args[0];
|
SlotCollectionTask.Params params = args[0];
|
||||||
try {
|
try {
|
||||||
if (!params.Slots.has(_type)) {
|
if (!params.Slots.has(_type)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue