summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/providers/contacts/ContactsDatabaseHelper.java25
-rw-r--r--src/com/android/providers/contacts/ContactsProvider2.java2
2 files changed, 24 insertions, 3 deletions
diff --git a/src/com/android/providers/contacts/ContactsDatabaseHelper.java b/src/com/android/providers/contacts/ContactsDatabaseHelper.java
index 0ce588b..137fce6 100644
--- a/src/com/android/providers/contacts/ContactsDatabaseHelper.java
+++ b/src/com/android/providers/contacts/ContactsDatabaseHelper.java
@@ -100,7 +100,7 @@ import java.util.Locale;
* 600-699 Ice Cream Sandwich
* </pre>
*/
- static final int DATABASE_VERSION = 606;
+ static final int DATABASE_VERSION = 607;
private static final String DATABASE_NAME = "contacts2.db";
private static final String DATABASE_PRESENCE = "presence_db";
@@ -370,8 +370,12 @@ import java.util.Locale;
public static final String CONCRETE_ID = Tables.GROUPS + "." + BaseColumns._ID;
public static final String CONCRETE_SOURCE_ID = Tables.GROUPS + "." + Groups.SOURCE_ID;
- public static final String CONCRETE_ACCOUNT_NAME = Tables.GROUPS + "." + Groups.ACCOUNT_NAME;
- public static final String CONCRETE_ACCOUNT_TYPE = Tables.GROUPS + "." + Groups.ACCOUNT_TYPE;
+ public static final String CONCRETE_ACCOUNT_NAME =
+ Tables.GROUPS + "." + Groups.ACCOUNT_NAME;
+ public static final String CONCRETE_ACCOUNT_TYPE =
+ Tables.GROUPS + "." + Groups.ACCOUNT_TYPE;
+ public static final String CONCRETE_ACTION = Tables.GROUPS + "." + Groups.ACTION;
+ public static final String CONCRETE_ACTION_URI = Tables.GROUPS + "." + Groups.ACTION_URI;
}
public interface ActivitiesColumns {
@@ -1015,6 +1019,8 @@ import java.util.Locale;
Groups.TITLE + " TEXT," +
Groups.TITLE_RES + " INTEGER," +
Groups.NOTES + " TEXT," +
+ Groups.ACTION + " TEXT," +
+ Groups.ACTION_URI + " TEXT," +
Groups.SYSTEM_ID + " TEXT," +
Groups.DELETED + " INTEGER NOT NULL DEFAULT 0," +
Groups.GROUP_VISIBLE + " INTEGER NOT NULL DEFAULT 0," +
@@ -1638,6 +1644,8 @@ import java.util.Locale;
+ Groups.TITLE + ","
+ Groups.TITLE_RES + ","
+ Groups.NOTES + ","
+ + Groups.ACTION + ", "
+ + Groups.ACTION_URI + ", "
+ Groups.SYSTEM_ID + ","
+ Groups.DELETED + ","
+ Groups.GROUP_VISIBLE + ","
@@ -1988,6 +1996,12 @@ import java.util.Locale;
oldVersion = 606;
}
+ if (oldVersion < 607) {
+ upgradeViewsAndTriggers = true;
+ upgradeToVersion607(db);
+ oldVersion = 607;
+ }
+
if (upgradeViewsAndTriggers) {
createContactsViews(db);
createGroupsView(db);
@@ -3111,6 +3125,11 @@ import java.util.Locale;
// provide ALTER TABLE DROP COLUMN. As they have DEFAULT 0, we can keep but ignore them
}
+ private void upgradeToVersion607(SQLiteDatabase db) {
+ db.execSQL("ALTER TABLE groups ADD COLUMN action TEXT");
+ db.execSQL("ALTER TABLE groups ADD COLUMN action_uri TEXT");
+ }
+
public String extractHandleFromEmailAddress(String email) {
Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(email);
if (tokens.length == 0) {
diff --git a/src/com/android/providers/contacts/ContactsProvider2.java b/src/com/android/providers/contacts/ContactsProvider2.java
index 3fe5f79..7bd8726 100644
--- a/src/com/android/providers/contacts/ContactsProvider2.java
+++ b/src/com/android/providers/contacts/ContactsProvider2.java
@@ -756,6 +756,8 @@ public class ContactsProvider2 extends SQLiteContentProvider implements OnAccoun
.add(Groups.SYSTEM_ID)
.add(Groups.DELETED)
.add(Groups.NOTES)
+ .add(Groups.ACTION)
+ .add(Groups.ACTION_URI)
.add(Groups.SHOULD_SYNC)
.add(Groups.FAVORITES)
.add(Groups.AUTO_ADD)