Fix layout inconsistencies due to add to contacts shortcut
Use the contact uri (which is stored in the call log and does not
depend on performing an asynchronous lookup) instead of the lookup
key to determine whether or not to show the add to contacts
shortcut.
Bug: 17316578
Change-Id: Ib7ba14eaa6eeeb42c0aea784ee663f673f67040b
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index d0c7632..23d053d 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -1038,8 +1038,7 @@
// Do not show badge in call log.
if (!mIsCallLog) {
final ViewStub stub = (ViewStub) view.findViewById(R.id.link_stub);
-
- if (TextUtils.isEmpty(info.lookupKey)) {
+ if (UriUtils.isEncodedContactUri(info.lookupUri)) {
if (stub != null) {
final View inflated = stub.inflate();
inflated.setVisibility(View.VISIBLE);