diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-09-19 00:41:19 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-09-19 00:41:19 +0000 |
commit | bc5c09689b300a2f7871b939735dcf105e51292a (patch) | |
tree | 56826242df099a08ff58eeb0ef93a7aa0ce56558 /java/com/android/incallui | |
parent | 2737016267aa7f476e8bbd286c83627dc432f582 (diff) | |
parent | 5287a2335195f80b6e1dcd702ce9ab101118ec95 (diff) |
Merge "Use logCallImpression for bubble expand/collapse if possible."
Diffstat (limited to 'java/com/android/incallui')
-rw-r--r-- | java/com/android/incallui/ReturnToCallController.java | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/java/com/android/incallui/ReturnToCallController.java b/java/com/android/incallui/ReturnToCallController.java index fd48b37e1..89731bc0d 100644 --- a/java/com/android/incallui/ReturnToCallController.java +++ b/java/com/android/incallui/ReturnToCallController.java @@ -134,14 +134,36 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio returnToCallBubble.setBubbleExpansionStateListener( new BubbleExpansionStateListener() { @Override - public void onBubbleExpansionStateChanged(@ExpansionState int expansionState) { + public void onBubbleExpansionStateChanged( + @ExpansionState int expansionState, boolean isUserAction) { + if (!isUserAction) { + return; + } + + DialerCall call = CallList.getInstance().getActiveOrBackgroundCall(); switch (expansionState) { case ExpansionState.START_EXPANDING: - Logger.get(context) - .logImpression(DialerImpression.Type.BUBBLE_PRIMARY_BUTTON_EXPAND); + if (call != null) { + Logger.get(context) + .logCallImpression( + DialerImpression.Type.BUBBLE_PRIMARY_BUTTON_EXPAND, + call.getUniqueCallId(), + call.getTimeAddedMs()); + } else { + Logger.get(context) + .logImpression(DialerImpression.Type.BUBBLE_PRIMARY_BUTTON_EXPAND); + } break; case ExpansionState.START_COLLAPSING: - Logger.get(context).logImpression(DialerImpression.Type.BUBBLE_COLLAPSE_BY_USER); + if (call != null) { + Logger.get(context) + .logCallImpression( + DialerImpression.Type.BUBBLE_COLLAPSE_BY_USER, + call.getUniqueCallId(), + call.getTimeAddedMs()); + } else { + Logger.get(context).logImpression(DialerImpression.Type.BUBBLE_COLLAPSE_BY_USER); + } break; default: break; |