summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryueg <yueg@google.com>2017-12-11 14:40:13 -0800
committerCopybara-Service <copybara-piper@google.com>2017-12-11 15:22:18 -0800
commitc875a5b7630376c767d86b708e4aab8382de8acc (patch)
tree7cc32b127706e39d1441775c45865d7c98ff3c4c
parent05b6a53db23cf8c2d90442d1c84c14fd09519390 (diff)
Also show bubble avatar for incoming call and outgoing call.
Instead of just showing avatar for active or background call, we should also show avatar for other calls. In the order: 1. incoming call 2. outgoing call 3. active or background call Test: NewReturnToCallControllerTest PiperOrigin-RevId: 178675371 Change-Id: Ibf8b757821d9a6420ba56439e4f6a93e9e5c3d91
-rw-r--r--java/com/android/incallui/NewReturnToCallController.java8
-rw-r--r--java/com/android/newbubble/NewBubbleInfo.java3
2 files changed, 9 insertions, 2 deletions
diff --git a/java/com/android/incallui/NewReturnToCallController.java b/java/com/android/incallui/NewReturnToCallController.java
index abff000fd..95da1c65e 100644
--- a/java/com/android/incallui/NewReturnToCallController.java
+++ b/java/com/android/incallui/NewReturnToCallController.java
@@ -205,7 +205,13 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au
}
private void startContactInfoSearch() {
- DialerCall dialerCall = CallList.getInstance().getActiveOrBackgroundCall();
+ DialerCall dialerCall = CallList.getInstance().getIncomingCall();
+ if (dialerCall == null) {
+ dialerCall = CallList.getInstance().getOutgoingCall();
+ }
+ if (dialerCall == null) {
+ dialerCall = CallList.getInstance().getActiveOrBackgroundCall();
+ }
if (dialerCall != null) {
contactInfoCache.findInfo(
dialerCall, false /* isIncoming */, new ReturnToCallContactInfoCacheCallback(this));
diff --git a/java/com/android/newbubble/NewBubbleInfo.java b/java/com/android/newbubble/NewBubbleInfo.java
index 126b300ed..ec26a3143 100644
--- a/java/com/android/newbubble/NewBubbleInfo.java
+++ b/java/com/android/newbubble/NewBubbleInfo.java
@@ -53,7 +53,8 @@ public abstract class NewBubbleInfo {
.setPrimaryColor(bubbleInfo.getPrimaryColor())
.setPrimaryIcon(bubbleInfo.getPrimaryIcon())
.setStartingYPosition(bubbleInfo.getStartingYPosition())
- .setActions(bubbleInfo.getActions());
+ .setActions(bubbleInfo.getActions())
+ .setAvatar(bubbleInfo.getAvatar());
}
/** Builder for {@link NewBubbleInfo} */