mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Setting ContactFindOptions to correct defaults
This commit is contained in:
parent
f15bdf9445
commit
bc086cb93d
@ -111,8 +111,8 @@ Contacts.prototype.create = function(properties) {
|
|||||||
|
|
||||||
var ContactFindOptions = function(filter, multiple, limit, updatedSince) {
|
var ContactFindOptions = function(filter, multiple, limit, updatedSince) {
|
||||||
this.filter = filter || '';
|
this.filter = filter || '';
|
||||||
this.multiple = multiple || true;
|
this.multiple = multiple || false;
|
||||||
this.limit = limit || Number.MAX_VALUE;
|
this.limit = limit || 1;
|
||||||
this.updatedSince = updatedSince || '';
|
this.updatedSince = updatedSince || '';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,8 +82,8 @@ public class ContactAccessorSdk3_4 extends ContactAccessor {
|
|||||||
@Override
|
@Override
|
||||||
public JSONArray search(JSONArray filter, JSONObject options) {
|
public JSONArray search(JSONArray filter, JSONObject options) {
|
||||||
String searchTerm = "";
|
String searchTerm = "";
|
||||||
int limit = Integer.MAX_VALUE;
|
int limit = 1;
|
||||||
boolean multiple = true;
|
boolean multiple = false;
|
||||||
try {
|
try {
|
||||||
searchTerm = options.getString("filter");
|
searchTerm = options.getString("filter");
|
||||||
if (searchTerm.length()==0) {
|
if (searchTerm.length()==0) {
|
||||||
|
@ -114,8 +114,8 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
|
|
||||||
// Get the find options
|
// Get the find options
|
||||||
String searchTerm = "";
|
String searchTerm = "";
|
||||||
int limit = Integer.MAX_VALUE;
|
int limit = 1;
|
||||||
boolean multiple = true;
|
boolean multiple = false;
|
||||||
try {
|
try {
|
||||||
searchTerm = options.getString("filter");
|
searchTerm = options.getString("filter");
|
||||||
if (searchTerm.length()==0) {
|
if (searchTerm.length()==0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user