Fix a Cursor leak

When cursor is done, the cursor must be closed to avoid cursor leak.

AOSP: https://android-review.googlesource.com/#/c/54993/

Change-Id: I8d837dd50473c3b14806f54ca8a78de14178b0cb