Lookup uris, delete, aggregation rules, untyped, sharing.
ContactsListView: combined together various import/export
menus under single dialog, hiding SIM import when no ICC
present. Switched almost all cases to use soft "lookup"
uris, especially for pick and operation cases. Brought
back delete in long-press menu, and pick modes needed for
SHOW_OR_CREATE. These partially fix http://b/2096050 and
http://b/2096870 and http://b/2102632
ViewContactActivity: changed menus to inflate from XML,
added "Share" option to replace barcode. Confirmed that it
sends vCard through Gmail, other apps can match MIME-type
to begin appearing in picker. Changed EAS rules back to
untyped for Email and IM, which now allows use to use IM
type as protocol picker. Fixes http://b/2072731 and
http://b/2092744 and http://b/2088935
EditContactActivity: restructured editing to front-load all
version assertions, and perform as single batch to prepare
for reparenting. Correctly generate AggregationExceptions
using new API from dplotnikov, especially in cases where we
create multiple RawContacts from scratch. Unit tests to
verify exceptions built correctly for edge cases. Also
showing toast when saving failed. These changes were mostly
untracked, but fixes http://b/2099211
Various untracked NPE related to untyped HardCodedSources
and cleanup of "tel" "smsto" and SMS MIME-type constants.
diff --git a/res/menu/list.xml b/res/menu/list.xml
index fbcdd47..b5a2750 100644
--- a/res/menu/list.xml
+++ b/res/menu/list.xml
@@ -37,13 +37,8 @@
android:title="@string/menu_accounts" />
<item
- android:id="@+id/menu_import"
- android:icon="@drawable/ic_menu_import_contact"
- android:title="@string/importFromSim" />
-
- <item
- android:id="@+id/menu_export"
+ android:id="@+id/menu_import_export"
android:icon="@drawable/ic_menu_export_contact"
- android:title="@string/export_contact_list" />
+ android:title="@string/menu_import_export" />
</menu>
diff --git a/res/menu/view.xml b/res/menu/view.xml
new file mode 100644
index 0000000..cf43802
--- /dev/null
+++ b/res/menu/view.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/menu_edit"
+ android:icon="@android:drawable/ic_menu_edit"
+ android:title="@string/menu_editContact"
+ android:alphabeticShortcut="e" />
+
+ <item
+ android:id="@+id/menu_share"
+ android:icon="@android:drawable/ic_menu_share"
+ android:title="@string/menu_share"
+ android:alphabeticShortcut="s" />
+
+ <item
+ android:id="@+id/menu_options"
+ android:icon="@drawable/ic_menu_mark"
+ android:title="@string/menu_contactOptions" />
+
+ <!-- TODO: use new split/join icons -->
+ <item
+ android:id="@+id/menu_split"
+ android:icon="@android:drawable/ic_menu_share"
+ android:title="@string/menu_splitAggregate" />
+
+ <item
+ android:id="@+id/menu_join"
+ android:icon="@android:drawable/ic_menu_add"
+ android:title="@string/menu_joinAggregate" />
+
+ <item
+ android:id="@+id/menu_delete"
+ android:icon="@android:drawable/ic_menu_delete"
+ android:title="@string/menu_deleteContact" />
+
+</menu>
diff --git a/res/values/ids.xml b/res/values/ids.xml
index 48981e0..060f252 100644
--- a/res/values/ids.xml
+++ b/res/values/ids.xml
@@ -29,4 +29,6 @@
<item type="id" name="dialog_sync_add" />
+ <item type="id" name="dialog_import_export" />
+
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 813e212..46a4210 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -350,6 +350,9 @@
<!-- Toast displayed when a contact is saved -->
<string name="contactSavedToast">Contact saved.</string>
+ <!-- Toast displayed when saving a contact failed -->
+ <string name="contactSavedErrorToast">Error, unable to save contact changes.</string>
+
<!-- Separator in the contact details list describing that the items below it will place a call when clicked -->
<string name="listSeparatorCallNumber">Dial number</string>
@@ -692,10 +695,13 @@
<string name="select_import_type_title">Where would you like to import contacts from?</string>
<!-- Action string for selecting SIM for importing contacts -->
- <string name="import_from_sim">SIM Card</string>
+ <string name="import_from_sim">Import from SIM card</string>
<!-- Action string for selecting SD Card for importing contacts -->
- <string name="import_from_sdcard">SD Card</string>
+ <string name="import_from_sdcard">Import from SD card</string>
+
+ <!-- Action that exports all contacts to SD Card -->
+ <string name="export_to_sdcard">Export to SD card</string>
<!-- "Import one vCard file" -->
<string name="import_one_vcard_string">Import one vCard file</string>
@@ -832,6 +838,23 @@
<!-- The menu item to open the list of accounts -->
<string name="menu_accounts">Accounts</string>
+ <!-- The menu item to bulk import or bulk export contacts from SIM card or SD card. -->
+ <string name="menu_import_export">Import/Export</string>
+
+ <!-- Dialog title when selecting the bulk operation to perform from a list. -->
+ <string name="dialog_import_export">Import/Export contacts</string>
+
+ <!-- The menu item to share the currently viewed contact -->
+ <string name="menu_share">Share</string>
+
+ <!-- Dialog title when picking the application to share a contact with. -->
+ <string name="share_via">Share contact via</string>
+
+ <!-- Toast indicating that sharing a contact has failed. -->
+ <string name="share_error">This contact cannot be shared.</string>
+
+
+
<!-- TODO: add comments to each of these strings to prepare for translation -->
<string name="nameLabelsGroup">Name</string>
<string name="nicknameLabelsGroup">Nickname</string>
@@ -863,14 +886,6 @@
<string name="type_radio">Radio</string>
<string name="type_assistant">Assistant</string>
-<string name="type_email_1">Email 1</string>
-<string name="type_email_2">Email 2</string>
-<string name="type_email_3">Email 3</string>
-
-<string name="type_im_1">IM 1</string>
-<string name="type_im_2">IM 2</string>
-<string name="type_im_3">IM 3</string>
-
<string name="type_im_aim">AIM</string>
<string name="type_im_msn">Windows Live</string>
<string name="type_im_yahoo">Yahoo</string>
@@ -953,9 +968,6 @@
<string name="email_other">Email other</string>
<string name="email_custom">Email <xliff:g id="custom">%s</xliff:g></string>
-<string name="email_1">Email 1</string>
-<string name="email_2">Email 2</string>
-<string name="email_3">Email 3</string>
<string name="email">Email</string>
@@ -975,11 +987,6 @@
<string name="chat_jabber">Chat using Jabber</string>
<string name="chat_other">Chat</string>
-<string name="im_1">Chat 1</string>
-<string name="im_2">Chat 2</string>
-<string name="im_3">Chat 3</string>
-<string name="im">Chat</string>
-
<string name="postal_street">Street</string>
<string name="postal_pobox">PO box</string>
<string name="postal_neighborhood">Neighborhood</string>