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

Commit 406343d3 authored by Channagoud Kadabi's avatar Channagoud Kadabi Committed by Patrick Jacques
Browse files

Contacts: Close cursor object after use



In callOrSmsContact function, phonesCursor is never closed, which
causes cursor leaks. Close the phonesCursor after its use.

Change-Id: If4c7dfa4cf0b3df9b7120e2413eaa35a8077023a
Signed-off-by: default avatarPatrick Jacques <kernelzilla@kinetic-computing.com>
parent 5d8bf4a1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2748,6 +2748,10 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC
                        ContactsUtils.initiateCall(this, phone);
                    }
                }
                // Close the phoneCursor after its use
                if (phonesCursor != null) {
                    phonesCursor.close();
                }
            }
        }
        return true;