From 9124ae8763a0c00e20a8db55d1bb7eff6814e619 Mon Sep 17 00:00:00 2001 From: ZetaTom <70907959+ZetaTom@users.noreply.github.com> Date: Tue, 20 Jun 2023 17:00:33 +0200 Subject: [PATCH] Apply requested changes from #11523 Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com> --- .../android/ui/dialog/SetupEncryptionDialogFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java index e53dea2b9d09..634cebb63f9a 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java @@ -313,12 +313,12 @@ protected void onPreExecute() { @Override protected String doInBackground(Void... voids) { - Context context = mWeakContext.get(); // fetch private/public key // if available // - store public key // - decrypt private key, store unencrypted private key in database + Context context = mWeakContext.get(); GetPublicKeyOperation publicKeyOperation = new GetPublicKeyOperation(); if (user != null) { RemoteOperationResult publicKeyResult = publicKeyOperation.execute(user, context); @@ -354,6 +354,7 @@ protected String doInBackground(Void... voids) { @Override protected void onPostExecute(String privateKey) { super.onPostExecute(privateKey); + Context context = mWeakContext.get(); if (context == null) { Log_OC.e(TAG, "Context lost after fetching private keys.");