Instrument sqlite version.

This commit is contained in:
dosiecki 2015-08-17 16:53:41 -07:00
parent 4312ac9c29
commit 24020d7d3c
2 changed files with 15 additions and 0 deletions

View file

@ -86,6 +86,20 @@ public class BlurDatabaseHelper {
synchronized (RW_MUTEX) {dbWrapper.dropAndRecreateTables();}
}
public String getEngineVersion() {
String engineVersion = "";
try {
Cursor c = dbRO.rawQuery("SELECT sqlite_version() AS sqlite_version", null);
if (c.moveToFirst()) {
engineVersion = c.getString(0);
}
c.close();
} catch (Exception e) {
// this is only debug code, do not rais a failure
}
return engineVersion;
}
public Set<String> getAllFeeds() {
String q1 = "SELECT " + DatabaseConstants.FEED_ID +
" FROM " + DatabaseConstants.FEED_TABLE;

View file

@ -81,6 +81,7 @@ public class PrefsUtils {
s.append("%0Aapp version: ").append(getVersion(context));
s.append("%0Aandroid version: ").append(Build.VERSION.RELEASE);
s.append("%0Adevice: ").append(Build.MANUFACTURER + "+" + Build.MODEL + "+(" + Build.BOARD + ")");
s.append("%0Asqlite version: ").append(FeedUtils.dbHelper.getEngineVersion());
s.append("%0Ausername: ").append(getUserDetails(context).username);
s.append("%0Amemory: ").append(NBSyncService.isMemoryLow() ? "low" : "normal");
s.append("%0Aspeed: ").append(NBSyncService.getSpeedInfo());