summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWysie <sohyuanchin@gmail.com>2010-01-03 01:39:26 +0800
committerWysie <sohyuanchin@gmail.com>2010-01-03 01:39:26 +0800
commitb207437ffc9fdace64f652c39a08741a3f33823f (patch)
tree98cafdbd302828462bfea14b36ad7c28d6023145
parenta87365c4333dfeb87a19cf6f8b3c53e263ee8bf4 (diff)
downloadpackages_apps_Contacts-b207437ffc9fdace64f652c39a08741a3f33823f.tar.gz
packages_apps_Contacts-b207437ffc9fdace64f652c39a08741a3f33823f.tar.bz2
packages_apps_Contacts-b207437ffc9fdace64f652c39a08741a3f33823f.zip
Release 2.34
Fixed issues with Groups management in general when the group names contain special characters such as single quotes (').
-rwxr-xr-xres/values/strings.xml2
-rw-r--r--src/com/android/contacts/EditContactActivity.java2
-rw-r--r--src/com/android/contacts/GroupsListActivity.java3
3 files changed, 4 insertions, 3 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8bada74e8..ecd0ef371 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -839,7 +839,7 @@
<string name="title_about_name">Mod Name</string>
<string name="summary_about_name">Wysie Contacts</string>
<string name="title_about_version">Version</string>
- <string name="summary_about_version">2.33</string>
+ <string name="summary_about_version">2.34</string>
<string name="title_about_credits">Credits</string>
<string name="summary_about_credits">ChainsDD and the rest of XDA! :)</string>
diff --git a/src/com/android/contacts/EditContactActivity.java b/src/com/android/contacts/EditContactActivity.java
index 4c8400e0b..cc96eaef7 100644
--- a/src/com/android/contacts/EditContactActivity.java
+++ b/src/com/android/contacts/EditContactActivity.java
@@ -2773,7 +2773,7 @@ public final class EditContactActivity extends Activity implements View.OnClickL
for (int i = 0; i < selectedGroups.size(); i++) {
Cursor cursor = mResolver.query(Groups.CONTENT_URI,
GROUPS_PROJECTION,
- Contacts.Groups.NAME + "='" + selectedGroups.get(i) + "'", null, null);
+ Contacts.Groups.NAME + "=?", new String[] { selectedGroups.get(i).toString() } , null);
if (cursor != null) {
if ((selectedGroups.get(i)).equals(Groups.GROUP_ANDROID_STARRED)) {
diff --git a/src/com/android/contacts/GroupsListActivity.java b/src/com/android/contacts/GroupsListActivity.java
index 29529d42b..a33262b75 100644
--- a/src/com/android/contacts/GroupsListActivity.java
+++ b/src/com/android/contacts/GroupsListActivity.java
@@ -298,7 +298,8 @@ public class GroupsListActivity extends ListActivity {
public boolean checkGroupExists(String groupName) {
boolean exists = false;
- Cursor c = resolver.query(Groups.CONTENT_URI, GROUPS_PROJECTION, "UPPER(" + Groups.NAME + ")=UPPER('" + groupName + "')", null, null);
+ Cursor c = resolver.query(Groups.CONTENT_URI, GROUPS_PROJECTION, "UPPER(" + Groups.NAME + ")=?",
+ new String[] { groupName.toUpperCase() }, null);
if (c.getCount() > 0)
exists = true;