mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
Issue 123: Fixing problem where name object is not specified
This commit is contained in:
parent
042c34192b
commit
8ef93ff0e5
@ -178,11 +178,13 @@ public abstract class ContactAccessor {
|
|||||||
protected String getJsonString(JSONObject obj, String property) {
|
protected String getJsonString(JSONObject obj, String property) {
|
||||||
String value = null;
|
String value = null;
|
||||||
try {
|
try {
|
||||||
|
if (obj != null) {
|
||||||
value = obj.getString(property);
|
value = obj.getString(property);
|
||||||
if (value.equals("null")) {
|
if (value.equals("null")) {
|
||||||
Log.d(LOG_TAG, property + " is string called 'null'");
|
Log.d(LOG_TAG, property + " is string called 'null'");
|
||||||
value = null;
|
value = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (JSONException e) {
|
catch (JSONException e) {
|
||||||
Log.d(LOG_TAG, "Could not get = " + e.getMessage());
|
Log.d(LOG_TAG, "Could not get = " + e.getMessage());
|
||||||
|
@ -1420,7 +1420,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add urls
|
// Add urls
|
||||||
JSONArray websites = null;
|
JSONArray websites = null;
|
||||||
try {
|
try {
|
||||||
@ -1473,7 +1472,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
Log.e(LOG_TAG, e.getMessage(), e);
|
Log.e(LOG_TAG, e.getMessage(), e);
|
||||||
retVal = false;
|
retVal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user