Clean up SIP-specific TODO comments.
Now that SIP calls have a special icon in the Quick Contacts widget (see
change https://android-git.corp.google.com/g/64976) here's a change to
clean up a couple of left-over TODO comments in the apps/Contacts code.
Bug: 2969763
Change-Id: Ia52f5e9965afdb4b16d771471ef4a4edab73dc33
diff --git a/src/com/android/contacts/model/FallbackSource.java b/src/com/android/contacts/model/FallbackSource.java
index d77f8f5..f36752a 100644
--- a/src/com/android/contacts/model/FallbackSource.java
+++ b/src/com/android/contacts/model/FallbackSource.java
@@ -443,9 +443,18 @@
protected DataKind inflateSipAddress(Context context, int inflateLevel) {
DataKind kind = getKindForMimetype(SipAddress.CONTENT_ITEM_TYPE);
if (kind == null) {
- // TODO: icon here should really be a SIP-specific variant of sym_action_call
+ // The icon specified here is the one that gets displayed for
+ // "Internet call" items, in the "view contact" UI within the
+ // Contacts app.
+ //
+ // This is independent of the "SIP call" icon that gets
+ // displayed in the Quick Contacts widget, which comes from
+ // the android:icon attribute of the SIP-related
+ // intent-filters in the Phone app's manifest.
+
kind = addKind(new DataKind(SipAddress.CONTENT_ITEM_TYPE,
R.string.label_sip_address, android.R.drawable.sym_action_call, 130, true));
+
kind.isList = false;
kind.secondary = true;
kind.actionHeader = new SimpleInflater(R.string.label_sip_address);
diff --git a/src/com/android/contacts/ui/QuickContactWindow.java b/src/com/android/contacts/ui/QuickContactWindow.java
index 1ed7e32..8662573 100644
--- a/src/com/android/contacts/ui/QuickContactWindow.java
+++ b/src/com/android/contacts/ui/QuickContactWindow.java
@@ -779,11 +779,12 @@
if (!TextUtils.isEmpty(address)) {
final Uri callUri = Uri.fromParts(Constants.SCHEME_SIP, address, null);
mIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED, callUri);
- // TODO: This item currently appears with the same "phone"
- // icon as regular phone numbers, which is confusing if a
- // contact has both a regular number *and* a SIP address.
- // Need to figure out a way for this item to have a
- // special SIP-specific variant of that icon.
+ // Note that this item will get a SIP-specific variant
+ // of the "call phone" icon, rather than the standard
+ // app icon for the Phone app (which we show for
+ // regular phone numbers.) That's because the phone
+ // app explicitly specifies an android:icon attribute
+ // for the SIP-related intent-filters in its manifest.
}
} else if (Constants.MIME_SMS_ADDRESS.equals(mimeType)) {
final String number = getAsString(cursor, Phone.NUMBER);