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

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

Add extra logging to CallerInfoLookupHelper

Add extra logging to help diagnose timeout errors

Bug: 31755827
Change-Id: I7eee9b0f946b03df059531b7e57757b5dc4c452f
(cherry picked from commit 36b4ee2a)
parent e03ecb0f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ public class CallerInfoLookupHelper {
                            info.callerInfo.cachedPhotoIcon != null)) {
                        listener.onContactPhotoQueryComplete(handle, info.callerInfo);
                    } else if (info.imageQueryPending) {
                        Log.i(this, "There is a previously incomplete query for handle %s. " +
                        Log.i(this, "There is a pending photo query for handle %s. " +
                                "Adding to listeners for this query.", Log.piiHandle(handle));
                        info.listeners.add(listener);
                    }
@@ -141,11 +141,15 @@ public class CallerInfoLookupHelper {
                Log.continueSession((Session) cookie, "CILH.oQC");
                try {
                    if (mQueryEntries.containsKey(handle)) {
                        Log.i(CallerInfoLookupHelper.this, "CI query for handle %s has completed;" +
                                " notifying all listeners.", Log.piiHandle(handle));
                        CallerInfoQueryInfo info = mQueryEntries.get(handle);
                        for (OnQueryCompleteListener l : info.listeners) {
                            l.onCallerInfoQueryComplete(handle, ci);
                        }
                        if (ci.contactDisplayPhotoUri == null) {
                            Log.i(CallerInfoLookupHelper.this, "There is no photo for this " +
                                    "contact, skipping photo query");
                            mQueryEntries.remove(handle);
                        } else {
                            info.callerInfo = ci;
@@ -191,6 +195,7 @@ public class CallerInfoLookupHelper {
                        if (info.callerInfo == null) {
                            Log.w(CallerInfoLookupHelper.this, "Photo query finished, but the " +
                                    "CallerInfo object previously looked up was not cached.");
                            mQueryEntries.remove(handle);
                            return;
                        }
                        info.callerInfo.cachedPhoto = photo;