解决一些合并代码报错的问题

This commit is contained in:
huangjian
2021-03-01 15:17:51 +08:00
parent 6c1ea65436
commit f967925ff9
3 changed files with 33 additions and 28 deletions

View File

@@ -146,7 +146,7 @@ public class HomePartyFragment extends AbsRoomFragment implements View.OnClickLi
}
private void setRoomId(long id, int onlineNumber) {
String htmlText = "66号:" + id;
String htmlText = "音游号:" + id;
roomId.setText(htmlText);
}

View File

@@ -14,6 +14,9 @@ import android.webkit.WebView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.security.realidentity.RPEventListener;
import com.alibaba.security.realidentity.RPResult;
import com.alibaba.security.realidentity.RPVerify;
import com.alibaba.security.rp.RPSDK;
import com.netease.nim.uikit.common.util.log.LogUtil;
import com.orhanobut.logger.Logger;
@@ -434,33 +437,35 @@ public class JSInterface {
@JavascriptInterface
public void openFaceLiveness(String verifyToken) {
Log.d(TAG, "openFaceLiveness() called with: verifyToken = [" + verifyToken + "]");
RPSDK.start(verifyToken, mActivity,
(audit, s) -> {
Log.d(TAG, String.format(Locale.getDefault(), "openFaceLiveness: auit: %s, s: %s",
audit, s));
int result = -3;
if (audit == RPSDK.AUDIT.AUDIT_PASS) {
// 认证通过
result = 2;
// 更新本地缓存
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
if (userInfo != null) {
userInfo.setCertified(true);
}
// 认证通过的时候刷新用户信息
UserModel.get().updateCurrentUserInfo().subscribe();
} else if (audit == RPSDK.AUDIT.AUDIT_FAIL) {
// 认证不通过
result = 1;
} else if (audit == RPSDK.AUDIT.AUDIT_NOT) {
// 未认证,用户取消
result = -1;
} else if (audit == RPSDK.AUDIT.AUDIT_EXCEPTION) {
// 系统异常
result = -2;
RPVerify.start(mActivity, verifyToken, new RPEventListener() {
@Override
public void onFinish(RPResult rpResult, String s, String s1) {
Log.d(TAG, String.format(Locale.getDefault(), "openFaceLiveness: auit: %s, s: %s",
rpResult, s));
int result = -3;
if (rpResult == RPResult.AUDIT_PASS) {
// 认证通过
result = 2;
// 更新本地缓存
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
if (userInfo != null) {
userInfo.setCertified(true);
}
EventBus.getDefault().post(new CertificationResultEvent().setStatus(result));
});
// 认证通过的时候刷新用户信息
UserModel.get().updateCurrentUserInfo().subscribe();
} else if (rpResult == RPResult.AUDIT_FAIL) {
// 认证不通过
result = 1;
} else if (rpResult == RPResult.AUDIT_NOT) {
// 未认证,用户取消
result = -1;
} else if (rpResult == RPResult.AUDIT_EXCEPTION) {
// 系统异常
result = -2;
}
EventBus.getDefault().post(new CertificationResultEvent().setStatus(result));
}
});
}
/**

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/alpha40white" />
<solid android:color="@color/white_op_40" />
<corners android:radius="20dp" />
</shape>