From e8c2fe5b9af8dca7c7f301c133aeeca9f87aa96a Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 29 Jan 2020 20:02:45 +0100 Subject: [PATCH] Refactoring --- app/src/main/java/eu/faircode/email/Helper.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 65bac8d0d8..86e2a18768 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -1006,22 +1006,22 @@ public class Helper { prefs.edit().remove("last_authentication").apply(); } - static void selectKeyAlias(final Activity activity, final LifecycleOwner owner, final String email, final IKeyAlias intf) { + static void selectKeyAlias(final Activity activity, final LifecycleOwner owner, final String alias, final IKeyAlias intf) { final Context context = activity.getApplicationContext(); final Handler handler = new Handler(); new Thread(new Runnable() { @Override public void run() { - if (email != null) + if (alias != null) try { - if (KeyChain.getPrivateKey(context, email) != null) { - Log.i("Private key available alias=" + email); + if (KeyChain.getPrivateKey(context, alias) != null) { + Log.i("Private key available alias=" + alias); handler.post(new Runnable() { @Override public void run() { if (owner.getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) - intf.onSelected(email); + intf.onSelected(alias); } }); return; @@ -1063,7 +1063,7 @@ public class Helper { }); } }, - null, null, null, -1, email); + null, null, null, -1, alias); } }); }