Add missing Cursor.close() calls to fix a crash reported on Ouya

This commit is contained in:
Cameron Gutman 2014-08-06 15:01:18 -07:00
parent ea65bb2c0a
commit fcfdd4e323

View File

@ -109,6 +109,8 @@ public class ComputerDatabaseManager {
computerList.add(details);
}
c.close();
return computerList;
}
@ -117,6 +119,7 @@ public class ComputerDatabaseManager {
ComputerDetails details = new ComputerDetails();
if (!c.moveToFirst()) {
// No matching computer
c.close();
return null;
}
@ -146,6 +149,8 @@ public class ComputerDatabaseManager {
details.macAddress = c.getString(4);
c.close();
// If a field is corrupt or missing, delete the database entry
if (details.uuid == null || details.localIp == null || details.remoteIp == null ||
details.macAddress == null) {