summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryueg <yueg@google.com>2017-11-09 11:39:10 -0800
committerzachh <zachh@google.com>2017-11-12 02:50:48 +0000
commit8c47d75d9a128db66faf1e824f628ed5a1a87723 (patch)
tree84979a757648547e065cfc58bb718788607ad80d
parentaceaed335f7beb25c340b14a8960a60337dadd8d (diff)
Conferece call management screen UI adjustment.
Including: - change action icon color - hide TextView for name if name is empty - if name is empty, use number to generate avatar - don't show number type Bug: 67053842 Test: manual PiperOrigin-RevId: 175188810 Change-Id: I4ba40e5332d7b8567932360d36c8dc6ec3d604a5
-rw-r--r--java/com/android/dialer/calllogutils/CallTypeIconsView.java8
-rw-r--r--java/com/android/dialer/theme/res/values/colors.xml4
-rw-r--r--java/com/android/incallui/ConferenceParticipantListAdapter.java32
-rw-r--r--java/com/android/incallui/res/layout/caller_in_conference.xml16
-rw-r--r--java/com/android/incallui/res/values/colors.xml2
5 files changed, 20 insertions, 42 deletions
diff --git a/java/com/android/dialer/calllogutils/CallTypeIconsView.java b/java/com/android/dialer/calllogutils/CallTypeIconsView.java
index bf33faa33..0c28a9728 100644
--- a/java/com/android/dialer/calllogutils/CallTypeIconsView.java
+++ b/java/com/android/dialer/calllogutils/CallTypeIconsView.java
@@ -268,7 +268,7 @@ public class CallTypeIconsView extends View {
iconId = R.drawable.quantum_ic_voicemail_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
voicemail = drawable.mutate();
- voicemail.setColorFilter(r.getColor(R.color.call_type_icon_color), PorterDuff.Mode.MULTIPLY);
+ voicemail.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY);
iconId = R.drawable.quantum_ic_block_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
@@ -278,17 +278,17 @@ public class CallTypeIconsView extends View {
iconId = R.drawable.quantum_ic_videocam_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
videoCall = drawable.mutate();
- videoCall.setColorFilter(r.getColor(R.color.call_type_icon_color), PorterDuff.Mode.MULTIPLY);
+ videoCall.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY);
iconId = R.drawable.quantum_ic_hd_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
hdCall = drawable.mutate();
- hdCall.setColorFilter(r.getColor(R.color.call_type_icon_color), PorterDuff.Mode.MULTIPLY);
+ hdCall.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY);
iconId = R.drawable.quantum_ic_signal_wifi_4_bar_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
wifiCall = drawable.mutate();
- wifiCall.setColorFilter(r.getColor(R.color.call_type_icon_color), PorterDuff.Mode.MULTIPLY);
+ wifiCall.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY);
iconMargin = largeIcons ? 0 : r.getDimensionPixelSize(R.dimen.call_log_icon_margin);
}
diff --git a/java/com/android/dialer/theme/res/values/colors.xml b/java/com/android/dialer/theme/res/values/colors.xml
index f44a7ccc6..a59fa6704 100644
--- a/java/com/android/dialer/theme/res/values/colors.xml
+++ b/java/com/android/dialer/theme/res/values/colors.xml
@@ -68,8 +68,8 @@
<color name="blue_grey_100">#CFD8DC</color>
- <!-- Color of call type icons in call log, e.g. voicemail, video, WiFi, HD etc. -->
- <color name="call_type_icon_color">#89000000</color>
+ <!-- 54% opacity -->
+ <color name="icon_color_grey">#89000000</color>
<!-- Color for bubble -->
<color name="dialer_end_call_button_color">#FFDF0000</color>
diff --git a/java/com/android/incallui/ConferenceParticipantListAdapter.java b/java/com/android/incallui/ConferenceParticipantListAdapter.java
index d0f488501..66b6a97c1 100644
--- a/java/com/android/incallui/ConferenceParticipantListAdapter.java
+++ b/java/com/android/incallui/ConferenceParticipantListAdapter.java
@@ -242,7 +242,6 @@ public class ConferenceParticipantListAdapter extends BaseAdapter {
contactCache.namePrimary,
call.updateNameIfRestricted(name),
contactCache.number,
- contactCache.label,
contactCache.lookupKey,
contactCache.displayPhotoUri,
thisRowCanSeparate,
@@ -277,7 +276,6 @@ public class ConferenceParticipantListAdapter extends BaseAdapter {
* @param view The view to set the details on.
* @param callerName The participant's name.
* @param callerNumber The participant's phone number.
- * @param callerNumberType The participant's phone number typ.e
* @param lookupKey The lookup key for the participant (for photo lookup).
* @param photoUri The URI of the contact photo.
* @param thisRowCanSeparate {@code True} if this participant can separate from the conference.
@@ -288,7 +286,6 @@ public class ConferenceParticipantListAdapter extends BaseAdapter {
String callerName,
String preferredName,
String callerNumber,
- String callerNumberType,
String lookupKey,
Uri photoUri,
boolean thisRowCanSeparate,
@@ -299,16 +296,13 @@ public class ConferenceParticipantListAdapter extends BaseAdapter {
final TextView statusTextView = (TextView) view.findViewById(R.id.conferenceCallerStatus);
final TextView nameTextView = (TextView) view.findViewById(R.id.conferenceCallerName);
final TextView numberTextView = (TextView) view.findViewById(R.id.conferenceCallerNumber);
- final TextView numberTypeTextView =
- (TextView) view.findViewById(R.id.conferenceCallerNumberType);
final View endButton = view.findViewById(R.id.conferenceCallerDisconnect);
final View separateButton = view.findViewById(R.id.conferenceCallerSeparate);
if (callState == DialerCall.State.ONHOLD) {
- setViewsOnHold(photoView, statusTextView, nameTextView, numberTextView, numberTypeTextView);
+ setViewsOnHold(photoView, statusTextView, nameTextView, numberTextView);
} else {
- setViewsNotOnHold(
- photoView, statusTextView, nameTextView, numberTextView, numberTypeTextView);
+ setViewsNotOnHold(photoView, statusTextView, nameTextView, numberTextView);
}
endButton.setVisibility(thisRowCanDisconnect ? View.VISIBLE : View.GONE);
@@ -325,27 +319,30 @@ public class ConferenceParticipantListAdapter extends BaseAdapter {
separateButton.setOnClickListener(null);
}
+ String displayNameForImage = TextUtils.isEmpty(callerName) ? callerNumber : callerName;
DefaultImageRequest imageRequest =
(photoUri != null)
? null
- : new DefaultImageRequest(callerName, lookupKey, true /* isCircularPhoto */);
+ : new DefaultImageRequest(displayNameForImage, lookupKey, true /* isCircularPhoto */);
mContactPhotoManager.loadDirectoryPhoto(photoView, photoUri, false, true, imageRequest);
// set the caller name
- nameTextView.setText(preferredName);
+ if (TextUtils.isEmpty(preferredName)) {
+ nameTextView.setVisibility(View.GONE);
+ } else {
+ nameTextView.setVisibility(View.VISIBLE);
+ nameTextView.setText(preferredName);
+ }
// set the caller number in subscript, or make the field disappear.
if (TextUtils.isEmpty(callerNumber)) {
numberTextView.setVisibility(View.GONE);
- numberTypeTextView.setVisibility(View.GONE);
} else {
numberTextView.setVisibility(View.VISIBLE);
numberTextView.setText(
PhoneNumberUtilsCompat.createTtsSpannable(
BidiFormatter.getInstance().unicodeWrap(callerNumber, TextDirectionHeuristics.LTR)));
- numberTypeTextView.setVisibility(View.VISIBLE);
- numberTypeTextView.setText(callerNumberType);
}
}
@@ -353,8 +350,7 @@ public class ConferenceParticipantListAdapter extends BaseAdapter {
ImageView photoView,
TextView statusTextView,
TextView nameTextView,
- TextView numberTextView,
- TextView numberTypeTextView) {
+ TextView numberTextView) {
CharSequence onHoldText =
TextUtils.concat(getContext().getText(R.string.notification_on_hold).toString(), " • ");
statusTextView.setText(onHoldText);
@@ -363,7 +359,6 @@ public class ConferenceParticipantListAdapter extends BaseAdapter {
int onHoldColor = getContext().getColor(R.color.dialer_secondary_text_color_hiden);
nameTextView.setTextColor(onHoldColor);
numberTextView.setTextColor(onHoldColor);
- numberTypeTextView.setTextColor(onHoldColor);
TypedValue alpha = new TypedValue();
getContext().getResources().getValue(R.dimen.alpha_hiden, alpha, true);
@@ -374,16 +369,13 @@ public class ConferenceParticipantListAdapter extends BaseAdapter {
ImageView photoView,
TextView statusTextView,
TextView nameTextView,
- TextView numberTextView,
- TextView numberTypeTextView) {
+ TextView numberTextView) {
statusTextView.setVisibility(View.GONE);
nameTextView.setTextColor(
getContext().getColor(R.color.conference_call_manager_caller_name_text_color));
numberTextView.setTextColor(
getContext().getColor(R.color.conference_call_manager_secondary_text_color));
- numberTypeTextView.setTextColor(
- getContext().getColor(R.color.conference_call_manager_secondary_text_color));
TypedValue alpha = new TypedValue();
getContext().getResources().getValue(R.dimen.alpha_enabled, alpha, true);
diff --git a/java/com/android/incallui/res/layout/caller_in_conference.xml b/java/com/android/incallui/res/layout/caller_in_conference.xml
index 37918188f..be4eca5f6 100644
--- a/java/com/android/incallui/res/layout/caller_in_conference.xml
+++ b/java/com/android/incallui/res/layout/caller_in_conference.xml
@@ -82,18 +82,6 @@
android:textColor="@color/conference_call_manager_secondary_text_color"
android:textSize="14sp"/>
- <!-- Number type -->
- <TextView
- android:id="@+id/conferenceCallerNumberType"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="marquee"
- android:gravity="start"
- android:singleLine="true"
- android:textAllCaps="true"
- android:textColor="@color/conference_call_manager_secondary_text_color"
- android:textSize="12sp"/>
-
</LinearLayout> <!-- End of caller number -->
</LinearLayout> <!-- End of caller information -->
@@ -110,7 +98,7 @@
android:contentDescription="@string/goPrivate"
android:scaleType="center"
android:src="@drawable/ic_call_split_white_24dp"
- android:tint="@color/conference_call_manager_icon_color"/>
+ android:tint="@color/icon_color_grey"/>
<!-- "Disconnect" button which terminates the connection with this caller. -->
<ImageButton
@@ -123,6 +111,6 @@
android:contentDescription="@string/conference_caller_disconnect_content_description"
android:scaleType="center"
android:src="@drawable/quantum_ic_call_end_white_24"
- android:tint="@color/conference_call_manager_icon_color"/>
+ android:tint="@color/icon_color_grey"/>
</LinearLayout> <!-- End of single list element -->
diff --git a/java/com/android/incallui/res/values/colors.xml b/java/com/android/incallui/res/values/colors.xml
index 4bded7855..32da57b84 100644
--- a/java/com/android/incallui/res/values/colors.xml
+++ b/java/com/android/incallui/res/values/colors.xml
@@ -17,7 +17,6 @@
<resources>
<color name="conference_call_manager_caller_name_text_color">#4d4d4d</color>
- <color name="conference_call_manager_icon_color">#999999</color>
<!-- Used with some smaller texts in manage conference screen. -->
<color name="conference_call_manager_secondary_text_color">#999999</color>
@@ -34,7 +33,6 @@
These colors are also used by InCallUIMaterialColorMapUtils to generate
primary activity colors.
-
-->
<array name="background_colors">
<item>#00796B</item>