Loading res/layout/call_detail.xml +9 −21 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ android:id="@+id/voicemail_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="@dimen/call_log_icon_margin" android:layout_below="@id/blue_separator" android:background="@android:color/black" > Loading Loading @@ -118,7 +119,7 @@ android:layout_marginLeft="@dimen/call_detail_contact_name_margin" android:gravity="center_vertical" android:textColor="?attr/call_log_primary_text_color" android:textSize="18sp" android:textAppearance="?android:attr/textAppearanceMedium" android:singleLine="true" /> <ImageButton Loading @@ -134,6 +135,7 @@ <FrameLayout android:id="@+id/call_and_sms_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/call_log_icon_margin" android:layout_below="@id/voicemail_container" android:background="@android:color/black" > Loading @@ -142,7 +144,6 @@ android:layout_width="match_parent" android:layout_height="@dimen/call_log_list_item_height" android:orientation="horizontal" android:layout_marginTop="@dimen/call_log_icon_margin" android:gravity="center_vertical" android:background="@drawable/dialpad_background" > Loading @@ -158,31 +159,18 @@ android:background="@drawable/btn_dial" > <TextView android:id="@+id/call_and_sms_text1" <TextView android:id="@+id/call_and_sms_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceMedium" /> <LinearLayout android:id="@+id/call_and_sms_line2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > <TextView android:id="@+id/call_and_sms_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dip" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> <TextView android:id="@+id/call_and_sms_number" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:textAllCaps="true" /> </LinearLayout> </LinearLayout> Loading res/layout/call_detail_history_item.xml +3 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/call_log_icon_margin" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/secondary_text_color" /> </LinearLayout> Loading @@ -48,12 +49,14 @@ android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/secondary_text_color" /> <TextView android:id="@+id/duration" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/secondary_text_color" /> </LinearLayout> res/layout/playback_layout.xml +99 −105 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:background="@color/voicemail_playback_ui_background" > <!-- Mute, playback, trash buttons. --> Loading Loading @@ -122,4 +117,3 @@ /> </RelativeLayout> </RelativeLayout> </LinearLayout> src/com/android/contacts/CallDetailActivity.java +11 −20 Original line number Diff line number Diff line Loading @@ -198,6 +198,7 @@ public class CallDetailActivity extends Activity { * playback. If it doesn't, then hide the voicemail ui. */ private void optionallyHandleVoicemail() { View voicemailContainer = findViewById(R.id.voicemail_container); if (hasVoicemail()) { // Has voicemail: add the voicemail fragment. Add suitable arguments to set the uri // to play and optionally start the playback. Loading @@ -209,6 +210,7 @@ public class CallDetailActivity extends Activity { fragmentArguments.putBoolean(EXTRA_VOICEMAIL_START_PLAYBACK, true); } playbackFragment.setArguments(fragmentArguments); voicemailContainer.setVisibility(View.VISIBLE); getFragmentManager().beginTransaction() .add(R.id.voicemail_container, playbackFragment).commit(); mAsyncQueryHandler.startVoicemailStatusQuery(getVoicemailUri()); Loading @@ -216,6 +218,7 @@ public class CallDetailActivity extends Activity { } else { // No voicemail uri: hide the status view. mStatusMessageView.setVisibility(View.GONE); voicemailContainer.setVisibility(View.GONE); } } Loading Loading @@ -409,7 +412,8 @@ public class CallDetailActivity extends Activity { getString(R.string.description_call, nameOrNumber)); // Only show a label if the number is shown and it is not a SIP address. if (!TextUtils.isEmpty(firstDetails.number) if (!TextUtils.isEmpty(firstDetails.name) && !TextUtils.isEmpty(firstDetails.number) && !PhoneNumberUtils.isUriNumber(firstDetails.number.toString())) { entry.label = Phone.getTypeLabel(mResources, firstDetails.numberType, firstDetails.numberLabel); Loading Loading @@ -550,7 +554,6 @@ public class CallDetailActivity extends Activity { public final String primaryDescription; public CharSequence label = null; public String number = null; /** Icon for the secondary action. */ public int secondaryIcon = 0; /** Intent for the secondary action. If not null, an icon must be defined. */ Loading Loading @@ -583,7 +586,7 @@ public class CallDetailActivity extends Activity { ImageView icon = (ImageView) convertView.findViewById(R.id.call_and_sms_icon); View divider = convertView.findViewById(R.id.call_and_sms_divider); TextView text = (TextView) convertView.findViewById(R.id.call_and_sms_text1); TextView text = (TextView) convertView.findViewById(R.id.call_and_sms_text); View mainAction = convertView.findViewById(R.id.call_and_sms_main_action); mainAction.setOnClickListener(mPrimaryActionListener); Loading @@ -603,25 +606,13 @@ public class CallDetailActivity extends Activity { } text.setText(entry.text); View line2 = convertView.findViewById(R.id.call_and_sms_line2); boolean numberEmpty = TextUtils.isEmpty(entry.number); boolean labelEmpty = TextUtils.isEmpty(entry.label) || numberEmpty; if (labelEmpty && numberEmpty) { line2.setVisibility(View.GONE); } else { line2.setVisibility(View.VISIBLE); TextView label = (TextView) convertView.findViewById(R.id.call_and_sms_label); if (labelEmpty) { if (TextUtils.isEmpty(entry.label)) { label.setVisibility(View.GONE); } else { label.setText(entry.label); label.setVisibility(View.VISIBLE); } TextView number = (TextView) convertView.findViewById(R.id.call_and_sms_number); number.setText(entry.number); } } @Override Loading Loading
res/layout/call_detail.xml +9 −21 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ android:id="@+id/voicemail_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="@dimen/call_log_icon_margin" android:layout_below="@id/blue_separator" android:background="@android:color/black" > Loading Loading @@ -118,7 +119,7 @@ android:layout_marginLeft="@dimen/call_detail_contact_name_margin" android:gravity="center_vertical" android:textColor="?attr/call_log_primary_text_color" android:textSize="18sp" android:textAppearance="?android:attr/textAppearanceMedium" android:singleLine="true" /> <ImageButton Loading @@ -134,6 +135,7 @@ <FrameLayout android:id="@+id/call_and_sms_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/call_log_icon_margin" android:layout_below="@id/voicemail_container" android:background="@android:color/black" > Loading @@ -142,7 +144,6 @@ android:layout_width="match_parent" android:layout_height="@dimen/call_log_list_item_height" android:orientation="horizontal" android:layout_marginTop="@dimen/call_log_icon_margin" android:gravity="center_vertical" android:background="@drawable/dialpad_background" > Loading @@ -158,31 +159,18 @@ android:background="@drawable/btn_dial" > <TextView android:id="@+id/call_and_sms_text1" <TextView android:id="@+id/call_and_sms_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceMedium" /> <LinearLayout android:id="@+id/call_and_sms_line2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > <TextView android:id="@+id/call_and_sms_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dip" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" /> <TextView android:id="@+id/call_and_sms_number" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:textAllCaps="true" /> </LinearLayout> </LinearLayout> Loading
res/layout/call_detail_history_item.xml +3 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/call_log_icon_margin" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/secondary_text_color" /> </LinearLayout> Loading @@ -48,12 +49,14 @@ android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/secondary_text_color" /> <TextView android:id="@+id/duration" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/secondary_text_color" /> </LinearLayout>
res/layout/playback_layout.xml +99 −105 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:background="@color/voicemail_playback_ui_background" > <!-- Mute, playback, trash buttons. --> Loading Loading @@ -122,4 +117,3 @@ /> </RelativeLayout> </RelativeLayout> </LinearLayout>
src/com/android/contacts/CallDetailActivity.java +11 −20 Original line number Diff line number Diff line Loading @@ -198,6 +198,7 @@ public class CallDetailActivity extends Activity { * playback. If it doesn't, then hide the voicemail ui. */ private void optionallyHandleVoicemail() { View voicemailContainer = findViewById(R.id.voicemail_container); if (hasVoicemail()) { // Has voicemail: add the voicemail fragment. Add suitable arguments to set the uri // to play and optionally start the playback. Loading @@ -209,6 +210,7 @@ public class CallDetailActivity extends Activity { fragmentArguments.putBoolean(EXTRA_VOICEMAIL_START_PLAYBACK, true); } playbackFragment.setArguments(fragmentArguments); voicemailContainer.setVisibility(View.VISIBLE); getFragmentManager().beginTransaction() .add(R.id.voicemail_container, playbackFragment).commit(); mAsyncQueryHandler.startVoicemailStatusQuery(getVoicemailUri()); Loading @@ -216,6 +218,7 @@ public class CallDetailActivity extends Activity { } else { // No voicemail uri: hide the status view. mStatusMessageView.setVisibility(View.GONE); voicemailContainer.setVisibility(View.GONE); } } Loading Loading @@ -409,7 +412,8 @@ public class CallDetailActivity extends Activity { getString(R.string.description_call, nameOrNumber)); // Only show a label if the number is shown and it is not a SIP address. if (!TextUtils.isEmpty(firstDetails.number) if (!TextUtils.isEmpty(firstDetails.name) && !TextUtils.isEmpty(firstDetails.number) && !PhoneNumberUtils.isUriNumber(firstDetails.number.toString())) { entry.label = Phone.getTypeLabel(mResources, firstDetails.numberType, firstDetails.numberLabel); Loading Loading @@ -550,7 +554,6 @@ public class CallDetailActivity extends Activity { public final String primaryDescription; public CharSequence label = null; public String number = null; /** Icon for the secondary action. */ public int secondaryIcon = 0; /** Intent for the secondary action. If not null, an icon must be defined. */ Loading Loading @@ -583,7 +586,7 @@ public class CallDetailActivity extends Activity { ImageView icon = (ImageView) convertView.findViewById(R.id.call_and_sms_icon); View divider = convertView.findViewById(R.id.call_and_sms_divider); TextView text = (TextView) convertView.findViewById(R.id.call_and_sms_text1); TextView text = (TextView) convertView.findViewById(R.id.call_and_sms_text); View mainAction = convertView.findViewById(R.id.call_and_sms_main_action); mainAction.setOnClickListener(mPrimaryActionListener); Loading @@ -603,25 +606,13 @@ public class CallDetailActivity extends Activity { } text.setText(entry.text); View line2 = convertView.findViewById(R.id.call_and_sms_line2); boolean numberEmpty = TextUtils.isEmpty(entry.number); boolean labelEmpty = TextUtils.isEmpty(entry.label) || numberEmpty; if (labelEmpty && numberEmpty) { line2.setVisibility(View.GONE); } else { line2.setVisibility(View.VISIBLE); TextView label = (TextView) convertView.findViewById(R.id.call_and_sms_label); if (labelEmpty) { if (TextUtils.isEmpty(entry.label)) { label.setVisibility(View.GONE); } else { label.setText(entry.label); label.setVisibility(View.VISIBLE); } TextView number = (TextView) convertView.findViewById(R.id.call_and_sms_number); number.setText(entry.number); } } @Override Loading