summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/contacts/ContactsDatabaseHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/providers/contacts/ContactsDatabaseHelper.java')
-rw-r--r--src/com/android/providers/contacts/ContactsDatabaseHelper.java25
1 files changed, 22 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) {