OSDN Git Service

Handle external sources that request both social and detail.
authorJeff Sharkey <jsharkey@android.com>
Thu, 8 Oct 2009 23:57:06 +0000 (16:57 -0700)
committerJeff Sharkey <jsharkey@android.com>
Thu, 8 Oct 2009 23:57:06 +0000 (16:57 -0700)
When a source requests social summary, allow them to still
provide a fallback detail value when no social summary is
available.  (Otherwise the data row would be invisible.)

Partially fixes http://b/2176892

src/com/android/contacts/model/ExternalSource.java

index 743eb4e..d554c3a 100644 (file)
@@ -164,11 +164,14 @@ public class ExternalSource extends FallbackSource {
                 final boolean detailSocialSummary = a.getBoolean(
                         com.android.internal.R.styleable.ContactsDataKind_detailSocialSummary,
                         false);
+
                 if (detailSocialSummary) {
                     // Inflate social summary when requested
                     kind.actionBodySocial = true;
-                } else {
-                    // Otherwise inflate specific column as summary
+                }
+
+                if (detailColumn != null) {
+                    // Inflate specific column as summary
                     kind.actionBody = new FallbackSource.SimpleInflater(detailColumn);
                 }