diff options
author | Stephen Bird <sbird@cyngn.com> | 2015-09-03 16:20:03 -0700 |
---|---|---|
committer | Richard MacGregor <rmacgregor@cyngn.com> | 2016-04-07 13:34:40 -0700 |
commit | 58956e1c48a2099c9dc675e675d58532d8454d1f (patch) | |
tree | 3d6704714b79a3cc56f79b2337ac8c72ac584f08 | |
parent | 3e6a328d51c8022daff8134bcf022c5de7e7aa1e (diff) | |
download | packages_providers_ContactsProvider-58956e1c48a2099c9dc675e675d58532d8454d1f.zip packages_providers_ContactsProvider-58956e1c48a2099c9dc675e675d58532d8454d1f.tar.gz packages_providers_ContactsProvider-58956e1c48a2099c9dc675e675d58532d8454d1f.tar.bz2 |
CallLog: change plugin to package
Change-Id: I4bf56232d8a12e808b38855d7e1b9306b8129d56
-rw-r--r-- | src/com/android/providers/contacts/CallLogProvider.java | 23 | ||||
-rw-r--r-- | src/com/android/providers/contacts/ContactsDatabaseHelper.java | 4 |
2 files changed, 14 insertions, 13 deletions
diff --git a/src/com/android/providers/contacts/CallLogProvider.java b/src/com/android/providers/contacts/CallLogProvider.java index b8dfcfb..f5de14f 100644 --- a/src/com/android/providers/contacts/CallLogProvider.java +++ b/src/com/android/providers/contacts/CallLogProvider.java @@ -88,7 +88,7 @@ public class CallLogProvider extends ContentProvider { Calls.PHONE_ACCOUNT_COMPONENT_NAME, Calls.PHONE_ACCOUNT_ID, ContactsDatabaseHelper.CallColumns.ORIGIN, - CallLogConstants.PLUGIN_NAME, + CallLogConstants.PLUGIN_PACKAGE_NAME, CallLogConstants.PLUGIN_USER_HANDLE }; @@ -104,8 +104,8 @@ public class CallLogProvider extends ContentProvider { /** Path Segments */ private static final int ALL_CALL_LOGS_PATH = 2; - private static final int PLUGIN_NAME_PATH = 2; - private static final int PLUGIN_USER_NAME_PATH = 3; + private static final int PLUGIN_PACKAGE_NAME_PATH = 2; + private static final int PACKAGE_USER_NAME_PATH = 3; private static final String UNHIDE_BY_PHONE_ACCOUNT_QUERY = "UPDATE " + Tables.CALLS + " SET " + Calls.PHONE_ACCOUNT_HIDDEN + "=0 WHERE " + @@ -159,7 +159,8 @@ public class CallLogProvider extends ContentProvider { sCallsProjectionMap.put(Calls.CACHED_FORMATTED_NUMBER, Calls.CACHED_FORMATTED_NUMBER); sCallsProjectionMap.put(ContactsDatabaseHelper.CallColumns.ORIGIN, ContactsDatabaseHelper.CallColumns.ORIGIN); - sCallsProjectionMap.put(CallLogConstants.PLUGIN_NAME, CallLogConstants.PLUGIN_NAME); + sCallsProjectionMap.put(CallLogConstants.PLUGIN_PACKAGE_NAME, + CallLogConstants.PLUGIN_PACKAGE_NAME); sCallsProjectionMap.put(CallLogConstants.PLUGIN_USER_HANDLE, CallLogConstants.PLUGIN_USER_HANDLE); } @@ -237,7 +238,7 @@ public class CallLogProvider extends ContentProvider { switch (match) { case CALLS: { if (pathSegments.size() < ALL_CALL_LOGS_PATH) { - qb.appendWhere(CallLogConstants.PLUGIN_NAME + " IS NULL "); + qb.appendWhere(CallLogConstants.PLUGIN_PACKAGE_NAME + " IS NULL "); } break; } @@ -262,20 +263,20 @@ public class CallLogProvider extends ContentProvider { } case CALLS_PLUGIN: { - String pluginName = pathSegments.size() >= PLUGIN_NAME_PATH ? - pathSegments.get(PLUGIN_NAME_PATH) : null; + String pluginName = pathSegments.size() >= PLUGIN_PACKAGE_NAME_PATH ? + pathSegments.get(PLUGIN_PACKAGE_NAME_PATH) : null; if (!TextUtils.isEmpty(pluginName)) { - qb.appendWhere(CallLogConstants.PLUGIN_NAME + " == "); + qb.appendWhere(CallLogConstants.PLUGIN_PACKAGE_NAME + " == "); qb.appendWhereEscapeString(pluginName); - if (pathSegments.size() >= PLUGIN_USER_NAME_PATH) { - String pluginUserName = pathSegments.get(PLUGIN_USER_NAME_PATH); + if (pathSegments.size() >= PACKAGE_USER_NAME_PATH) { + String pluginUserName = pathSegments.get(PACKAGE_USER_NAME_PATH); if (!TextUtils.isEmpty(pluginUserName)) { qb.appendWhere(" AND " + CallLogConstants.PLUGIN_USER_HANDLE + " == "); qb.appendWhereEscapeString(pluginUserName); } } } else { - qb.appendWhere(CallLogConstants.PLUGIN_NAME + " IS NOT NULL"); + qb.appendWhere(CallLogConstants.PLUGIN_PACKAGE_NAME + " IS NOT NULL"); } break; } diff --git a/src/com/android/providers/contacts/ContactsDatabaseHelper.java b/src/com/android/providers/contacts/ContactsDatabaseHelper.java index 24ad862..a60d6cf 100644 --- a/src/com/android/providers/contacts/ContactsDatabaseHelper.java +++ b/src/com/android/providers/contacts/ContactsDatabaseHelper.java @@ -1535,7 +1535,7 @@ public class ContactsDatabaseHelper extends SQLiteOpenHelper { Calls.CACHED_PHOTO_URI + " TEXT," + Calls.CACHED_FORMATTED_NUMBER + " TEXT," + CallColumns.ORIGIN + " TEXT," + - CallLogConstants.PLUGIN_NAME + " TEXT DEFAULT NULL," + + CallLogConstants.PLUGIN_PACKAGE_NAME + " TEXT DEFAULT NULL," + CallLogConstants.PLUGIN_USER_HANDLE + " TEXT DEFAULT NULL," + Voicemails._DATA + " TEXT," + Voicemails.HAS_CONTENT + " INTEGER," + @@ -4492,7 +4492,7 @@ public class ContactsDatabaseHelper extends SQLiteOpenHelper { // Add Plugin name and User handle for incall api plugins. private void upgradeToVersion1013(SQLiteDatabase db) { - db.execSQL("ALTER TABLE " + Tables.CALLS + " ADD " + CallLogConstants.PLUGIN_NAME + db.execSQL("ALTER TABLE " + Tables.CALLS + " ADD " + CallLogConstants.PLUGIN_PACKAGE_NAME + " TEXT DEFAULT NULL;"); db.execSQL("ALTER TABLE " + Tables.CALLS + " ADD " + CallLogConstants.PLUGIN_USER_HANDLE |