diff options
author | Qi Wang <wangqi@google.com> | 2016-03-02 00:11:43 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-03-02 00:11:43 +0000 |
commit | 32f66bda678994084dc0ab84e055dd5fe4b7a718 (patch) | |
tree | cf4e51a0bd31c0c1ae23df735458a90b0bf831fd /InCallUI | |
parent | c98bc9613ea8ac8e00400898338e802e536a9bce (diff) | |
parent | 008c82f409bc9b12cc1752e6e24168e8a0121af6 (diff) |
Merge "Fix bug of secondary call info disappear after switching calls." into nyc-dev
am: 008c82f409
* commit '008c82f409bc9b12cc1752e6e24168e8a0121af6':
Fix bug of secondary call info disappear after switching calls.
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardPresenter.java | 7 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/CallList.java | 4 |
2 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 bf7b4769b..00835c8ce 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -697,6 +697,13 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> return retval; } + // Sometimes there is intemediate state that two calls are in active even one is about + // to be on hold. + retval = callList.getSecondActiveCall(); + if (retval != null && retval != ignore) { + return retval; + } + // Disconnected calls get primary position if there are no active calls // to let user know quickly what call has disconnected. Disconnected // calls are very short lived. diff --git a/InCallUI/src/com/android/incallui/CallList.java b/InCallUI/src/com/android/incallui/CallList.java index 99def3669..d0f3c1000 100644 --- a/InCallUI/src/com/android/incallui/CallList.java +++ b/InCallUI/src/com/android/incallui/CallList.java @@ -298,6 +298,10 @@ public class CallList { return getFirstCallWithState(Call.State.ACTIVE); } + public Call getSecondActiveCall() { + return getCallWithState(Call.State.ACTIVE, 1); + } + public Call getBackgroundCall() { return getFirstCallWithState(Call.State.ONHOLD); } |