summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/contacts/CallLogProvider.java
diff options
context:
space:
mode:
authorStephen Bird <sbird@cyngn.com>2015-11-23 16:34:58 -0800
committerRichard MacGregor <rmacgregor@cyngn.com>2016-04-07 13:34:41 -0700
commit2de130bb67e09098027a97df463380d294ffe7bf (patch)
tree6c0abaedcafadd3a009a7aa5beaeb3c12f67d6ef /src/com/android/providers/contacts/CallLogProvider.java
parentd6942db8a9887c506fb680afa62bdd168a550434 (diff)
downloadpackages_providers_ContactsProvider-2de130bb67e09098027a97df463380d294ffe7bf.zip
packages_providers_ContactsProvider-2de130bb67e09098027a97df463380d294ffe7bf.tar.gz
packages_providers_ContactsProvider-2de130bb67e09098027a97df463380d294ffe7bf.tar.bz2
Fix query if no username exists in path
If no username exists in path, do not attempt to lookup the plugin with the username param. Change-Id: I5161371e0eb825cbf7a8b4610eeff7e5b7cb502f
Diffstat (limited to 'src/com/android/providers/contacts/CallLogProvider.java')
-rw-r--r--src/com/android/providers/contacts/CallLogProvider.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/providers/contacts/CallLogProvider.java b/src/com/android/providers/contacts/CallLogProvider.java
index f5de14f..a82eee8 100644
--- a/src/com/android/providers/contacts/CallLogProvider.java
+++ b/src/com/android/providers/contacts/CallLogProvider.java
@@ -268,7 +268,7 @@ public class CallLogProvider extends ContentProvider {
if (!TextUtils.isEmpty(pluginName)) {
qb.appendWhere(CallLogConstants.PLUGIN_PACKAGE_NAME + " == ");
qb.appendWhereEscapeString(pluginName);
- if (pathSegments.size() >= PACKAGE_USER_NAME_PATH) {
+ if (pathSegments.size() - 1 >= PACKAGE_USER_NAME_PATH) {
String pluginUserName = pathSegments.get(PACKAGE_USER_NAME_PATH);
if (!TextUtils.isEmpty(pluginUserName)) {
qb.appendWhere(" AND " + CallLogConstants.PLUGIN_USER_HANDLE + " == ");