boolean rsa2 = (RSA2_PRIVATE.length() > 0);
Map authInfoMap = OrderInfoUtil2_0.buildAuthInfoMap(PID, APPID, TARGET_ID, rsa2);
String info = OrderInfoUtil2_0.buildOrderParam(authInfoMap);
String privateKey = rsa2 ? RSA2_PRIVATE : RSA_PRIVATE;
// String sign = OrderInfoUtil2_0.getSign(authInfoMap, privateKey, rsa2);
final String authInfo = info + "&" + privateKey;
Runnable authRunnable = new Runnable() {
@Override
public void run() {
// 构造AuthTask 对象
AuthTask authTask = new AuthTask(PayDemo.this);
// 调用授权接口,获取授权结果
Map result = authTask.authV2(authInfo, true);
Message msg = new Message();
msg.what = SDK_AUTH_FLAG;
msg.obj = result;
mHandler.sendMessage(msg);
}
};
// 必须异步调用
Thread authThread = new Thread(authRunnable);
authThread.start();
这段代码执行完,app就直接闪退了,这是什么原因造成的?