From 7a17e13d5578f60426eef2c65f9119bf5adee314 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Wed, 19 Sep 2018 15:23:32 +0200 Subject: [PATCH] fix "static context is leaked" Signed-off-by: tobiasKaminsky --- .../authentication/AuthenticatorAsyncTask.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/owncloud/android/authentication/AuthenticatorAsyncTask.java b/src/main/java/com/owncloud/android/authentication/AuthenticatorAsyncTask.java index 23c327cf76..a18595bccc 100644 --- a/src/main/java/com/owncloud/android/authentication/AuthenticatorAsyncTask.java +++ b/src/main/java/com/owncloud/android/authentication/AuthenticatorAsyncTask.java @@ -1,4 +1,4 @@ -/** +/* * ownCloud Android client application * * @author masensio on 09/02/2015. @@ -43,11 +43,11 @@ public class AuthenticatorAsyncTask extends AsyncTask mWeakContext; private final WeakReference mListener; public AuthenticatorAsyncTask(Activity activity) { - mContext = activity.getApplicationContext(); + mWeakContext = new WeakReference<>(activity.getApplicationContext()); mListener = new WeakReference<>((OnAuthenticatorTaskListener)activity); } @@ -55,21 +55,18 @@ public class AuthenticatorAsyncTask extends AsyncTask