Loading src/com/android/dialer/calllog/CallLogListItemHelper.java +15 −7 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.res.Resources; import android.provider.CallLog.Calls; import android.text.SpannableStringBuilder; import android.text.TextUtils; import android.util.Log; import com.android.contacts.common.CallUtil; import com.android.dialer.PhoneCallDetails; Loading @@ -31,6 +32,8 @@ import com.android.dialer.R; * Helper class to fill in the views of a call log entry. */ /* package */class CallLogListItemHelper { private static final String TAG = "CallLogListItemHelper"; /** Helper for populating the details of a phone call. */ private final PhoneCallDetailsHelper mPhoneCallDetailsHelper; /** Helper for handling phone numbers. */ Loading Loading @@ -79,25 +82,30 @@ import com.android.dialer.R; * @param views The views associated with the current call log entry. */ public void setActionContentDescriptions(CallLogListItemViews views) { if (views.nameOrNumber == null) { Log.e(TAG, "setActionContentDescriptions; name or number is null."); } // Calling expandTemplate with a null parameter will cause a NullPointerException. // Although we don't expect a null name or number, it is best to protect against it. CharSequence nameOrNumber = views.nameOrNumber == null ? "" : views.nameOrNumber; views.callBackButtonView.setContentDescription( TextUtils.expandTemplate( mResources.getString(R.string.description_call_back_action), views.nameOrNumber)); mResources.getString(R.string.description_call_back_action), nameOrNumber)); views.videoCallButtonView.setContentDescription( TextUtils.expandTemplate( mResources.getString(R.string.description_video_call_action), views.nameOrNumber)); nameOrNumber)); views.voicemailButtonView.setContentDescription( TextUtils.expandTemplate( mResources.getString(R.string.description_voicemail_action), views.nameOrNumber)); mResources.getString(R.string.description_voicemail_action), nameOrNumber)); views.detailsButtonView.setContentDescription( TextUtils.expandTemplate( mResources.getString(R.string.description_details_action), views.nameOrNumber)); mResources.getString(R.string.description_details_action), nameOrNumber)); } /** Loading Loading
src/com/android/dialer/calllog/CallLogListItemHelper.java +15 −7 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.res.Resources; import android.provider.CallLog.Calls; import android.text.SpannableStringBuilder; import android.text.TextUtils; import android.util.Log; import com.android.contacts.common.CallUtil; import com.android.dialer.PhoneCallDetails; Loading @@ -31,6 +32,8 @@ import com.android.dialer.R; * Helper class to fill in the views of a call log entry. */ /* package */class CallLogListItemHelper { private static final String TAG = "CallLogListItemHelper"; /** Helper for populating the details of a phone call. */ private final PhoneCallDetailsHelper mPhoneCallDetailsHelper; /** Helper for handling phone numbers. */ Loading Loading @@ -79,25 +82,30 @@ import com.android.dialer.R; * @param views The views associated with the current call log entry. */ public void setActionContentDescriptions(CallLogListItemViews views) { if (views.nameOrNumber == null) { Log.e(TAG, "setActionContentDescriptions; name or number is null."); } // Calling expandTemplate with a null parameter will cause a NullPointerException. // Although we don't expect a null name or number, it is best to protect against it. CharSequence nameOrNumber = views.nameOrNumber == null ? "" : views.nameOrNumber; views.callBackButtonView.setContentDescription( TextUtils.expandTemplate( mResources.getString(R.string.description_call_back_action), views.nameOrNumber)); mResources.getString(R.string.description_call_back_action), nameOrNumber)); views.videoCallButtonView.setContentDescription( TextUtils.expandTemplate( mResources.getString(R.string.description_video_call_action), views.nameOrNumber)); nameOrNumber)); views.voicemailButtonView.setContentDescription( TextUtils.expandTemplate( mResources.getString(R.string.description_voicemail_action), views.nameOrNumber)); mResources.getString(R.string.description_voicemail_action), nameOrNumber)); views.detailsButtonView.setContentDescription( TextUtils.expandTemplate( mResources.getString(R.string.description_details_action), views.nameOrNumber)); mResources.getString(R.string.description_details_action), nameOrNumber)); } /** Loading