android代码有哪些意思,android 这段代码啥意思?

public void callResult(MtopResult result) {

Message msg = Message.obtain();

msg.what = 500;

msg.obj = result;

this.mHandler.sendMessage(msg);

}

public boolean handleMessage(Message msg) {

switch (msg.what) {

case 0:

if (this.isUserLogin) {

MtopResult result = new MtopResult();

result.addData(ApiConstants.RET, new JSONArray().put("ERR_SID_INVALID"));

if (this.jsContext instanceof WVCallBackContext) {

((WVCallBackContext) this.jsContext).error(result.toString());

}

if (TaoLog.getLogStatus()) {

TaoLog.d("WVServer", "login fail, call result, " + result.toString());

}

this.isUserLogin = false;

}

notifyNext();

return true;

case 1:

notifyNext();

this.isUserLogin = false;

this.singleExecutor.execute(new ServerRequestTask(this.jsContext, this.mParams));

if (!TaoLog.getLogStatus()) {

return true;

}

TaoLog.d("WVServer", "login success, execute task, mParams:" + this.mParams);

return true;

case 500:

if (msg.obj instanceof MtopResult) {

MtopResult result2 = (MtopResult) msg.obj;

if (result2.isSuccess()) {

if (result2.getJsContext() instanceof WVCallBackContext) {

((WVCallBackContext) result2.getJsContext()).success(result2.toString());

}

} else if (result2.getJsContext() instanceof WVCallBackContext) {

((WVCallBackContext) result2.getJsContext()).error(result2.toString());

}

if (TaoLog.getLogStatus()) {

TaoLog.d("WVServer", "call result, retString: " + result2.toString());

}

}

notifyNext();

return true;

case NOT_REG_LOGIN /*510*/:

MtopResult result3 = new MtopResult();

result3.addData(ApiConstants.RET, new JSONArray().put("HY_FAILED"));

result3.addData("code", "-1");

if (this.jsContext instanceof WVCallBackContext) {

((WVCallBackContext) this.jsContext).error(result3.toString());

}

if (TaoLog.getLogStatus()) {

TaoLog.d("WVServer", "not reg login, call fail, " + result3.toString());

}

notifyNext();

return true;

default:

return false;

}

}

这里的WVCALLBACKCONTEXT 估计是啥意思?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值