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

Commit ecc5e422 authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Add logging to CallerInfoAsyncQuery am: 4c01910c

am: d4f18dd1

Change-Id: I5cdba233e5cc9f47527a9ef6fb69c40b70ae90a9
parents 94364d42 d4f18dd1
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) {