You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/06/13 23:59:06 UTC
git commit: updated contacts.cs for wp7
Updated Branches:
refs/heads/master 8efe71c06 -> 6d4090b88
updated contacts.cs for wp7
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/6d4090b8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/6d4090b8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/6d4090b8
Branch: refs/heads/master
Commit: 6d4090b882e8c41308021660098f3bab0c58f7a1
Parents: 8efe71c
Author: Benn Mapes <be...@gmail.com>
Authored: Thu Jun 13 14:57:47 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Thu Jun 13 14:57:47 2013 -0700
----------------------------------------------------------------------
src/wp7/Contacts.cs | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/6d4090b8/src/wp7/Contacts.cs
----------------------------------------------------------------------
diff --git a/src/wp7/Contacts.cs b/src/wp7/Contacts.cs
index 6789bb8..e00f2d1 100644
--- a/src/wp7/Contacts.cs
+++ b/src/wp7/Contacts.cs
@@ -1,15 +1,15 @@
/*
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
*/
using Microsoft.Phone.Tasks;
@@ -396,12 +396,17 @@ namespace WPCordovaClassLib.Cordova.Commands
return;
}
+ //Deal with case where caller has specified no options
if (searchParams.options == null)
{
searchParams.options = new SearchOptions();
searchParams.options.filter = "";
searchParams.options.multiple = true;
}
+ else if (searchParams.options.filter == null) // Deal with the case where caller has specified partial options
+ {
+ searchParams.options.filter = "";
+ }
DeviceContacts deviceContacts = new DeviceContacts();
deviceContacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(contacts_SearchCompleted);
@@ -623,7 +628,7 @@ namespace WPCordovaClassLib.Cordova.Commands
}
else
{
- retVal = string.Format(formatStr,"","","","","","");
+ retVal = string.Format(formatStr, "", "", "", "", "", "");
}
return "{" + retVal + "}";