秦华影视 v1.0.0版本的 MD5 值为:90520322e40df4849cf4989ab6339524
以下内容为反编译后的 kb2.java 源代码,内容仅作参考
package p.a.y.e.a.s.e.net;
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 androidx.core.content.FileProvider;
import com.google.android.exoplayer2.upstream.cache.CacheDataSink;
import java.io.File;
import java.util.ArrayList;
public class kb2 extends gb2 {
public static final String lite_break = "targetUrl";
public static final int lite_case = 128;
public static final String lite_catch = "appName";
public static final int lite_char = 512;
public static final String lite_class = "audio_url";
public static final String lite_const = "mini_program_appid";
public static final int lite_double = 2;
public static final String lite_else = "imageUrl";
public static final String lite_final = "mini_program_path";
public static final String lite_float = "mini_program_type";
public static final String lite_goto = "imageLocalUrl";
public static final int lite_import = 1;
public static final String lite_long = "title";
public static final int lite_native = 2;
public static final int lite_public = 5;
public static final int lite_return = 6;
public static final String lite_short = "req_type";
public static final int lite_static = 7;
public static final String lite_super = "share_qq_ext_str";
public static final String lite_switch = "share_to_qq_ark_info";
public static final String lite_this = "summary";
public static final String lite_throw = "cflag";
public static final String lite_void = "site";
public static final int lite_while = 1;
public String lite_byte;
public class a implements vc2 {
public final Bundle lite_do;
public final String lite_for;
public final String lite_if;
public final ld2 lite_int;
public final Activity lite_new;
public a(Bundle bundle, String str, String str2, ld2 ld2Var, Activity activity) {
this.lite_do = bundle;
this.lite_if = str;
this.lite_for = str2;
this.lite_int = ld2Var;
this.lite_new = activity;
}
@Override
public void lite_do(int i, ArrayList<String> arrayList) {
}
@Override
public void lite_if(int i, String str) {
if (i == 0) {
this.lite_do.putString("imageLocalUrl", str);
} else if (TextUtils.isEmpty(this.lite_if) && TextUtils.isEmpty(this.lite_for)) {
ld2 ld2Var = this.lite_int;
if (ld2Var != null) {
r5.q(-6, hb2.A, null, ld2Var);
ic2.lite_case("openSDK_LOG.QQShare", "shareToMobileQQ -- error: 获取分享图片失败!");
}
bc2.lite_do().lite_if(1, "SHARE_CHECK_SDK", hb2.lite_do, kb2.this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, hb2.A);
return;
}
kb2.this.lite_final(this.lite_new, this.lite_do, this.lite_int);
}
}
public class b implements vc2 {
public final Bundle lite_do;
public final String lite_for;
public final String lite_if;
public final ld2 lite_int;
public final Activity lite_new;
public b(Bundle bundle, String str, String str2, ld2 ld2Var, Activity activity) {
this.lite_do = bundle;
this.lite_if = str;
this.lite_for = str2;
this.lite_int = ld2Var;
this.lite_new = activity;
}
@Override
public void lite_do(int i, ArrayList<String> arrayList) {
if (i == 0) {
this.lite_do.putStringArrayList("imageLocalUrlArray", arrayList);
} else if (TextUtils.isEmpty(this.lite_if) && TextUtils.isEmpty(this.lite_for)) {
ld2 ld2Var = this.lite_int;
if (ld2Var != null) {
r5.q(-6, hb2.A, null, ld2Var);
ic2.lite_case("openSDK_LOG.QQShare", "shareToMobileQQ -- error: 获取分享图片失败!");
}
bc2.lite_do().lite_if(1, "SHARE_CHECK_SDK", hb2.lite_do, kb2.this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, hb2.A);
return;
}
kb2.this.lite_final(this.lite_new, this.lite_do, this.lite_int);
}
@Override
public void lite_if(int i, String str) {
if (i == 0) {
this.lite_do.putString("imageLocalUrl", str);
} else if (TextUtils.isEmpty(this.lite_if) && TextUtils.isEmpty(this.lite_for)) {
ld2 ld2Var = this.lite_int;
if (ld2Var != null) {
r5.q(-6, hb2.A, null, ld2Var);
ic2.lite_case("openSDK_LOG.QQShare", "shareToMobileQQ -- error: 获取分享图片失败!");
}
bc2.lite_do().lite_if(1, "SHARE_CHECK_SDK", hb2.lite_do, kb2.this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, hb2.A);
return;
}
kb2.this.lite_final(this.lite_new, this.lite_do, this.lite_int);
}
}
public kb2(Context context, za2 za2Var) {
super(za2Var);
this.lite_byte = "";
}
private void lite_catch(Activity activity, Bundle bundle, ld2 ld2Var) {
ic2.lite_long("openSDK_LOG.QQShare", "shareToMobileQQ() -- start.");
String string = bundle.getString("imageUrl");
String string2 = bundle.getString("title");
String string3 = bundle.getString("summary");
ic2.lite_const("openSDK_LOG.QQShare", "shareToMobileQQ -- imageUrl: " + string);
if (!TextUtils.isEmpty(string)) {
if (dd2.lite_interface(string)) {
if (!dd2.lite_continue(activity, "4.3.0")) {
lite_final(activity, bundle, ld2Var);
} else {
new uc2(activity).lite_int(string, new a(bundle, string2, string3, ld2Var, activity));
}
} else {
bundle.putString("imageUrl", null);
if (dd2.lite_continue(activity, "4.3.0")) {
ic2.lite_try("openSDK_LOG.QQShare", "shareToMobileQQ -- QQ Version is < 4.3.0 ");
lite_final(activity, bundle, ld2Var);
} else {
ic2.lite_try("openSDK_LOG.QQShare", "shareToMobileQQ -- QQ Version is > 4.3.0:isAppSpecificDir=" + dd2.c(string) + ",hasSDPermission:" + dd2.lite_boolean());
nb2.lite_new(activity, string, new b(bundle, string2, string3, ld2Var, activity));
}
}
} else if (bundle.getInt("req_type", 1) == 5) {
lite_const(activity, bundle, ld2Var);
} else {
lite_final(activity, bundle, ld2Var);
}
ic2.lite_long("openSDK_LOG.QQShare", "shareToMobileQQ() -- end");
}
private void lite_const(Activity activity, Bundle bundle, ld2 ld2Var) {
String str;
String string = bundle.getString("imageLocalUrl");
String str2 = null;
if (new File(string).length() >= CacheDataSink.DEFAULT_FRAGMENT_SIZE) {
if (ld2Var != null) {
r5.q(-16, hb2.E, null, ld2Var);
}
ic2.lite_case("openSDK_LOG.QQShare", "doShareImageToQQ -- error: 图片太大,请压缩到5M内再分享!");
return;
}
File externalFilesDir = xc2.lite_do().getExternalFilesDir("Images");
if (externalFilesDir != null) {
str = externalFilesDir.getAbsolutePath() + File.separator + hb2.F1;
} else {
ic2.lite_long("openSDK_LOG.QQShare", "doShareImageToQQ() getExternalFilesDir return null");
str = null;
}
File file = new File(string);
String absolutePath = file.getAbsolutePath();
String name = file.getName();
boolean c = dd2.c(absolutePath);
ic2.lite_long("openSDK_LOG.QQShare", "doShareImageToQQ() check file: isAppSpecificDir=" + c + ",hasSDPermission=" + dd2.lite_boolean() + ",fileDir=" + absolutePath);
ArrayList<String> arrayList = new ArrayList<>(2);
if (c) {
str2 = absolutePath;
} else if (!TextUtils.isEmpty(str)) {
String lite_volatile = r5.lite_volatile(r5.b(str), File.separator, name);
boolean lite_import2 = dd2.lite_import(absolutePath, lite_volatile);
ic2.lite_long("openSDK_LOG.QQShare", "doShareImageToQQ() sd permission not denied. copy to app sepcific:" + lite_volatile + ",isSuccess=" + lite_import2);
if (lite_import2) {
str2 = lite_volatile;
}
}
arrayList.add(absolutePath);
arrayList.add(str2);
ic2.lite_long("openSDK_LOG.QQShare", "doShareImageToQQ() destFilePaths=[" + arrayList.get(0) + ue2.lite_const + arrayList.get(1) + "]");
bundle.putStringArrayList("imageLocalUrlArray", arrayList);
lite_final(activity, bundle, ld2Var);
}
public void lite_final(Activity activity, Bundle bundle, ld2 ld2Var) {
ic2.lite_long("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("title");
String string3 = bundle.getString("summary");
String string4 = bundle.getString("targetUrl");
String string5 = bundle.getString("audio_url");
int i = bundle.getInt("req_type", 1);
String string6 = bundle.getString(lite_switch);
String string7 = bundle.getString(lite_const);
String string8 = bundle.getString(lite_final);
String string9 = bundle.getString(lite_float);
int i2 = bundle.getInt("cflag", 0);
String string10 = bundle.getString("share_qq_ext_str");
String lite_case2 = dd2.lite_case(activity);
if (lite_case2 == null) {
lite_case2 = bundle.getString("appName");
}
String str = lite_case2;
String string11 = bundle.getString("imageLocalUrl");
ArrayList<String> stringArrayList = bundle.getStringArrayList("imageLocalUrlArray");
String lite_new = this.lite_if.lite_new();
String lite_char2 = this.lite_if.lite_char();
ic2.lite_long("openSDK_LOG.QQShare", "doShareToQQ -- openid: " + lite_char2 + ",appName=" + str);
if (stringArrayList != null && stringArrayList.size() >= 2) {
String str2 = stringArrayList.get(0);
if (str2 == null) {
str2 = "";
}
StringBuilder b2 = r5.b("&file_data=");
b2.append(Base64.encodeToString(dd2.lite_implements(str2), 2));
stringBuffer.append(b2.toString());
String str3 = stringArrayList.get(1);
if (i == 7 && !TextUtils.isEmpty(str3) && ad2.lite_void(activity, "8.3.3") < 0) {
str3 = null;
ic2.lite_case("openSDK_LOG.QQShare", "doShareToQQ() share to mini program set file uri empty");
}
if (!TextUtils.isEmpty(str3)) {
try {
Uri uriForFile = FileProvider.getUriForFile(activity, md2.lite_byte(lite_new), new File(str3));
activity.grantUriPermission("com.tencent.mobileqq", uriForFile, 3);
stringBuffer.append("&file_uri=");
stringBuffer.append(Base64.encodeToString(dd2.lite_implements(uriForFile.toString()), 2));
} catch (Exception e) {
ic2.lite_char("openSDK_LOG.QQShare", "doShareToQQ() getUriForFile exception:", e);
}
}
} else if (!TextUtils.isEmpty(string11)) {
r5.A(string11, 2, r5.b("&file_data="), stringBuffer);
}
if (!TextUtils.isEmpty(string)) {
r5.A(string, 2, r5.b("&image_url="), stringBuffer);
}
if (!TextUtils.isEmpty(string2)) {
r5.A(string2, 2, r5.b("&title="), stringBuffer);
}
if (!TextUtils.isEmpty(string3)) {
r5.A(string3, 2, r5.b("&description="), stringBuffer);
}
if (!TextUtils.isEmpty(lite_new)) {
stringBuffer.append("&share_id=" + lite_new);
}
if (!TextUtils.isEmpty(string4)) {
r5.A(string4, 2, r5.b("&url="), stringBuffer);
}
if (!TextUtils.isEmpty(str)) {
if (str.length() > 20) {
str = str.substring(0, 20) + "...";
}
r5.A(str, 2, r5.b("&app_name="), stringBuffer);
}
if (!TextUtils.isEmpty(lite_char2)) {
r5.A(lite_char2, 2, r5.b("&open_id="), stringBuffer);
}
if (!TextUtils.isEmpty(string5)) {
r5.A(string5, 2, r5.b("&audioUrl="), stringBuffer);
}
StringBuilder b3 = r5.b("&req_type=");
b3.append(Base64.encodeToString(dd2.lite_implements(String.valueOf(i)), 2));
stringBuffer.append(b3.toString());
if (!TextUtils.isEmpty(string7)) {
StringBuilder b4 = r5.b("&mini_program_appid=");
b4.append(Base64.encodeToString(dd2.lite_implements(String.valueOf(string7)), 2));
stringBuffer.append(b4.toString());
}
if (!TextUtils.isEmpty(string8)) {
StringBuilder b5 = r5.b("&mini_program_path=");
b5.append(Base64.encodeToString(dd2.lite_implements(String.valueOf(string8)), 2));
stringBuffer.append(b5.toString());
}
if (!TextUtils.isEmpty(string9)) {
StringBuilder b6 = r5.b("&mini_program_type=");
b6.append(Base64.encodeToString(dd2.lite_implements(String.valueOf(string9)), 2));
stringBuffer.append(b6.toString());
}
if (!TextUtils.isEmpty(string6)) {
r5.A(string6, 2, r5.b("&share_to_qq_ark_info="), stringBuffer);
}
if (!TextUtils.isEmpty(string10)) {
r5.A(string10, 2, r5.b("&share_qq_ext_str="), stringBuffer);
}
StringBuilder b7 = r5.b("&cflag=");
b7.append(Base64.encodeToString(dd2.lite_implements(String.valueOf(i2)), 2));
stringBuffer.append(b7.toString());
boolean lite_boolean = dd2.lite_boolean();
StringBuilder b8 = r5.b("&third_sd=");
b8.append(Base64.encodeToString(dd2.lite_implements(String.valueOf(lite_boolean)), 2));
stringBuffer.append(b8.toString());
ic2.lite_const("openSDK_LOG.QQShare", "doShareToQQ -- url: " + stringBuffer.toString());
xa2.lite_do(xc2.lite_do(), this.lite_if, "requireApi", "shareToNativeQQ");
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse(stringBuffer.toString()));
intent.putExtra("pkg_name", activity.getPackageName());
if (dd2.lite_continue(activity, "4.6.0")) {
ic2.lite_long("openSDK_LOG.QQShare", "doShareToQQ, qqver below 4.6.");
if (lite_case(intent)) {
ib2.lite_if().lite_byte(hb2.f0, ld2Var);
lite_new(activity, intent, hb2.f0);
}
} else {
ic2.lite_long("openSDK_LOG.QQShare", "doShareToQQ, qqver greater than 4.6.");
if (ib2.lite_if().lite_case("shareToQQ", ld2Var) != null) {
ic2.lite_long("openSDK_LOG.QQShare", "doShareToQQ, last listener is not null, cancel it.");
}
if (lite_case(intent)) {
lite_int(activity, hb2.k0, intent, true);
}
}
String str4 = i2 == 1 ? "11" : "10";
if (lite_case(intent)) {
bc2.lite_do().lite_new(this.lite_if.lite_case(), this.lite_if.lite_new(), hb2.q1, str4, "3", "0", this.lite_byte, "0", "1", "0");
bc2.lite_do().lite_if(0, "SHARE_CHECK_SDK", hb2.lite_do, this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "");
} else {
bc2.lite_do().lite_new(this.lite_if.lite_case(), this.lite_if.lite_new(), hb2.q1, str4, "3", "1", this.lite_byte, "0", "1", "0");
bc2.lite_do().lite_if(1, "SHARE_CHECK_SDK", hb2.lite_do, this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "hasActivityForIntent fail");
}
ic2.lite_long("openSDK_LOG.QQShare", "doShareToQQ() --end");
}
public void lite_float(Activity activity, Bundle bundle, ld2 ld2Var) {
String str;
int i;
Bundle bundle2;
String str2;
ic2.lite_long("openSDK_LOG.QQShare", "shareToQQ() -- start.");
String string = bundle.getString("imageUrl");
String string2 = bundle.getString("title");
String string3 = bundle.getString("summary");
String string4 = bundle.getString("targetUrl");
String string5 = bundle.getString("imageLocalUrl");
String string6 = bundle.getString(lite_const);
String string7 = bundle.getString(lite_final);
int i2 = bundle.getInt("req_type", 1);
ic2.lite_long("openSDK_LOG.QQShare", "shareToQQ -- type: " + i2);
if (i2 == 1) {
this.lite_byte = "1";
} else if (i2 == 2) {
this.lite_byte = "3";
} else if (i2 == 5) {
this.lite_byte = "2";
} else if (i2 == 6) {
this.lite_byte = "4";
} else if (i2 == 7) {
this.lite_byte = hb2.e1;
}
if (i2 != 6) {
str = string4;
} else {
if (dd2.lite_continue(activity, "5.0.0")) {
r5.q(-15, hb2.s, null, ld2Var);
ic2.lite_case("openSDK_LOG.QQShare", "shareToQQ, app share is not support below qq5.0.");
bc2.lite_do().lite_if(1, "SHARE_CHECK_SDK", hb2.lite_do, this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ, app share is not support below qq5.0.");
return;
}
str = String.format("http://fusion.qq.com/cgi-bin/qzapps/unified_jump?appid=%1$s&from=%2$s&isOpenAppID=1", this.lite_if.lite_new(), "mqq");
bundle.putString("targetUrl", str);
}
if (!dd2.lite_while() && dd2.lite_continue(activity, "4.5.0")) {
r5.q(-6, hb2.z, null, ld2Var);
ic2.lite_case("openSDK_LOG.QQShare", "shareToQQ sdcard is null--end");
bc2.lite_do().lite_if(1, "SHARE_CHECK_SDK", hb2.lite_do, this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ sdcard is null");
return;
}
if (i2 == 5) {
if (dd2.lite_continue(activity, "4.3.0")) {
r5.q(-6, hb2.l, null, ld2Var);
ic2.lite_case("openSDK_LOG.QQShare", "shareToQQ, version below 4.3 is not support.");
bc2.lite_do().lite_if(1, "SHARE_CHECK_SDK", hb2.lite_do, this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ, version below 4.3 is not support.");
return;
} else if (!dd2.lite_transient(string5)) {
r5.q(-6, hb2.q, null, ld2Var);
ic2.lite_case("openSDK_LOG.QQShare", "shareToQQ -- error: 非法的图片地址!");
bc2.lite_do().lite_if(1, "SHARE_CHECK_SDK", hb2.lite_do, this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, hb2.q);
return;
}
}
if (i2 != 5) {
i = 7;
if (i2 != 7) {
if (!TextUtils.isEmpty(str) && (str.startsWith("http://") || str.startsWith("https://"))) {
if (TextUtils.isEmpty(string2)) {
r5.q(-6, hb2.m, null, ld2Var);
ic2.lite_case("openSDK_LOG.QQShare", "shareToQQ, title is empty.");
bc2.lite_do().lite_if(1, "SHARE_CHECK_SDK", hb2.lite_do, this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ, title is empty.");
return;
}
} else {
r5.q(-6, hb2.k, null, ld2Var);
ic2.lite_case("openSDK_LOG.QQShare", "shareToQQ, targetUrl is empty or illegal..");
bc2.lite_do().lite_if(1, "SHARE_CHECK_SDK", hb2.lite_do, this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ, targetUrl is empty or illegal..");
return;
}
}
if (i2 == i) {
if (!TextUtils.isEmpty(string6) && !TextUtils.isEmpty(string7) && !TextUtils.isEmpty(str) && !TextUtils.isEmpty(this.lite_if.lite_new())) {
if (ad2.lite_byte(activity, hb2.lite_byte) == null && ad2.lite_void(activity, "8.0.8") < 0) {
r5.q(-5, hb2.l, "808以下不支持分享小程序", ld2Var);
return;
} else if (TextUtils.isEmpty(string2) || TextUtils.isEmpty(string3)) {
r5.q(-5, hb2.k, "title || summary empty.", ld2Var);
return;
}
} else {
r5.q(-5, hb2.k, "appid || path || url empty.", ld2Var);
return;
}
}
if (TextUtils.isEmpty(string) && !string.startsWith("http://") && !string.startsWith("https://") && !new File(string).exists()) {
r5.q(-6, hb2.q, null, ld2Var);
ic2.lite_case("openSDK_LOG.QQShare", "shareToQQ, image url is emprty or illegal.");
bc2.lite_do().lite_if(1, "SHARE_CHECK_SDK", hb2.lite_do, this.lite_if.lite_new(), String.valueOf(0), Long.valueOf(SystemClock.elapsedRealtime()), 0, 1, "shareToQQ, image url is emprty or illegal.");
return;
}
if (!TextUtils.isEmpty(string2) || string2.length() <= 128) {
bundle2 = bundle;
str2 = null;
} else {
str2 = null;
bundle2 = bundle;
bundle2.putString("title", dd2.lite_else(string2, 128, null, null));
}
if (!TextUtils.isEmpty(string3) && string3.length() > 512) {
bundle2.putString("summary", dd2.lite_else(string3, 512, str2, str2));
}
if (!dd2.lite_class(activity, bundle2.getInt("cflag", 0) != 1)) {
ic2.lite_long("openSDK_LOG.QQShare", "shareToQQ, support share");
lite_catch(activity, bundle, ld2Var);
} else {
try {
ic2.lite_float("openSDK_LOG.QQShare", "shareToQQ, don't support share, will show download dialog");
new xb2(activity, "", lite_for(""), null, this.lite_if).show();
} catch (RuntimeException e) {
ic2.lite_char("openSDK_LOG.QQShare", " shareToQQ, TDialog.show not in main thread", e);
e.printStackTrace();
ld2Var.lite_do(new nd2(-6, hb2.D, null));
}
}
ic2.lite_long("openSDK_LOG.QQShare", "shareToQQ() -- end.");
}
i = 7;
if (i2 == i) {
}
if (TextUtils.isEmpty(string)) {
}
if (TextUtils.isEmpty(string2)) {
}
bundle2 = bundle;
str2 = null;
if (!TextUtils.isEmpty(string3)) {
bundle2.putString("summary", dd2.lite_else(string3, 512, str2, str2));
}
if (!dd2.lite_class(activity, bundle2.getInt("cflag", 0) != 1)) {
}
ic2.lite_long("openSDK_LOG.QQShare", "shareToQQ() -- end.");
}
@Override
public void lite_long() {
}
}