diff options
author | Sailesh Nepal <sail@google.com> | 2014-09-13 18:41:00 -0700 |
---|---|---|
committer | Sailesh Nepal <sail@google.com> | 2014-09-13 18:41:00 -0700 |
commit | 05af823cb819c1cc627dbd89a8bca237613dbaa7 (patch) | |
tree | 50923b7530957d48d9dbd56669cba659f12226a9 /InCallUI | |
parent | 6861dc525e2caa9ced087e1c11ad0274e6e6ea12 (diff) |
Fix call state icon not showing for incoming calls
The call state icon was not visible for incoming calls.
The problem was that the pulse animation was operating on the
icon's view alpha but we were changing the icon's image alpha.
Fix was to always operate on the view alpha.
Bug: 17491687
Change-Id: I1e277472cd906e49fd42ad362dbabb5c8bfcbd7a
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardFragment.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index fc5c79bd6..d52bd1cbb 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -515,7 +515,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr mCallStateIcon.setVisibility(View.GONE); } else { mCallStateIcon.setVisibility(View.VISIBLE); - mCallStateIcon.setImageAlpha(255); + // Invoke setAlpha(float) instead of setAlpha(int) to set the view's alpha. This is + // needed because the pulse animation operates on the view alpha. + mCallStateIcon.setAlpha(1.0f); mCallStateIcon.setImageDrawable(connectionIcon); } @@ -542,7 +544,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr mCallStateLabel.setText(null); mCallStateLabel.setAlpha(0); mCallStateLabel.setVisibility(View.GONE); - mCallStateIcon.setImageAlpha(0); + // Invoke setAlpha(float) instead of setAlpha(int) to set the view's alpha. This is + // needed because the pulse animation operates on the view alpha. + mCallStateIcon.setAlpha(0.0f); mCallStateIcon.setVisibility(View.GONE); mCallStateVideoCallIcon.setVisibility(View.GONE); |