Merge change I511ba352 into eclair
* changes:
Remove tabs, join, and aggregate badge from ViewContactActivity
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d63da99..0950ff0 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -268,7 +268,7 @@
android:theme="@style/FullyTranslucent.QuickContact">
<intent-filter>
- <action android:name="com.android.contacts.action.FAST_TRACK" />
+ <action android:name="com.android.contacts.action.QUICK_CONTACT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/contact" android:host="com.android.contacts" />
</intent-filter>
diff --git a/res/drawable-hdpi/ic_launcher_contacts.png b/res/drawable-hdpi/ic_launcher_contacts.png
index 0bcbca4..be57b4a 100644
--- a/res/drawable-hdpi/ic_launcher_contacts.png
+++ b/res/drawable-hdpi/ic_launcher_contacts.png
Binary files differ
diff --git a/res/values/strings.xml b/res/values/strings.xml
index e26b42e..60f784d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -954,6 +954,8 @@
<string name="organizationLabelsGroup">Organization</string>
<!-- Header that expands to list all website types when editing a website of a contact -->
<string name="websiteLabelsGroup">Website</string>
+ <!-- Header that expands to list all event types when editing an event of a contact -->
+ <string name="eventLabelsGroup">Event</string>
<!-- Single-character overlay for home phone numbers when creating desktop shortcuts -->
<string name="type_short_home">H</string>
@@ -1165,7 +1167,7 @@
<string name="split_label">Split</string>
<!-- The explanation of what "split" will do. This needs word-smithing. -->
<string name="split_explanation">Make this data its own contact.</string>
-
+
<!-- Formatting string for account name -->
<string name="account_name_format">From <xliff:g id="source" example="Gmail">%1$s</xliff:g> account: <xliff:g id="account" example="user@gmail.com">%2$s</xliff:g></string>
diff --git a/src/com/android/contacts/model/FallbackSource.java b/src/com/android/contacts/model/FallbackSource.java
index fa545be..ebef42b 100644
--- a/src/com/android/contacts/model/FallbackSource.java
+++ b/src/com/android/contacts/model/FallbackSource.java
@@ -25,6 +25,7 @@
import android.database.Cursor;
import android.provider.ContactsContract.CommonDataKinds.BaseTypes;
import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Event;
import android.provider.ContactsContract.CommonDataKinds.Im;
import android.provider.ContactsContract.CommonDataKinds.Nickname;
import android.provider.ContactsContract.CommonDataKinds.Note;
@@ -74,6 +75,7 @@
inflatePhoto(inflateLevel);
inflateNote(inflateLevel);
inflateWebsite(inflateLevel);
+ inflateEvent(inflateLevel);
setInflatedLevel(inflateLevel);
@@ -376,6 +378,19 @@
return kind;
}
+ protected DataKind inflateEvent(int inflateLevel) {
+ DataKind kind = getKindForMimetype(Event.CONTENT_ITEM_TYPE);
+ if (kind == null) {
+ kind = addKind(new DataKind(Event.CONTENT_ITEM_TYPE,
+ R.string.eventLabelsGroup, -1, 150, false));
+ kind.secondary = true;
+ kind.actionHeader = new EventActionInflater();
+ kind.actionBody = new SimpleInflater(Event.START_DATE);
+ }
+
+ return kind;
+ }
+
/**
* Simple inflater that assumes a string resource has a "%s" that will be
* filled from the given column.
@@ -558,6 +573,13 @@
}
}
+ public static class EventActionInflater extends CommonInflater {
+ @Override
+ protected int getTypeLabelResource(Integer type) {
+ return Event.getTypeResource(type);
+ }
+ }
+
public static class PostalActionInflater extends CommonInflater {
@Override
protected int getTypeLabelResource(Integer type) {
diff --git a/src/com/android/contacts/model/GoogleSource.java b/src/com/android/contacts/model/GoogleSource.java
index 6706ec0..010982c 100644
--- a/src/com/android/contacts/model/GoogleSource.java
+++ b/src/com/android/contacts/model/GoogleSource.java
@@ -61,6 +61,7 @@
inflatePhoto(inflateLevel);
inflateNote(inflateLevel);
inflateWebsite(inflateLevel);
+ inflateEvent(inflateLevel);
// TODO: GOOGLE: GROUPMEMBERSHIP
diff --git a/src/com/android/contacts/ui/widget/ContactEditorView.java b/src/com/android/contacts/ui/widget/ContactEditorView.java
index 245986b..c723f6f 100644
--- a/src/com/android/contacts/ui/widget/ContactEditorView.java
+++ b/src/com/android/contacts/ui/widget/ContactEditorView.java
@@ -35,7 +35,6 @@
import android.provider.ContactsContract.RawContacts;
import android.provider.ContactsContract.CommonDataKinds.Photo;
import android.provider.ContactsContract.CommonDataKinds.StructuredName;
-import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
@@ -205,6 +204,9 @@
parent.addView(section);
}
}
+ final int secondaryVisibility = mSecondary.getChildCount() > 0 ? View.VISIBLE : View.GONE;
+ mSecondary.setVisibility(secondaryVisibility);
+ mSecondaryHeader.setVisibility(secondaryVisibility);
}
/**