diff options
author | Brad Ebinger <breadley@google.com> | 2016-03-30 18:24:42 -0700 |
---|---|---|
committer | Brad Ebinger <breadley@google.com> | 2016-04-06 18:24:24 -0700 |
commit | a46ed83a7ccba16bbfd791a3a6588d5f0add9526 (patch) | |
tree | 33f77eaf075c660fa7cd11e703619ec68c9015c2 /src/com/android/dialer/CallDetailActivity.java | |
parent | 84a1becf7d9a7055f16fc5b0e503e0512dcdfcf1 (diff) |
Add via number to CallLog Account entry
Call Log now provides the phone number that an incoming call was
received on if that number is different than the SIM subscription
number. This "via number" is appended to the Phone Account of the Call
Log entry in Dialer if it exists.
Screenshots:
- One PhoneAccount: http://screen/HuCSL0U6jU6.png
- Multiple PhoneAccounts: http://screen/pDg8F9zpMei.png
Bug: 25594198
Change-Id: I8c05ea98409e54d20493fbdb20096bf851480719
Diffstat (limited to 'src/com/android/dialer/CallDetailActivity.java')
-rw-r--r-- | src/com/android/dialer/CallDetailActivity.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index 42bee1edf..94c2f0018 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -142,10 +142,23 @@ public class CallDetailActivity extends AppCompatActivity } } - String accountLabel = - PhoneAccountUtils.getAccountLabel(mContext, mDetails.accountHandle); + CharSequence accountLabel = PhoneAccountUtils.getAccountLabel(mContext, + mDetails.accountHandle); + CharSequence accountContentDescription = + PhoneCallDetails.createAccountLabelDescription(mResources, mDetails.viaNumber, + accountLabel); + if (!TextUtils.isEmpty(mDetails.viaNumber)) { + if (!TextUtils.isEmpty(accountLabel)) { + accountLabel = mResources.getString(R.string.call_log_via_number_phone_account, + accountLabel, mDetails.viaNumber); + } else { + accountLabel = mResources.getString(R.string.call_log_via_number, + mDetails.viaNumber); + } + } if (!TextUtils.isEmpty(accountLabel)) { mAccountLabel.setText(accountLabel); + mAccountLabel.setContentDescription(accountContentDescription); mAccountLabel.setVisibility(View.VISIBLE); } else { mAccountLabel.setVisibility(View.GONE); |