diff options
author | Chiao Cheng <chiaocheng@google.com> | 2013-09-03 17:00:23 -0700 |
---|---|---|
committer | Chiao Cheng <chiaocheng@google.com> | 2013-09-03 17:00:23 -0700 |
commit | 7d2fb8620b808c28c49bde99dc54f6de46fdcb44 (patch) | |
tree | c5a0b04c8b456c76f2b76dd6772685aebf240eb7 /InCallUI/src/com/android/incallui/CallCardPresenter.java | |
parent | c6d8461a2b7f0684a1246ba36b3da5638cfada37 (diff) |
Fix incall image for local contacts.
The contact info callback was being called back at a minimum of two times. Once
for the name and text data and a second time for the photo. The results of the
first call triggers reverse lookups and was causing it to trigger twice. To fix
it for both cases, break out the callback into two separate calls to the client
can properly handle the cases differently.
Bug: 10607629
Change-Id: I2e0754d2d7c46bc2797a1a672827bd2f8d56e5d8
Diffstat (limited to 'InCallUI/src/com/android/incallui/CallCardPresenter.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardPresenter.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index a0ad3ce88..5b6520d7c 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -259,6 +259,16 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> updateContactEntry(entry, isPrimary, isConference); } } + + @Override + public void onImageLoadComplete(int callId, Bitmap photo) { + if (callId == mPrimary.getCallId()) { + getUi().setPrimaryImage(photo); + } else if (callId == mSecondary.getCallId()) { + getUi().setSecondaryImage(photo); + } + + } }); } else { Log.d(TAG, "Contact lookup. Found in memory cache: " + entry); @@ -481,6 +491,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> void setPrimary(String number, String name, boolean nameIsNumber, String label, Drawable photo, boolean isConference, String gatewayLabel, String gatewayNumber); void setSecondary(boolean show, String name, String label, Drawable photo); + void setSecondaryImage(Bitmap bitmap); void setCallState(int state, Call.DisconnectCause cause, boolean bluetoothOn); void setPrimaryCallElapsedTime(boolean show, String duration); |