Loading res/layout/call_log_list_item.xml +11 −0 Original line number Diff line number Diff line Loading @@ -121,7 +121,18 @@ android:layout_gravity="center_vertical" android:tint="?attr/call_log_secondary_text_color" android:scaleType="centerInside" android:visibility="gone" /> <TextView android:id="@+id/operator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/call_log_icon_margin" android:layout_gravity="center_vertical" android:textColor="?attr/call_log_secondary_text_color" android:textSize="12sp" android:singleLine="true" android:visibility="gone" /> <TextView android:id="@+id/call_location_and_date" android:layout_width="wrap_content" Loading res/layout/dialpad_fragment.xml +10 −0 Original line number Diff line number Diff line Loading @@ -73,4 +73,14 @@ </FrameLayout> <TextView android:id="@+id/dialpad_floating_operator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/dialpad_floating_action_button_container" android:layout_centerHorizontal="true" android:textColor="?attr/call_log_secondary_text_color" android:textSize="12sp" android:singleLine="true" android:visibility="gone" /> </view> src/com/android/dialer/PhoneCallDetails.java +21 −2 Original line number Diff line number Diff line Loading @@ -95,6 +95,10 @@ public class PhoneCallDetails implements CallDetailHeader.Data { * Duration type for this call. */ public final int durationType; /** * The operator for this call. */ public final String operator; /** * Default phone Id */ Loading Loading @@ -127,10 +131,11 @@ public class PhoneCallDetails implements CallDetailHeader.Data { public PhoneCallDetails(CharSequence number, int numberPresentation, CharSequence formattedNumber, String countryIso, String geocode, int[] callTypes, long date, long duration, String accountLabel, Drawable accountIcon, int features, Long dataUsage, String transcription, long accountId) { int features, Long dataUsage, String transcription, long accountId, String operator) { this(number, numberPresentation, formattedNumber, countryIso, geocode, callTypes, date, duration, "", 0, "", null, null, 0, accountLabel, accountIcon, features, dataUsage, transcription, Calls.DURATION_TYPE_ACTIVE, accountId); features, dataUsage, transcription, Calls.DURATION_TYPE_ACTIVE, accountId, operator); } public PhoneCallDetails(CharSequence number, int numberPresentation, Loading @@ -152,6 +157,19 @@ public class PhoneCallDetails implements CallDetailHeader.Data { int numberType, CharSequence numberLabel, Uri contactUri, Uri photoUri, int sourceType, String accountLabel, Drawable accountIcon, int features, Long dataUsage, String transcription, int durationType, long accountId) { this(number, numberPresentation, formattedNumber, countryIso, geocode, callTypes, date, duration, name, numberType, numberLabel, contactUri, photoUri, sourceType, accountLabel, accountIcon, features, dataUsage, transcription, durationType, accountId, null); } /** Create the details for a call with a number associated with a contact. */ public PhoneCallDetails(CharSequence number, int numberPresentation, CharSequence formattedNumber, String countryIso, String geocode, int[] callTypes, long date, long duration, CharSequence name, int numberType, CharSequence numberLabel, Uri contactUri, Uri photoUri, int sourceType, String accountLabel, Drawable accountIcon, int features, Long dataUsage, String transcription, int durationType, long accountId, String operator) { this.number = number; this.numberPresentation = numberPresentation; this.formattedNumber = formattedNumber; Loading @@ -173,6 +191,7 @@ public class PhoneCallDetails implements CallDetailHeader.Data { this.transcription = transcription; this.durationType = durationType; this.accountId = accountId; this.operator = operator; } @Override Loading src/com/android/dialer/PhoneCallDetailsHelper.java +10 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.view.View; import android.widget.TextView; import com.android.contacts.common.CallUtil; import com.android.contacts.common.MoreContactUtils; import com.android.contacts.common.testing.NeededForTesting; import com.android.contacts.common.util.PhoneNumberHelper; import com.android.dialer.calllog.CallTypeHelper; Loading Loading @@ -115,8 +116,15 @@ public class PhoneCallDetailsHelper { // set the account icon if it exists if (details.accountIcon != null) { if (MoreContactUtils.shouldShowOperator(mResources)) { views.operator.setVisibility(View.VISIBLE); views.operator.setText(details.operator); views.callAccountIcon.setVisibility(View.GONE); } else { views.operator.setVisibility(View.GONE); views.callAccountIcon.setVisibility(View.VISIBLE); views.callAccountIcon.setImageDrawable(details.accountIcon); } } else { views.callAccountIcon.setVisibility(View.GONE); } Loading src/com/android/dialer/PhoneCallDetailsViews.java +5 −1 Original line number Diff line number Diff line Loading @@ -31,16 +31,18 @@ public final class PhoneCallDetailsViews { public final View callTypeView; public final CallTypeIconsView callTypeIcons; public final ImageView callAccountIcon; public final TextView operator; public final TextView callLocationAndDate; public final TextView voicemailTranscriptionView; private PhoneCallDetailsViews(TextView nameView, View callTypeView, CallTypeIconsView callTypeIcons, ImageView callAccountIcon, CallTypeIconsView callTypeIcons, ImageView callAccountIcon, TextView operator, TextView callLocationAndDate, TextView voicemailTranscriptionView) { this.nameView = nameView; this.callTypeView = callTypeView; this.callTypeIcons = callTypeIcons; this.callAccountIcon = callAccountIcon; this.operator = operator; this.callLocationAndDate = callLocationAndDate; this.voicemailTranscriptionView = voicemailTranscriptionView; } Loading @@ -57,6 +59,7 @@ public final class PhoneCallDetailsViews { view.findViewById(R.id.call_type), (CallTypeIconsView) view.findViewById(R.id.call_type_icons), (ImageView) view.findViewById(R.id.call_account_icon), (TextView) view.findViewById(R.id.operator), (TextView) view.findViewById(R.id.call_location_and_date), (TextView) view.findViewById(R.id.voicemail_transcription)); } Loading @@ -68,6 +71,7 @@ public final class PhoneCallDetailsViews { new CallTypeIconsView(context), new ImageView(context), new TextView(context), new TextView(context), new TextView(context)); } } Loading
res/layout/call_log_list_item.xml +11 −0 Original line number Diff line number Diff line Loading @@ -121,7 +121,18 @@ android:layout_gravity="center_vertical" android:tint="?attr/call_log_secondary_text_color" android:scaleType="centerInside" android:visibility="gone" /> <TextView android:id="@+id/operator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/call_log_icon_margin" android:layout_gravity="center_vertical" android:textColor="?attr/call_log_secondary_text_color" android:textSize="12sp" android:singleLine="true" android:visibility="gone" /> <TextView android:id="@+id/call_location_and_date" android:layout_width="wrap_content" Loading
res/layout/dialpad_fragment.xml +10 −0 Original line number Diff line number Diff line Loading @@ -73,4 +73,14 @@ </FrameLayout> <TextView android:id="@+id/dialpad_floating_operator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/dialpad_floating_action_button_container" android:layout_centerHorizontal="true" android:textColor="?attr/call_log_secondary_text_color" android:textSize="12sp" android:singleLine="true" android:visibility="gone" /> </view>
src/com/android/dialer/PhoneCallDetails.java +21 −2 Original line number Diff line number Diff line Loading @@ -95,6 +95,10 @@ public class PhoneCallDetails implements CallDetailHeader.Data { * Duration type for this call. */ public final int durationType; /** * The operator for this call. */ public final String operator; /** * Default phone Id */ Loading Loading @@ -127,10 +131,11 @@ public class PhoneCallDetails implements CallDetailHeader.Data { public PhoneCallDetails(CharSequence number, int numberPresentation, CharSequence formattedNumber, String countryIso, String geocode, int[] callTypes, long date, long duration, String accountLabel, Drawable accountIcon, int features, Long dataUsage, String transcription, long accountId) { int features, Long dataUsage, String transcription, long accountId, String operator) { this(number, numberPresentation, formattedNumber, countryIso, geocode, callTypes, date, duration, "", 0, "", null, null, 0, accountLabel, accountIcon, features, dataUsage, transcription, Calls.DURATION_TYPE_ACTIVE, accountId); features, dataUsage, transcription, Calls.DURATION_TYPE_ACTIVE, accountId, operator); } public PhoneCallDetails(CharSequence number, int numberPresentation, Loading @@ -152,6 +157,19 @@ public class PhoneCallDetails implements CallDetailHeader.Data { int numberType, CharSequence numberLabel, Uri contactUri, Uri photoUri, int sourceType, String accountLabel, Drawable accountIcon, int features, Long dataUsage, String transcription, int durationType, long accountId) { this(number, numberPresentation, formattedNumber, countryIso, geocode, callTypes, date, duration, name, numberType, numberLabel, contactUri, photoUri, sourceType, accountLabel, accountIcon, features, dataUsage, transcription, durationType, accountId, null); } /** Create the details for a call with a number associated with a contact. */ public PhoneCallDetails(CharSequence number, int numberPresentation, CharSequence formattedNumber, String countryIso, String geocode, int[] callTypes, long date, long duration, CharSequence name, int numberType, CharSequence numberLabel, Uri contactUri, Uri photoUri, int sourceType, String accountLabel, Drawable accountIcon, int features, Long dataUsage, String transcription, int durationType, long accountId, String operator) { this.number = number; this.numberPresentation = numberPresentation; this.formattedNumber = formattedNumber; Loading @@ -173,6 +191,7 @@ public class PhoneCallDetails implements CallDetailHeader.Data { this.transcription = transcription; this.durationType = durationType; this.accountId = accountId; this.operator = operator; } @Override Loading
src/com/android/dialer/PhoneCallDetailsHelper.java +10 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.view.View; import android.widget.TextView; import com.android.contacts.common.CallUtil; import com.android.contacts.common.MoreContactUtils; import com.android.contacts.common.testing.NeededForTesting; import com.android.contacts.common.util.PhoneNumberHelper; import com.android.dialer.calllog.CallTypeHelper; Loading Loading @@ -115,8 +116,15 @@ public class PhoneCallDetailsHelper { // set the account icon if it exists if (details.accountIcon != null) { if (MoreContactUtils.shouldShowOperator(mResources)) { views.operator.setVisibility(View.VISIBLE); views.operator.setText(details.operator); views.callAccountIcon.setVisibility(View.GONE); } else { views.operator.setVisibility(View.GONE); views.callAccountIcon.setVisibility(View.VISIBLE); views.callAccountIcon.setImageDrawable(details.accountIcon); } } else { views.callAccountIcon.setVisibility(View.GONE); } Loading
src/com/android/dialer/PhoneCallDetailsViews.java +5 −1 Original line number Diff line number Diff line Loading @@ -31,16 +31,18 @@ public final class PhoneCallDetailsViews { public final View callTypeView; public final CallTypeIconsView callTypeIcons; public final ImageView callAccountIcon; public final TextView operator; public final TextView callLocationAndDate; public final TextView voicemailTranscriptionView; private PhoneCallDetailsViews(TextView nameView, View callTypeView, CallTypeIconsView callTypeIcons, ImageView callAccountIcon, CallTypeIconsView callTypeIcons, ImageView callAccountIcon, TextView operator, TextView callLocationAndDate, TextView voicemailTranscriptionView) { this.nameView = nameView; this.callTypeView = callTypeView; this.callTypeIcons = callTypeIcons; this.callAccountIcon = callAccountIcon; this.operator = operator; this.callLocationAndDate = callLocationAndDate; this.voicemailTranscriptionView = voicemailTranscriptionView; } Loading @@ -57,6 +59,7 @@ public final class PhoneCallDetailsViews { view.findViewById(R.id.call_type), (CallTypeIconsView) view.findViewById(R.id.call_type_icons), (ImageView) view.findViewById(R.id.call_account_icon), (TextView) view.findViewById(R.id.operator), (TextView) view.findViewById(R.id.call_location_and_date), (TextView) view.findViewById(R.id.voicemail_transcription)); } Loading @@ -68,6 +71,7 @@ public final class PhoneCallDetailsViews { new CallTypeIconsView(context), new ImageView(context), new TextView(context), new TextView(context), new TextView(context)); } }