mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +08:00
Merge branch 'master' of git://github.com/phonegap/phonegap-android
This commit is contained in:
commit
b37defd3cf
@ -425,13 +425,28 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
JSONArray addresses, JSONArray phones, JSONArray emails,
|
JSONArray addresses, JSONArray phones, JSONArray emails,
|
||||||
JSONArray ims, JSONArray websites, JSONArray photos) {
|
JSONArray ims, JSONArray websites, JSONArray photos) {
|
||||||
try {
|
try {
|
||||||
contact.put("organizations", organizations);
|
// Only return the array if it has at least one entry
|
||||||
contact.put("addresses", addresses);
|
if (organizations.length() > 0) {
|
||||||
contact.put("phoneNumbers", phones);
|
contact.put("organizations", organizations);
|
||||||
contact.put("emails", emails);
|
}
|
||||||
contact.put("ims", ims);
|
if (addresses.length() > 0) {
|
||||||
contact.put("websites", websites);
|
contact.put("addresses", addresses);
|
||||||
contact.put("photos", photos);
|
}
|
||||||
|
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) {
|
catch (JSONException e) {
|
||||||
Log.e(LOG_TAG,e.getMessage(),e);
|
Log.e(LOG_TAG,e.getMessage(),e);
|
||||||
|
2
framework/src/com/phonegap/DroidGap.java
Executable file → Normal file
2
framework/src/com/phonegap/DroidGap.java
Executable file → Normal file
@ -1123,7 +1123,7 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
try {
|
try {
|
||||||
// Init parameters to new DroidGap activity and propagate existing parameters
|
// Init parameters to new DroidGap activity and propagate existing parameters
|
||||||
HashMap<String, Object> params = new HashMap<String, Object>();
|
HashMap<String, Object> params = new HashMap<String, Object>();
|
||||||
params.put("loadingDialog", "");
|
params.put("loadingDialog", null);
|
||||||
if (this.ctx.loadInWebView) {
|
if (this.ctx.loadInWebView) {
|
||||||
params.put("loadInWebView", true);
|
params.put("loadInWebView", true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user