From 4ffdeefe3bac1e201abee220e90a5e2e42a56617 Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 12 Apr 2012 20:59:29 -0700 Subject: [PATCH] add dumpCursor --- .../XWords4/src/org/eehouse/android/xw4/DbgUtils.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java index 78290d5c5..13d9744e6 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java @@ -25,6 +25,8 @@ import java.util.Formatter; import android.content.Context; import android.content.SharedPreferences; +import android.database.Cursor; +import android.database.DatabaseUtils; import android.preference.PreferenceManager; import android.text.format.Time; import android.util.Log; @@ -95,4 +97,12 @@ public class DbgUtils { printStack( Thread.currentThread().getStackTrace() ); } } + + public static void dumpCursor( Cursor cursor ) + { + if ( s_doLog ) { + String dump = DatabaseUtils.dumpCursorToString( cursor ); + logf( "cursor: %s", dump ); + } + } }