diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-10-03 19:29:34 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-10-03 19:29:34 +0000 |
commit | 40a59d307038709ed489f0ed61ba94b224416743 (patch) | |
tree | f094ae078807e0486617bc958b984cc9521d5fd9 /java/com/android/incallui/contactgrid/ContactGridManager.java | |
parent | 4fd9c153b6f3059bd9204051fb0c27596d2bc72d (diff) | |
parent | a95459f9ccb54f6b694810cf7396ffdefde11d45 (diff) |
Merge changes Ib6415145,Ifde98a8c
* changes:
Adjust the location update frequency for emergency calls
Fix issue that the connection icon is placed a little left from center
Diffstat (limited to 'java/com/android/incallui/contactgrid/ContactGridManager.java')
-rw-r--r-- | java/com/android/incallui/contactgrid/ContactGridManager.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/java/com/android/incallui/contactgrid/ContactGridManager.java b/java/com/android/incallui/contactgrid/ContactGridManager.java index 18bab6ab3..c0ab9609f 100644 --- a/java/com/android/incallui/contactgrid/ContactGridManager.java +++ b/java/com/android/incallui/contactgrid/ContactGridManager.java @@ -27,6 +27,7 @@ import android.view.View; import android.view.accessibility.AccessibilityEvent; import android.widget.Chronometer; import android.widget.ImageView; +import android.widget.Space; import android.widget.TextView; import android.widget.ViewAnimator; import com.android.contacts.common.compat.PhoneNumberUtilsCompat; @@ -74,6 +75,7 @@ public class ContactGridManager { private final ViewAnimator bottomTextSwitcher; private final TextView bottomTextView; private final Chronometer bottomTimerView; + private final Space topRowSpace; private int avatarSize; private boolean hideAvatar; private boolean showAnonymousAvatar; @@ -104,6 +106,7 @@ public class ContactGridManager { bottomTextSwitcher = view.findViewById(R.id.contactgrid_bottom_text_switcher); bottomTextView = view.findViewById(R.id.contactgrid_bottom_text); bottomTimerView = view.findViewById(R.id.contactgrid_bottom_timer); + topRowSpace = view.findViewById(R.id.contactgrid_top_row_space); contactGridLayout = (View) contactNameTextView.getParent(); letterTile = new LetterTileDrawable(context.getResources()); @@ -229,9 +232,16 @@ public class ContactGridManager { if (info.icon == null) { connectionIconImageView.setVisibility(View.GONE); + topRowSpace.setVisibility(View.GONE); } else { connectionIconImageView.setVisibility(View.VISIBLE); connectionIconImageView.setImageDrawable(info.icon); + if (statusTextView.getVisibility() == View.VISIBLE + && !TextUtils.isEmpty(statusTextView.getText())) { + topRowSpace.setVisibility(View.VISIBLE); + } else { + topRowSpace.setVisibility(View.GONE); + } } } |