号簿助手 v4.6.31版本的 MD5 值为:9d7ff98a6bb5cc178eac2df4d1b2f0e0
以下内容为反编译后的 SafeSettingsActivity.java 源代码,内容仅作参考
package com.chinatelecom.pim.activity.setting;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.View;
import android.widget.Toast;
import com.chinatelecom.pim.R;
import com.chinatelecom.pim.core.CoreManagerFactory;
import com.chinatelecom.pim.core.IConstant;
import com.chinatelecom.pim.core.api.CommandAdapter;
import com.chinatelecom.pim.core.api.GetConfigCommand;
import com.chinatelecom.pim.core.api.QueryClientVersionCommandsMy;
import com.chinatelecom.pim.core.manager.GetconfigUrlManager;
import com.chinatelecom.pim.core.manager.PreferenceKeyManager;
import com.chinatelecom.pim.core.manager.SyncAndroidDeviceManager;
import com.chinatelecom.pim.core.manager.SyncDataManager;
import com.chinatelecom.pim.core.model.PlatformConfig;
import com.chinatelecom.pim.core.threadpool.BackgroundJob;
import com.chinatelecom.pim.core.threadpool.model.Runner;
import com.chinatelecom.pim.core.view.ActivityView;
import com.chinatelecom.pim.foundation.common.model.sync.SyncResponse;
import com.chinatelecom.pim.foundation.lang.model.Notify;
import com.chinatelecom.pim.foundation.lang.model.Packet;
import com.chinatelecom.pim.foundation.lang.model.Theme;
import com.chinatelecom.pim.foundation.lang.net.HttpTemplateFactory;
import com.chinatelecom.pim.foundation.lang.net.impl.DefaultHttpTemplateFactory;
import com.chinatelecom.pim.foundation.lang.utils.CryptogramForCTPass;
import com.chinatelecom.pim.foundation.lang.utils.DeviceUtils;
import com.chinatelecom.pim.foundation.lang.utils.StringUtils;
import com.chinatelecom.pim.foundation.lang.utils.ToastTool;
import com.chinatelecom.pim.ui.adapter.setting.SafeSettingsViewAdapter;
import com.chinatelecom.pim.ui.view.dialog.DialogFactory;
import com.ffcs.inapppaylib.PayHelper;
import com.ffcs.inapppaylib.bean.Constants;
import com.ffcs.inapppaylib.bean.response.BaseResponse;
import com.ffcs.inapppaylib.bean.response.PayResponse;
import com.google.gson.Gson;
import ctuab.proto.message.GetConfigProto;
import ctuab.proto.message.GetCtpassStatusProto;
import ctuab.proto.message.GetMemberInfoProto;
import ctuab.proto.message.OrderMemberProto;
public class SafeSettingsActivity extends ActivityView<SafeSettingsViewAdapter> {
private static final String key = "F610F54321AB9235902A65755513A352";
private String PUserid;
private SafeSettingsViewAdapter adapter;
private String orderNo;
private PreferenceKeyManager preferenceKeyManager = CoreManagerFactory.getInstance().getPreferenceKeyManager();
private SyncAndroidDeviceManager syncAndroidDeviceManager = CoreManagerFactory.getInstance().getSyncAndroidDeviceManager();
String phoneNum = this.preferenceKeyManager.getAccountSettings().syncAccount().get().tag5.toString();
private HttpTemplateFactory httpTemplateFactory = new DefaultHttpTemplateFactory();
String payID = IConstant.Params.PAY_ID;
private SyncDataManager syncDataManager = CoreManagerFactory.getInstance().getSyncDataManager();
private Boolean openSuccess = false;
private final String APP_ID = "appid";
private final String SEQID = "seqid";
private final String RANDOM = "random";
private final String USERID = "userid";
private final String SIGNATURE = "signature";
private String price = IConstant.SplashUrl.appInnerBrowser;
private boolean isorder = true;
private boolean CtPassisOpen = false;
Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case Constants.RESULT_PAY_SUCCESS:
BaseResponse resp = (BaseResponse) msg.obj;
if (resp instanceof PayResponse) {
PayResponse payResponse = (PayResponse) resp;
SafeSettingsActivity.this.orderNo = payResponse.getOrder_no();
if (SafeSettingsActivity.this.orderNo != null && SafeSettingsActivity.this.orderNo.length() != 0) {
SafeSettingsActivity.this.getOrderInfos();
return;
}
ToastTool.getToast(SafeSettingsActivity.this).showMessage("购买成功后的订单信息为空");
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_close);
SafeSettingsActivity.this.preferenceKeyManager.getSafeSetting().uimVerify().set(false);
return;
}
return;
case Constants.RESULT_PAY_FAILURE:
BaseResponse resp2 = (BaseResponse) msg.obj;
SafeSettingsActivity.this.openSuccess = false;
SafeSettingsActivity.this.preferenceKeyManager.getSafeSetting().uimVerify().set(false);
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_close);
Toast.makeText(SafeSettingsActivity.this, resp2.getRes_code() + ":" + resp2.getRes_message(), 1).show();
return;
case Constants.RESULT_VALIDATE_FAILURE:
SafeSettingsActivity.this.openSuccess = false;
SafeSettingsActivity.this.preferenceKeyManager.getSafeSetting().uimVerify().set(false);
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_close);
Toast.makeText(SafeSettingsActivity.this, ((BaseResponse) msg.obj).getRes_message(), 0).show();
return;
default:
return;
}
}
};
@Override
public SafeSettingsViewAdapter initializeAdapter() {
return new SafeSettingsViewAdapter(this, null);
}
@Override
public void doCreate(Bundle bundle, SafeSettingsViewAdapter adapter) {
adapter.setup();
this.adapter = adapter;
adapter.setTheme(new Theme());
setupListener(adapter.getModel());
}
@Override
public void doResume(SafeSettingsViewAdapter adapter) {
super.doResume((SafeSettingsActivity) adapter);
adapter.getModel().getHeaderView().getLayout().getBackground().setAlpha(255);
if (DeviceUtils.networkIsConnected(this)) {
Runner runner = new Runner(new BackgroundJob() {
private boolean isVip;
@Override
public void prepare(Runner.Info info) {
}
@Override
public Object run(Runner.Info info) {
this.isVip = SafeSettingsActivity.this.getVipMemberFirst();
return null;
}
@Override
public void onComplete(Runner.Info info, Object result) {
if (SafeSettingsActivity.this.needLogin()) {
SafeSettingsActivity.this.createLoginAccountDialog();
}
}
});
runner.execute();
return;
}
Boolean isOpen = this.preferenceKeyManager.getSafeSetting().uimVerify().get();
if (!isOpen.booleanValue()) {
adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_close);
} else {
adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_open);
}
if (needLogin()) {
createLoginAccountDialog();
}
}
private void setupListener(final SafeSettingsViewAdapter.SafeSetModel model) {
model.getHeaderView().getLeftView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SafeSettingsActivity.this.finish();
}
});
model.getSafeSetting().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (DeviceUtils.networkIsConnected(SafeSettingsActivity.this)) {
boolean flag = SafeSettingsActivity.this.preferenceKeyManager.getSafeSetting().uimVerify().get().booleanValue();
if (!flag) {
SafeSettingsActivity.this.getMyCTPassStatus();
return;
}
model.getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_close);
SafeSettingsActivity.this.preferenceKeyManager.getSafeSetting().uimVerify().set(false);
SafeSettingsActivity.this.upLoadingStatus(false);
return;
}
ToastTool.getToast(SafeSettingsActivity.this).showMessage("请检查网络");
}
});
}
public void getMyCTPassStatus() {
Runner runner = new Runner(new BackgroundJob() {
SyncResponse<GetCtpassStatusProto.GetCtpassStatusResponse> infoes;
@Override
public void prepare(Runner.Info info) {
}
@Override
public Object run(Runner.Info info) {
this.infoes = SafeSettingsActivity.this.syncAndroidDeviceManager.getCtpassStatus(SafeSettingsActivity.this.phoneNum);
return null;
}
@Override
public void onComplete(Runner.Info info, Object result) {
int resultCode = this.infoes.getBody().getResultCode();
this.infoes.getBody().getResultDesc();
if (resultCode != 0) {
SafeSettingsActivity.this.CtPassisOpen = false;
ToastTool.getToast(SafeSettingsActivity.this).showMessage("服务器请求失败,请重新操作");
return;
}
String resultDesc = this.infoes.getBody().getResultDesc();
String rspParam = SafeSettingsActivity.this.decrypt(resultDesc);
Gson gson = new Gson();
MyResult res = (MyResult) gson.fromJson(rspParam, MyResult.class);
MyResult.QueryCTPassStatusResponseBean StatusResponse = res.getQueryCTPassStatusResponse();
String ctPassStatus = StatusResponse.getStatusInfo().getCTPassStatus();
String sm2Status = StatusResponse.getStatusInfo().getSM2Status();
if (!StringUtils.isNotEmpty(ctPassStatus) && !StringUtils.isNotEmpty(sm2Status)) {
SafeSettingsActivity.this.CtPassisOpen = false;
} else if (ctPassStatus.equals("00") || sm2Status.equals("00")) {
SafeSettingsActivity.this.CtPassisOpen = true;
} else {
SafeSettingsActivity.this.CtPassisOpen = false;
}
if (SafeSettingsActivity.this.CtPassisOpen) {
SafeSettingsActivity.this.isOrderVip();
return;
}
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_close);
SafeSettingsActivity.this.preferenceKeyManager.getSafeSetting().uimVerify().set(false);
ToastTool.getToast(SafeSettingsActivity.this).showMessage("您的终端或卡暂不支持此服务");
}
});
runner.execute();
}
public void isOrderVip() {
Runner runner = new Runner(new BackgroundJob() {
@Override
public void prepare(Runner.Info info) {
}
@Override
public Object run(Runner.Info info) {
SafeSettingsActivity.this.isorder = SafeSettingsActivity.this.getVipMember();
return null;
}
@Override
public void onComplete(Runner.Info info, Object result) {
if (SafeSettingsActivity.this.isorder) {
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_open);
SafeSettingsActivity.this.preferenceKeyManager.getSafeSetting().uimVerify().set(true);
SafeSettingsActivity.this.upLoadingStatus(true);
} else {
Dialog LoginDialog = DialogFactory.createMessageDialog(SafeSettingsActivity.this, 0, "", SafeSettingsActivity.this.getString(R.string.safe_setting_msg), "立即开通", "取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
Boolean isDianxin = DeviceUtils.getIsDianxin(SafeSettingsActivity.this.phoneNum);
if (isDianxin.booleanValue()) {
SafeSettingsActivity.this.pays(SafeSettingsActivity.this.phoneNum, SafeSettingsActivity.this.payID);
} else {
ToastTool.getToast(SafeSettingsActivity.this.getApplicationContext()).showMessage("本服务暂时仅支持中国电信用户");
}
}
}, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_close);
SafeSettingsActivity.this.preferenceKeyManager.getSafeSetting().uimVerify().set(false);
}
});
LoginDialog.show();
}
}
});
runner.execute();
}
public void pays(String phoneNum, String payID) {
if (TextUtils.isEmpty(phoneNum)) {
Toast.makeText(this, "手机号码不能为空!", 1).show();
return;
}
PayHelper payHelper = PayHelper.getInstance(this);
payHelper.init(IConstant.Open189Settings.APPID, IConstant.Open189Settings.APPSecret);
payHelper.settimeout(120000);
payHelper.pay(this, payID, phoneNum, this.handler, "ffcs");
}
public boolean needLogin() {
return this.preferenceKeyManager.getAccountSettings().syncAccount().get() == null || StringUtils.isBlank(this.preferenceKeyManager.getAccountSettings().syncAccount().get().key);
}
public SyncResponse<OrderMemberProto.MemberOrderResponse> getinfos() {
final SyncResponse<OrderMemberProto.MemberOrderResponse> syncResponse = new SyncResponse<>();
this.PUserid = this.preferenceKeyManager.getAccountSettings().syncAccount().get().tag4.toString();
String id = this.preferenceKeyManager.getAccountSettings().syncAccount().get().tag3.toString();
if (!StringUtils.isNotBlank(id)) {
id = "0";
}
final int userId = Integer.parseInt(id);
PlatformConfig platformConfig = getGetConfig();
Packet packet = new Packet(Packet.MethodType.POST, platformConfig.getEnvironment().getGetSubscribeUrl());
QueryClientVersionCommandsMy command = new QueryClientVersionCommandsMy(this.httpTemplateFactory.getHttpTemplate(), packet);
command.setAdapter(new CommandAdapter<OrderMemberProto.MemberOrderRequest, OrderMemberProto.MemberOrderResponse>() {
@Override
public OrderMemberProto.MemberOrderRequest prepare() {
OrderMemberProto.PayOrder.Builder payOrder = OrderMemberProto.PayOrder.newBuilder();
payOrder.setOrderNo(SafeSettingsActivity.this.orderNo).setPayCode(SafeSettingsActivity.this.payID).setPrice(SafeSettingsActivity.this.price).setPhone(SafeSettingsActivity.this.phoneNum).build();
OrderMemberProto.MemberOrderRequest.Builder builder = OrderMemberProto.MemberOrderRequest.newBuilder();
builder.setPayOrder(payOrder).setPuserid(SafeSettingsActivity.this.PUserid).setType(GetMemberInfoProto.MemberType.BUY).setUserid(userId);
return builder.build();
}
@Override
public void onComplete(OrderMemberProto.MemberOrderResponse memberOrderResponse) {
syncResponse.setBody(memberOrderResponse);
}
@Override
public void onComplete(byte[] bytes) {
}
});
command.execute(null);
return syncResponse;
}
public void getOrderInfos() {
Runner runner = new Runner(new BackgroundJob() {
SyncResponse<OrderMemberProto.MemberOrderResponse> infos;
@Override
public void prepare(Runner.Info info) {
}
@Override
public Object run(Runner.Info info) {
this.infos = SafeSettingsActivity.this.getinfos();
return null;
}
@Override
public void onComplete(Runner.Info info, Object result) {
int resCode = this.infos.getBody().getResCode();
if (resCode == 0) {
SafeSettingsActivity.this.openSuccess = true;
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_open);
SafeSettingsActivity.this.preferenceKeyManager.getSafeSetting().uimVerify().set(true);
SafeSettingsActivity.this.preferenceKeyManager.getContactBackupSetting().openUnlimitedRecoveryMemberShip().set(false);
ToastTool.getToast(SafeSettingsActivity.this).showMessage("已成功开启号簿助手VIP会员专属服务");
SafeSettingsActivity.this.upLoadingStatus(true);
return;
}
SafeSettingsActivity.this.openSuccess = false;
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_close);
SafeSettingsActivity.this.preferenceKeyManager.getSafeSetting().uimVerify().set(false);
ToastTool.getToast(SafeSettingsActivity.this).showMessage("服务器返回失败");
}
});
runner.execute();
}
public void upLoadingStatus(final Boolean aa) {
Runner runner = new Runner(new BackgroundJob() {
@Override
public void prepare(Runner.Info info) {
}
@Override
public Object run(Runner.Info info) {
SafeSettingsActivity.this.syncAndroidDeviceManager.setCtpassNetStatus(aa.booleanValue());
return null;
}
@Override
public void onComplete(Runner.Info info, Object result) {
}
});
runner.execute();
}
protected void createLoginAccountDialog() {
Dialog LoginDialog = DialogFactory.createMessageDialog(this, 0, "登录天翼帐号", getResources().getString(R.string.login_account_dialog_message), "立即登录", "取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
SafeSettingsActivity.this.preferenceKeyManager.getAccountSettings().syncAccount().set(null);
CoreManagerFactory.getInstance().getPimNotifyManager().changed(Notify.Event.ACCOUNT_CHANGED, null);
SafeSettingsActivity.this.startActivity(new Intent(SafeSettingsActivity.this, (Class<?>) AccountLoginActivity.class));
}
}, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
SafeSettingsActivity.this.finish();
}
});
LoginDialog.show();
}
private PlatformConfig getGetConfig() {
final PlatformConfig syncSession = new PlatformConfig();
final GetconfigUrlManager getconfigUrlManager = CoreManagerFactory.getInstance().getconfigUrlManager();
PlatformConfig.Environment environment = getconfigUrlManager.findEnvironment();
if (environment != null) {
syncSession.setEnvironment(environment);
} else {
GetConfigCommand getConfigCommand = new GetConfigCommand(this.httpTemplateFactory.getHttpTemplate(), new Packet(Packet.MethodType.GET, "http://sync.189.cn/UabSyncService/uabconfig.uab"));
getConfigCommand.setAdapter(new CommandAdapter<Object, GetConfigProto.GetConfigResponse>() {
@Override
public Object prepare() {
return null;
}
@Override
public void onComplete(GetConfigProto.GetConfigResponse response) {
syncSession.getEnvironment().setAuthUrl(response.getAuthUrl());
syncSession.getEnvironment().setClientReportUrl(response.getClientReportUrl());
syncSession.getEnvironment().setGetUserCloudSummaryUrl(response.getGetUserCloudSummaryUrl());
syncSession.getEnvironment().setQueryClientVersionUrl(response.getQueryClientVersionUrl());
syncSession.getEnvironment().setQueryMobileNoUrl(response.getQueryMobileNoUrl());
syncSession.getEnvironment().setGetSplashUrl(response.getGetSplashUrl());
syncSession.getEnvironment().setGetSysMsgUrl(response.getGetSysMsgUrl());
syncSession.getEnvironment().setQueryPublicInfoUrl(response.getQueryPublicInfoUrl());
syncSession.getEnvironment().setQueryCommentInfoUrl(response.getQueryCommentsUrl());
syncSession.getEnvironment().setNewDeviceSignUrl(response.getNewDeviceSignUrl());
syncSession.getEnvironment().setTpnoolUrl(response.getTpnoolUrl());
syncSession.getEnvironment().setGetContactAdUrl(response.getGetContactAdUrl());
syncSession.getEnvironment().setGetReadAmountUrl(response.getReadAmountUrl());
syncSession.getEnvironment().setGetHCodeUrl(response.getGetHcodeUrl());
syncSession.getEnvironment().setGetPublicTelephoneUrl(response.getGetPublicTelephoneUrl());
syncSession.getEnvironment().setUploadAllEncryptedUrl(response.getUploadAllEncryptedUrl());
syncSession.getEnvironment().setDownloadAllEncryptedUrl(response.getDownloadAllEncryptedUrl());
syncSession.getEnvironment().setDownloadContactEncryptedUrl(response.getDownloadContactEncryptedUrl());
syncSession.getEnvironment().setSyncUploadContactEncryptedUrl(response.getSyncUploadContactEncryptedUrl());
syncSession.getEnvironment().setSlowSyncEncryptedUrl(response.getSlowSyncEncryptedUrl());
syncSession.getEnvironment().setSyncSmsEncryptedUrl(response.getSyncSmsEncryptedUrl());
syncSession.getEnvironment().setUploadSmsEncryptedUrl(response.getUploadSmsEncryptedUrl());
syncSession.getEnvironment().setDownloadSmsEncryptedUrl(response.getDownloadSmsEncryptedUrl());
syncSession.getEnvironment().setBackupCalllogEncryptedUrl(response.getBackupCalllogEncryptedUrl());
syncSession.getEnvironment().setRecoverCalllogEncryptedUrl(response.getRecoverCalllogEncryptedUrl());
syncSession.getEnvironment().setGetWebSysUrl(response.getGetWebSysMsgUrl());
syncSession.getEnvironment().setBugReportUrl(response.getErrorLogUrl());
syncSession.getEnvironment().setContactShareUrl(response.getConatctShareUrl());
syncSession.getEnvironment().setMyCardShareUrl(response.getIsopenMycardUrl());
syncSession.getEnvironment().setUnlimitedRecoveryMemberUrl(response.getAddGetMemberinfoUrlUrl());
syncSession.getEnvironment().setPimPlatformADUrl(response.getCalloffAdUrl());
syncSession.getEnvironment().setCuMycardShareUrl(response.getAddupdateMycardUrl());
syncSession.getEnvironment().setUploadPortraitUrl(response.getUploadPortraitUrl());
syncSession.getEnvironment().setGetMyContactSharedUrl(response.getConatctShareListUrl());
syncSession.getEnvironment().setGetDelMyContactShareUrl(response.getDelConatctShareListUrl());
syncSession.getEnvironment().setSharedUrl(response.getGetShareUrl());
syncSession.getEnvironment().setContactMyCardInfoUrl(response.getGetContactMycardUrl());
syncSession.getEnvironment().setGetMemberInfoUrl(response.getGetMemberInfoUrl());
syncSession.getEnvironment().setDownloadPortraitUrl(response.getDownloadPortraitUrl());
syncSession.getEnvironment().setGetMemberModuleUrl(response.getGetMemberModuleUrl());
syncSession.getEnvironment().setGetSubscribeUrl(response.getSubscribeUrl());
syncSession.getEnvironment().setGetSimCardStatus(response.getSimCardAuthUrl());
syncSession.getEnvironment().setGetMyCtpassStatus(response.getGetCtpassStatusUrl());
syncSession.getEnvironment().setGetMyCtpassIsSupport(response.getGetCtpassIsSupportUrl());
getconfigUrlManager.saveEnvironment(syncSession.getEnvironment());
}
@Override
public void onComplete(byte[] bytes) {
}
});
getConfigCommand.execute(null);
}
return syncSession;
}
public boolean getVipMember() {
int number;
SyncResponse<GetMemberInfoProto.MemberInfoResponse> memberInfoResponse = null;
try {
memberInfoResponse = this.syncAndroidDeviceManager.getMemberInfoResponse();
} catch (Exception e) {
e.printStackTrace();
}
if (memberInfoResponse.getBody() == null || memberInfoResponse.getBody().getMemberLevel() == null) {
number = 1;
} else {
number = memberInfoResponse.getBody().getMemberLevel().getNumber();
}
if (number == 2) {
return true;
}
return false;
}
public boolean getVipMemberFirst() {
int number;
boolean simCardAuth;
SyncResponse<GetMemberInfoProto.MemberInfoResponse> memberInfoResponse = null;
try {
memberInfoResponse = this.syncAndroidDeviceManager.getMemberInfoResponse();
} catch (Exception e) {
e.printStackTrace();
}
if (memberInfoResponse.getBody() == null || memberInfoResponse.getBody().getMemberLevel() == null) {
number = 1;
} else {
number = memberInfoResponse.getBody().getMemberLevel().getNumber();
}
if (memberInfoResponse.getBody() == null) {
simCardAuth = false;
} else {
simCardAuth = memberInfoResponse.getBody().getSimCardAuth();
}
if (number == 2) {
if (simCardAuth) {
runOnUiThread(new Runnable() {
@Override
public void run() {
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_open);
}
});
this.preferenceKeyManager.getSafeSetting().uimVerify().set(true);
return true;
}
runOnUiThread(new Runnable() {
@Override
public void run() {
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_close);
}
});
this.preferenceKeyManager.getSafeSetting().uimVerify().set(false);
return false;
}
if (simCardAuth) {
runOnUiThread(new Runnable() {
@Override
public void run() {
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_close);
}
});
this.preferenceKeyManager.getSafeSetting().uimVerify().set(false);
upLoadingStatus(false);
return false;
}
runOnUiThread(new Runnable() {
@Override
public void run() {
SafeSettingsActivity.this.adapter.getModel().getSafeSettingBtn().setImageResource(R.drawable.ic_call_details_black_close);
}
});
this.preferenceKeyManager.getSafeSetting().uimVerify().set(false);
return false;
}
class MyResult {
private QueryCTPassStatusResponseBean QueryCTPassStatusResponse;
MyResult() {
}
public QueryCTPassStatusResponseBean getQueryCTPassStatusResponse() {
return this.QueryCTPassStatusResponse;
}
public void setQueryCTPassStatusResponse(QueryCTPassStatusResponseBean QueryCTPassStatusResponse) {
this.QueryCTPassStatusResponse = QueryCTPassStatusResponse;
}
public class QueryCTPassStatusResponseBean {
private int ResultCode;
private String ResultDesc;
private StatusInfoBean StatusInfo;
QueryCTPassStatusResponseBean() {
}
public int getResultCode() {
return this.ResultCode;
}
public void setResultCode(int ResultCode) {
this.ResultCode = ResultCode;
}
public String getResultDesc() {
return this.ResultDesc;
}
public void setResultDesc(String ResultDesc) {
this.ResultDesc = ResultDesc;
}
public StatusInfoBean getStatusInfo() {
return this.StatusInfo;
}
public void setStatusInfo(StatusInfoBean StatusInfo) {
this.StatusInfo = StatusInfo;
}
public class StatusInfoBean {
private String CTPassStatus;
private String NativeStatus;
private String SM2Status;
private String UDBStatus;
StatusInfoBean() {
}
public String getUDBStatus() {
return this.UDBStatus;
}
public void setUDBStatus(String UDBStatus) {
this.UDBStatus = UDBStatus;
}
public String getCTPassStatus() {
return this.CTPassStatus;
}
public void setCTPassStatus(String CTPassStatus) {
this.CTPassStatus = CTPassStatus;
}
public String getSM2Status() {
return this.SM2Status;
}
public void setSM2Status(String SM2Status) {
this.SM2Status = SM2Status;
}
public String getNativeStatus() {
return this.NativeStatus;
}
public void setNativeStatus(String NativeStatus) {
this.NativeStatus = NativeStatus;
}
}
}
}
public String decrypt(String rspVal) {
try {
String jsonStr = CryptogramForCTPass.decryptByKey(rspVal, "F610F54321AB9235902A65755513A352");
return jsonStr;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}