diff options
| author | 2016-10-05 16:56:17 -0700 | |
|---|---|---|
| committer | 2016-10-05 16:56:17 -0700 | |
| commit | 4c01910cb0dfc6a5980a903eabfd767cad7f2e50 (patch) | |
| tree | ec4fb929d9c513ba0fabc996577f6785efb71612 | |
| parent | e4865bcb39b05e10d9e30086dcf6a8c632b2e624 (diff) | |
Add logging to CallerInfoAsyncQuery
Add logging to CallerInfoAsyncQuery to help diagnose timeout errors
Bug: 31755827
Change-Id: If7cf34baf084ca8916952842585a32b3e93eba73
| -rw-r--r-- | telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java b/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java index 05cb31e1b7a3..d4104bd34db3 100644 --- a/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java +++ b/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java @@ -176,13 +176,13 @@ public class CallerInfoAsyncQuery { // However, if there is any code that this Handler calls (such as in // super.handleMessage) that DOES place unexpected messages on the // queue, then we need pass these messages on. - if (DBG) Rlog.d(LOG_TAG, "Unexpected command (CookieWrapper is null): " + msg.what + + Rlog.i(LOG_TAG, "Unexpected command (CookieWrapper is null): " + msg.what + " ignored by CallerInfoWorkerHandler, passing onto parent."); super.handleMessage(msg); } else { - if (DBG) Rlog.d(LOG_TAG, "Processing event: " + cw.event + " token (arg1): " + msg.arg1 + + Rlog.d(LOG_TAG, "Processing event: " + cw.event + " token (arg1): " + msg.arg1 + " command: " + msg.what + " query URI: " + sanitizeUriToString(args.uri)); switch (cw.event) { @@ -239,7 +239,7 @@ public class CallerInfoAsyncQuery { */ @Override protected void onQueryComplete(int token, Object cookie, Cursor cursor) { - if (DBG) Rlog.d(LOG_TAG, "##### onQueryComplete() ##### query complete for token: " + token); + Rlog.d(LOG_TAG, "##### onQueryComplete() ##### query complete for token: " + token); //get the cookie and notify the listener. CookieWrapper cw = (CookieWrapper) cookie; @@ -248,7 +248,7 @@ public class CallerInfoAsyncQuery { // from within this code. // However, if there is any code that calls this method, we should // check the parameters to make sure they're viable. - if (DBG) Rlog.d(LOG_TAG, "Cookie is null, ignoring onQueryComplete() request."); + Rlog.i(LOG_TAG, "Cookie is null, ignoring onQueryComplete() request."); if (cursor != null) { cursor.close(); } @@ -333,9 +333,11 @@ public class CallerInfoAsyncQuery { //notify the listener that the query is complete. if (cw.listener != null) { - if (DBG) Rlog.d(LOG_TAG, "notifying listener: " + cw.listener.getClass().toString() + + Rlog.d(LOG_TAG, "notifying listener: " + cw.listener.getClass().toString() + " for token: " + token + mCallerInfo); cw.listener.onQueryComplete(token, cw.cookie, mCallerInfo); + } else { + Rlog.w(LOG_TAG, "There is no listener to notify for this query."); } if (cursor != null) { |