百度手机卫士 v8.8.0版本的 MD5 值为:a85894a6923c8a39f0c3a3a686ad7443
以下内容为反编译后的 isv.java 源代码,内容仅作参考
package dxoptimizer;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Base64;
import com.baidu.im.frame.pb.EnumSessionResult;
import com.dianxinos.optimizer.module.recommend.data.RelationalRecommendConstants;
import java.io.File;
public class isv extends iss {
public String a;
public isv(Context context, isq isqVar) {
super(isqVar);
this.a = "";
}
public void a(Activity activity, Bundle bundle, iwp iwpVar) {
ius.c("openSDK_LOG.QQShare", "shareToQQ() -- start.");
String string = bundle.getString("imageUrl");
String string2 = bundle.getString(RelationalRecommendConstants.RECOM_ELEMENT_TITLE);
String string3 = bundle.getString("summary");
String string4 = bundle.getString("targetUrl");
String string5 = bundle.getString("imageLocalUrl");
int i = bundle.getInt("req_type", 1);
ius.c("openSDK_LOG.QQShare", "shareToQQ -- type: " + i);
switch (i) {
case 1:
this.a = "1";
break;
case 2:
this.a = "3";
break;
case 5:
this.a = "2";
break;
case 6:
this.a = "4";
break;
}
if (i == 6) {
if (iwb.c(activity, "5.0.0") < 0) {
iwpVar.onError(new iwr(-15, "手Q版本过低,应用分享只支持手Q5.0及其以上版本", null));
ius.e("openSDK_LOG.QQShare", "shareToQQ, app share is not support below qq5.0.");
iva.a().a(1, "SHARE_CHECK_SDK", "1000", this.d.b(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ, app share is not support below qq5.0.");
return;
}
string4 = String.format("http://fusion.qq.com/cgi-bin/qzapps/unified_jump?appid=%1$s&from=%2$s&isOpenAppID=1", this.d.b(), "mqq");
bundle.putString("targetUrl", string4);
}
if (!iwg.b() && iwb.c(activity, "4.5.0") < 0) {
iwpVar.onError(new iwr(-6, "分享图片失败,检测不到SD卡!", null));
ius.e("openSDK_LOG.QQShare", "shareToQQ sdcard is null--end");
iva.a().a(1, "SHARE_CHECK_SDK", "1000", this.d.b(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ sdcard is null");
return;
}
if (i == 5) {
if (iwb.c(activity, "4.3.0") < 0) {
iwpVar.onError(new iwr(-6, "低版本手Q不支持该项功能!", null));
ius.e("openSDK_LOG.QQShare", "shareToQQ, version below 4.3 is not support.");
iva.a().a(1, "SHARE_CHECK_SDK", "1000", this.d.b(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ, version below 4.3 is not support.");
return;
} else if (!iwg.i(string5)) {
iwpVar.onError(new iwr(-6, "非法的图片地址!", null));
ius.e("openSDK_LOG.QQShare", "shareToQQ -- error: 非法的图片地址!");
iva.a().a(1, "SHARE_CHECK_SDK", "1000", this.d.b(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "非法的图片地址!");
return;
}
}
if (i != 5) {
if (TextUtils.isEmpty(string4) || (!string4.startsWith("http://") && !string4.startsWith("https://"))) {
iwpVar.onError(new iwr(-6, "传入参数有误!", null));
ius.e("openSDK_LOG.QQShare", "shareToQQ, targetUrl is empty or illegal..");
iva.a().a(1, "SHARE_CHECK_SDK", "1000", this.d.b(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ, targetUrl is empty or illegal..");
return;
} else if (TextUtils.isEmpty(string2)) {
iwpVar.onError(new iwr(-6, "title不能为空!", null));
ius.e("openSDK_LOG.QQShare", "shareToQQ, title is empty.");
iva.a().a(1, "SHARE_CHECK_SDK", "1000", this.d.b(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ, title is empty.");
return;
}
}
if (!TextUtils.isEmpty(string) && !string.startsWith("http://") && !string.startsWith("https://") && !new File(string).exists()) {
iwpVar.onError(new iwr(-6, "非法的图片地址!", null));
ius.e("openSDK_LOG.QQShare", "shareToQQ, image url is emprty or illegal.");
iva.a().a(1, "SHARE_CHECK_SDK", "1000", this.d.b(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ, image url is emprty or illegal.");
return;
}
if (!TextUtils.isEmpty(string2) && string2.length() > 45) {
bundle.putString(RelationalRecommendConstants.RECOM_ELEMENT_TITLE, iwg.a(string2, 45, (String) null, (String) null));
}
if (!TextUtils.isEmpty(string3) && string3.length() > 60) {
bundle.putString("summary", iwg.a(string3, 60, (String) null, (String) null));
}
if (iwg.a(activity)) {
ius.c("openSDK_LOG.QQShare", "shareToQQ, support share");
b(activity, bundle, iwpVar);
} else {
try {
ius.d("openSDK_LOG.QQShare", "shareToQQ, don't support share, will show download dialog");
new iua(activity, "", a(""), null, this.d).show();
} catch (RuntimeException e) {
ius.b("openSDK_LOG.QQShare", " shareToQQ, TDialog.show not in main thread", e);
e.printStackTrace();
iwpVar.onError(new iwr(-6, "没有在主线程调用!", null));
}
}
ius.c("openSDK_LOG.QQShare", "shareToQQ() -- end.");
}
private void b(Activity activity, Bundle bundle, iwp iwpVar) {
ius.c("openSDK_LOG.QQShare", "shareToMobileQQ() -- start.");
String string = bundle.getString("imageUrl");
String string2 = bundle.getString(RelationalRecommendConstants.RECOM_ELEMENT_TITLE);
String string3 = bundle.getString("summary");
ius.a("openSDK_LOG.QQShare", "shareToMobileQQ -- imageUrl: " + string);
if (!TextUtils.isEmpty(string)) {
if (iwg.g(string)) {
if (TextUtils.isEmpty(string2) && TextUtils.isEmpty(string3)) {
if (iwpVar != null) {
iwpVar.onError(new iwr(-6, "分享图片失败,检测不到SD卡!", null));
ius.e("openSDK_LOG.QQShare", "分享图片失败,检测不到SD卡!");
}
iva.a().a(1, "SHARE_CHECK_SDK", "1000", this.d.b(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "分享图片失败,检测不到SD卡!");
return;
}
if (iwb.c(activity, "4.3.0") >= 0) {
c(activity, bundle, iwpVar);
} else {
new ivp(activity).a(string, new isw(this, bundle, string2, string3, iwpVar, activity));
}
} else {
bundle.putString("imageUrl", null);
if (iwb.c(activity, "4.3.0") < 0) {
ius.b("openSDK_LOG.QQShare", "shareToMobileQQ -- QQ Version is < 4.3.0 ");
c(activity, bundle, iwpVar);
} else {
ius.b("openSDK_LOG.QQShare", "shareToMobileQQ -- QQ Version is > 4.3.0 ");
ita.a(activity, string, new isx(this, bundle, string2, string3, iwpVar, activity));
}
}
} else {
c(activity, bundle, iwpVar);
}
ius.c("openSDK_LOG.QQShare", "shareToMobileQQ() -- end");
}
public void c(Activity activity, Bundle bundle, iwp iwpVar) {
ius.c("openSDK_LOG.QQShare", "doShareToQQ() -- start");
StringBuffer stringBuffer = new StringBuffer("mqqapi://share/to_fri?src_type=app&version=1&file_type=news");
String string = bundle.getString("imageUrl");
String string2 = bundle.getString(RelationalRecommendConstants.RECOM_ELEMENT_TITLE);
String string3 = bundle.getString("summary");
String string4 = bundle.getString("targetUrl");
String string5 = bundle.getString("audio_url");
int i = bundle.getInt("req_type", 1);
int i2 = bundle.getInt("cflag", 0);
String string6 = bundle.getString("share_qq_ext_str");
String b = iwg.b(activity);
if (b == null) {
b = bundle.getString(RelationalRecommendConstants.RECOM_ELEMENT_APPNAME);
}
String string7 = bundle.getString("imageLocalUrl");
String b2 = this.d.b();
String d = this.d.d();
ius.a("openSDK_LOG.QQShare", "doShareToQQ -- openid: " + d);
if (!TextUtils.isEmpty(string)) {
stringBuffer.append("&image_url=" + Base64.encodeToString(iwg.j(string), 2));
}
if (!TextUtils.isEmpty(string7)) {
stringBuffer.append("&file_data=" + Base64.encodeToString(iwg.j(string7), 2));
}
if (!TextUtils.isEmpty(string2)) {
stringBuffer.append("&title=" + Base64.encodeToString(iwg.j(string2), 2));
}
if (!TextUtils.isEmpty(string3)) {
stringBuffer.append("&description=" + Base64.encodeToString(iwg.j(string3), 2));
}
if (!TextUtils.isEmpty(b2)) {
stringBuffer.append("&share_id=" + b2);
}
if (!TextUtils.isEmpty(string4)) {
stringBuffer.append("&url=" + Base64.encodeToString(iwg.j(string4), 2));
}
if (!TextUtils.isEmpty(b)) {
if (b.length() > 20) {
b = b.substring(0, 20) + "...";
}
stringBuffer.append("&app_name=" + Base64.encodeToString(iwg.j(b), 2));
}
if (!TextUtils.isEmpty(d)) {
stringBuffer.append("&open_id=" + Base64.encodeToString(iwg.j(d), 2));
}
if (!TextUtils.isEmpty(string5)) {
stringBuffer.append("&audioUrl=" + Base64.encodeToString(iwg.j(string5), 2));
}
stringBuffer.append("&req_type=" + Base64.encodeToString(iwg.j(String.valueOf(i)), 2));
if (!TextUtils.isEmpty(string6)) {
stringBuffer.append("&share_qq_ext_str=" + Base64.encodeToString(iwg.j(string6), 2));
}
stringBuffer.append("&cflag=" + Base64.encodeToString(iwg.j(String.valueOf(i2)), 2));
ius.a("openSDK_LOG.QQShare", "doShareToQQ -- url: " + stringBuffer.toString());
iru.a(ivt.a(), this.d, "requireApi", "shareToNativeQQ");
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse(stringBuffer.toString()));
intent.putExtra("pkg_name", activity.getPackageName());
if (iwb.c(activity, "4.6.0") < 0) {
ius.c("openSDK_LOG.QQShare", "doShareToQQ, qqver below 4.6.");
if (a(intent)) {
ist.a().a(11103, iwpVar);
a(activity, intent, 11103);
}
} else {
ius.c("openSDK_LOG.QQShare", "doShareToQQ, qqver greater than 4.6.");
if (ist.a().a("shareToQQ", iwpVar) != null) {
ius.c("openSDK_LOG.QQShare", "doShareToQQ, last listener is not null, cancel it.");
}
if (a(intent)) {
a(activity, EnumSessionResult.SESSION_APP_NOT_EXIST, intent, true);
}
}
if (a(intent)) {
iva.a().a(this.d.d(), this.d.b(), "ANDROIDQQ.SHARETOQQ.XX", "10", "3", "0", this.a, "0", "1", "0");
iva.a().a(0, "SHARE_CHECK_SDK", "1000", this.d.b(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "");
} else {
iva.a().a(this.d.d(), this.d.b(), "ANDROIDQQ.SHARETOQQ.XX", "10", "3", "1", this.a, "0", "1", "0");
iva.a().a(1, "SHARE_CHECK_SDK", "1000", this.d.b(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "hasActivityForIntent fail");
}
ius.c("openSDK_LOG.QQShare", "doShareToQQ() --end");
}
@Override
public void a() {
}
}