Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35722935 authored by Jeff Hamilton's avatar Jeff Hamilton
Browse files

Fix a BroadcastReceiver leak.

The AccountTypeManager singleton is registered
in the ContactsApplication's getSystemService()
but the call to get the singleton was using the
given context not its .getApplicationContext().
thereby leaking when it was passed an Activity.

This fix seems cleaner then making sure each
caller passes the proper type of context.

Change-Id: I324a05449770e35bfaffb6773a394d63e9ddfb59
parent 485f5eb5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ public abstract class AccountTypeManager {
     * the available authenticators. This method can safely be called from the UI thread.
     */
    public static AccountTypeManager getInstance(Context context) {
        context = context.getApplicationContext();
        AccountTypeManager service =
                (AccountTypeManager) context.getSystemService(ACCOUNT_TYPE_SERVICE);
        if (service == null) {