Fix indicator visibility
Show the indicator if it's a WiFi call, or Handoff-capable. This
will prevent the indicator from showing up on normal PSTN calls.
Change-Id: I1b893f6b6bb2276783d40a59f3521349a38070d8
diff --git a/InCallUI/res/layout/call_card.xml b/InCallUI/res/layout/call_card.xml
index 2178ab7..e6f06f3 100644
--- a/InCallUI/res/layout/call_card.xml
+++ b/InCallUI/res/layout/call_card.xml
@@ -119,8 +119,8 @@
<ImageButton android:id="@+id/handoffButton"
android:enabled="false"
- android:layout_width="@dimen/floating_action_button_width"
- android:layout_height="@dimen/floating_action_button_height"
+ android:layout_width="@dimen/floating_action_button_width"
+ android:layout_height="@dimen/floating_action_button_height"
android:layout_marginBottom="@dimen/end_call_button_margin_bottom"
android:background="@drawable/floating_handoff_button_compound_background"
android:src="@drawable/ic_in_call_pstn" />
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index ad549bc..3179474 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -305,7 +305,8 @@
}
mHandoffButton.setEnabled(isHandoffCapable && !isHandoffPending);
- mHandoffButton.setVisibility(mHandoffButton.isEnabled() ? View.VISIBLE : View.GONE);
+ mHandoffButton.setVisibility(isWiFi || mHandoffButton.isEnabled() ?
+ View.VISIBLE : View.GONE);
mHandoffButton.setImageResource(isWiFi ?
R.drawable.ic_in_call_wifi : R.drawable.ic_in_call_pstn);
}