Merge branch 'master' of git://github.com/phonegap/phonegap-android

This commit is contained in:
macdonst 2011-07-21 15:18:10 -04:00
commit b37defd3cf
2 changed files with 23 additions and 8 deletions

View File

@ -425,13 +425,28 @@ public class ContactAccessorSdk5 extends ContactAccessor {
JSONArray addresses, JSONArray phones, JSONArray emails,
JSONArray ims, JSONArray websites, JSONArray photos) {
try {
contact.put("organizations", organizations);
contact.put("addresses", addresses);
contact.put("phoneNumbers", phones);
contact.put("emails", emails);
contact.put("ims", ims);
contact.put("websites", websites);
contact.put("photos", photos);
// Only return the array if it has at least one entry
if (organizations.length() > 0) {
contact.put("organizations", organizations);
}
if (addresses.length() > 0) {
contact.put("addresses", addresses);
}
if (phones.length() > 0) {
contact.put("phoneNumbers", phones);
}
if (emails.length() > 0) {
contact.put("emails", emails);
}
if (ims.length() > 0) {
contact.put("ims", ims);
}
if (websites.length() > 0) {
contact.put("websites", websites);
}
if (photos.length() > 0) {
contact.put("photos", photos);
}
}
catch (JSONException e) {
Log.e(LOG_TAG,e.getMessage(),e);

2
framework/src/com/phonegap/DroidGap.java Executable file → Normal file
View File

@ -1123,7 +1123,7 @@ public class DroidGap extends PhonegapActivity {
try {
// Init parameters to new DroidGap activity and propagate existing parameters
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("loadingDialog", "");
params.put("loadingDialog", null);
if (this.ctx.loadInWebView) {
params.put("loadInWebView", true);
}