From 7390b187767b559f693666156b8ca5c7c25bcfe4 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Wed, 27 Jul 2011 16:48:35 -0700 Subject: [PATCH] Log return of null from query() * This shouldn't happen, but ... log it just in case Change-Id: I8b8df3fec84c9dd14ebb222ee665b0712f63f213 --- src/com/android/email/provider/EmailProvider.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index 27b248784..7ac5ca49c 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -1890,6 +1890,10 @@ public class EmailProvider extends ContentProvider { if (cache != null && c != null && Email.DEBUG) { cache.recordQueryTime(c, System.nanoTime() - time); } + if (c == null) { + // This should never happen, but let's be sure to log it... + Log.e(TAG, "Query returning null for uri: " + uri + ", selection: " + selection); + } } if ((c != null) && !isTemporary()) {