|
@@ -52,7 +52,7 @@ public class JsInterfaceAccomPanyUtils extends Object {
|
|
|
try {
|
|
|
JSONObject jsonObject = new JSONObject(message);
|
|
|
String api = jsonObject.getString("api");
|
|
|
- LOG.i("acc api:"+api);
|
|
|
+ LOG.i("acc api:" + api);
|
|
|
if ("back".equals(api)) {
|
|
|
activity.finish();
|
|
|
} else if ("login".equals(api)) {
|
|
@@ -70,7 +70,7 @@ public class JsInterfaceAccomPanyUtils extends Object {
|
|
|
if (null != contentBean) {
|
|
|
String userId = contentBean.optString("userId");
|
|
|
String name = contentBean.optString("name");
|
|
|
- ChatHelper.getInstance().goChat(userId,name);
|
|
|
+ ChatHelper.getInstance().goChat(userId, name);
|
|
|
}
|
|
|
} else if ("videoUpdate".equals(api)) {
|
|
|
if (onListener != null) {
|
|
@@ -139,7 +139,7 @@ public class JsInterfaceAccomPanyUtils extends Object {
|
|
|
statusBarTextColor = content.getBoolean("statusBarTextColor");
|
|
|
isOpenLight = content.getBoolean("isOpenLight");
|
|
|
orientation = content.getInt("orientation");
|
|
|
- c_orientation = content.optInt("c_orientation",ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
|
|
+ c_orientation = content.optInt("c_orientation", ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
|
|
} catch (Exception e) {
|
|
|
}
|
|
|
|
|
@@ -326,7 +326,7 @@ public class JsInterfaceAccomPanyUtils extends Object {
|
|
|
if (TextUtils.equals("cloudAccompanyMessage", api)) {
|
|
|
JSONObject content = jsonObject.getJSONObject("content");
|
|
|
if (onListener != null) {
|
|
|
- String accompanyUrl = content.optString("accompanyUrl");
|
|
|
+ String accompanyUrl = content.isNull("accompanyUrl") ? null : content.optString("accompanyUrl");
|
|
|
onListener.saveAccompanimentMp3(accompanyUrl);
|
|
|
}
|
|
|
return;
|