summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristine Chen <christinech@google.com>2013-09-10 15:30:37 -0700
committerChristine Chen <christinech@google.com>2013-09-10 15:31:50 -0700
commita060bb9eac9ea333b4a3e3ff46631b578b9cd6ef (patch)
tree219868582f77010328246c76d90bde09c1c8d6bc
parent60fc683f685060c575ae070d8573e9d21462c57d (diff)
Removes call buttons when there is no active call.
Bug: 10678069 Change-Id: Ic9356dff4a1f00fb1aea01f3bd553e2e8844ed83
-rw-r--r--InCallUI/src/com/android/incallui/CallButtonPresenter.java4
-rw-r--r--InCallUI/src/com/android/incallui/InCallActivity.java1
2 files changed, 3 insertions, 2 deletions
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
index b2884e625..f14d851a7 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -195,13 +195,13 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
}
final boolean isVisible = state.isConnectingOrConnected() &&
- !state.isIncoming();
+ !state.isIncoming() && call != null;
ui.setVisible(isVisible);
Log.d(this, "Updating call UI for call: ", call);
- if (isVisible && call != null) {
+ if (isVisible) {
Log.v(this, "Show hold ", call.can(Capabilities.HOLD));
Log.v(this, "Show merge ", call.can(Capabilities.MERGE_CALLS));
Log.v(this, "Show swap ", call.can(Capabilities.SWAP_CALLS));
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index 38e2a48b6..7d7ca4bad 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/src/com/android/incallui/InCallActivity.java
@@ -273,6 +273,7 @@ public class InCallActivity extends Activity {
if (mCallButtonFragment == null) {
mCallButtonFragment = (CallButtonFragment) getFragmentManager()
.findFragmentById(R.id.callButtonFragment);
+ mCallButtonFragment.getView().setVisibility(View.INVISIBLE);
}
if (mCallCardFragment == null) {