mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-25 08:16:07 +00:00
Fix exception when importing an old export
This commit is contained in:
parent
a93ced6e34
commit
9ec94a472f
2 changed files with 9 additions and 4 deletions
|
@ -9,7 +9,7 @@ import com.beemdevelopment.aegis.ui.Dialogs;
|
||||||
|
|
||||||
import androidx.annotation.CallSuper;
|
import androidx.annotation.CallSuper;
|
||||||
|
|
||||||
public abstract class ProgressDialogTask<Params, Result> extends AsyncTask<Params, Void, Result> {
|
public abstract class ProgressDialogTask<Params, Result> extends AsyncTask<Params, String, Result> {
|
||||||
private ProgressDialog _dialog;
|
private ProgressDialog _dialog;
|
||||||
|
|
||||||
public ProgressDialogTask(Context context, String message) {
|
public ProgressDialogTask(Context context, String message) {
|
||||||
|
@ -33,6 +33,13 @@ public abstract class ProgressDialogTask<Params, Result> extends AsyncTask<Param
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onProgressUpdate(String... values) {
|
||||||
|
if (values.length == 1) {
|
||||||
|
_dialog.setMessage(values[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void setPriority() {
|
protected void setPriority() {
|
||||||
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND + Process.THREAD_PRIORITY_MORE_FAVORABLE);
|
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND + Process.THREAD_PRIORITY_MORE_FAVORABLE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.beemdevelopment.aegis.ui.tasks;
|
package com.beemdevelopment.aegis.ui.tasks;
|
||||||
|
|
||||||
import android.app.ProgressDialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import com.beemdevelopment.aegis.R;
|
import com.beemdevelopment.aegis.R;
|
||||||
|
@ -72,8 +71,7 @@ public class SlotListTask<T extends Slot> extends ProgressDialogTask<SlotListTas
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProgressDialog dialog = getDialog();
|
publishProgress(getDialog().getContext().getString(R.string.unlocking_vault_repair));
|
||||||
dialog.setMessage(dialog.getContext().getString(R.string.unlocking_vault_repair));
|
|
||||||
|
|
||||||
// try to decrypt the password slot with the old key
|
// try to decrypt the password slot with the old key
|
||||||
SecretKey oldKey = slot.deriveKey(oldPasswordBytes);
|
SecretKey oldKey = slot.deriveKey(oldPasswordBytes);
|
||||||
|
|
Loading…
Add table
Reference in a new issue