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

Commit ec60cb3e authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

Merge branch '1843-fix-unclosed-resource' into '115-epic'

fix(List apps installed): add missing call to 'cursor.close()' when fetching installed PWA

See merge request !274
parents 4ca8090b 159ccdf6
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -76,7 +76,10 @@ public class ListAppsWorker extends Worker {
        final Cursor cursor = context.getContentResolver().query(
                Uri.parse(PWA_PLAYER), null, null, null, null);

        if (cursor.getCount() <= 0) return;
        if (cursor.getCount() <= 0) {
            cursor.close();
            return;
        }

        stringBuilder.append(PWA_SECTION_SEPARATOR);
        cursor.moveToFirst();