Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aaed5260 authored by Hall Liu's avatar Hall Liu Committed by gitbuildkicker
Browse files

Add logging to CallerInfoAsyncQuery

Add logging to CallerInfoAsyncQuery to help diagnose timeout errors

Bug: 31755827
Change-Id: If7cf34baf084ca8916952842585a32b3e93eba73
(cherry picked from commit 4c01910c)
parent c54d76e1
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -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) {