diff options
| author | Jeff Brown <jeffbrown@google.com> | 2013-05-01 17:54:34 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2013-05-01 17:54:34 -0700 |
| commit | f2930d783ac52d89cc8fc6db3bed7989544a9cbc (patch) | |
| tree | 4ae362d9222b7c1acf146b3e6a0b19ee68623cb1 | |
| parent | bd5fca23e12f2a3491ea63e5761a5897f084d689 (diff) | |
| parent | c31126088fea61a9b5ba6cdb1fd2791e86800a8a (diff) | |
| download | frameworks_base-f2930d783ac52d89cc8fc6db3bed7989544a9cbc.zip frameworks_base-f2930d783ac52d89cc8fc6db3bed7989544a9cbc.tar.gz frameworks_base-f2930d783ac52d89cc8fc6db3bed7989544a9cbc.tar.bz2 | |
am c3112608: Merge "Don\'t dump sql bindargs unless verbose mode is requested." into jb-mr2-dev
* commit 'c31126088fea61a9b5ba6cdb1fd2791e86800a8a':
Don't dump sql bindargs unless verbose mode is requested.
| -rw-r--r-- | core/java/android/database/sqlite/SQLiteConnection.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/database/sqlite/SQLiteConnection.java b/core/java/android/database/sqlite/SQLiteConnection.java index 0017c46..4f59e8e 100644 --- a/core/java/android/database/sqlite/SQLiteConnection.java +++ b/core/java/android/database/sqlite/SQLiteConnection.java @@ -1077,7 +1077,7 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen printer.println(" isPrimaryConnection: " + mIsPrimaryConnection); printer.println(" onlyAllowReadOnlyOperations: " + mOnlyAllowReadOnlyOperations); - mRecentOperations.dump(printer); + mRecentOperations.dump(printer, verbose); if (verbose) { mPreparedStatementCache.dump(printer); @@ -1376,7 +1376,7 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen private void logOperationLocked(int cookie, String detail) { final Operation operation = getOperationLocked(cookie); StringBuilder msg = new StringBuilder(); - operation.describe(msg); + operation.describe(msg, false); if (detail != null) { msg.append(", ").append(detail); } @@ -1399,14 +1399,14 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen final Operation operation = mOperations[mIndex]; if (operation != null && !operation.mFinished) { StringBuilder msg = new StringBuilder(); - operation.describe(msg); + operation.describe(msg, false); return msg.toString(); } return null; } } - public void dump(Printer printer) { + public void dump(Printer printer, boolean verbose) { synchronized (mOperations) { printer.println(" Most recently executed operations:"); int index = mIndex; @@ -1418,7 +1418,7 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen msg.append(" ").append(n).append(": ["); msg.append(operation.getFormattedStartTime()); msg.append("] "); - operation.describe(msg); + operation.describe(msg, verbose); printer.println(msg.toString()); if (index > 0) { @@ -1449,7 +1449,7 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen public Exception mException; public int mCookie; - public void describe(StringBuilder msg) { + public void describe(StringBuilder msg, boolean verbose) { msg.append(mKind); if (mFinished) { msg.append(" took ").append(mEndTime - mStartTime).append("ms"); @@ -1461,7 +1461,7 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen if (mSql != null) { msg.append(", sql=\"").append(trimSqlForDisplay(mSql)).append("\""); } - if (mBindArgs != null && mBindArgs.size() != 0) { + if (verbose && mBindArgs != null && mBindArgs.size() != 0) { msg.append(", bindArgs=["); final int count = mBindArgs.size(); for (int i = 0; i < count; i++) { |
