正在查看: CityMall v1.42.1 应用的 C1052h.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CityMall v1.42.1 应用的 C1052h.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package f0;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;
import com.adster.sdk.mediation.analytics.AnalyticsConstants;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.WritableMap;
public class C1052h extends o {
public C1052h(ReactApplicationContext reactApplicationContext) {
super(reactApplicationContext);
}
private String q(String str) {
return str.split("/")[r2.length - 1];
}
@Override
protected String b() {
return null;
}
@Override
protected String h() {
return "com.instagram.android";
}
@Override
protected String i() {
return "https://play.google.com/store/apps/details?id=com.instagram.android";
}
@Override
public void l(ReadableMap readableMap) {
super.l(readableMap);
if (!n.j("type", readableMap)) {
Log.e("RNShare", "No type provided");
return;
}
String string = readableMap.getString("type");
if (string.startsWith("text")) {
s(this.f20164c);
return;
}
if (!n.j("url", readableMap)) {
Log.e("RNShare", "No url provided");
return;
}
String string2 = readableMap.getString("url");
if (string2.startsWith("instagram://")) {
t(string2);
return;
}
String q4 = q(string);
r(string2, this.f20164c, Boolean.valueOf(string.startsWith("image")), q4);
}
protected void r(String str, String str2, Boolean bool, String str3) {
e0.e eVar;
Boolean valueOf = Boolean.valueOf(n.j("useInternalStorage", this.f20166e) && this.f20166e.getBoolean("useInternalStorage"));
if (bool.booleanValue()) {
eVar = new e0.e(str, "image/" + str3, "image", valueOf, this.f20162a);
} else {
eVar = new e0.e(str, "video/" + str3, "video", valueOf, this.f20162a);
}
Uri d5 = eVar.d();
Intent intent = new Intent("android.intent.action.SEND");
if (bool.booleanValue()) {
intent.setType("image/*");
} else {
intent.setType("video/*");
}
intent.putExtra("android.intent.extra.STREAM", d5);
intent.setPackage("com.instagram.android");
Intent intent2 = new Intent("com.instagram.share.ADD_TO_STORY");
intent2.setDataAndType(d5, str3);
intent2.addFlags(1);
intent2.setPackage("com.instagram.android");
Intent createChooser = Intent.createChooser(intent, str2);
createChooser.addFlags(268435456);
createChooser.putExtra("android.intent.extra.INITIAL_INTENTS", new Intent[]{intent2});
this.f20162a.getCurrentActivity().grantUriPermission("com.instagram.android", d5, 1);
this.f20162a.startActivity(createChooser);
WritableMap createMap = Arguments.createMap();
createMap.putBoolean("success", true);
createMap.putString(AnalyticsConstants.PARAM_EXCEPTION_MESSAGE, f().getPackage());
r.b(createMap);
}
protected void s(String str) {
f().setPackage("com.instagram.android");
f().setType("text/plain");
f().setAction("android.intent.action.SEND");
super.m();
}
protected void t(String str) {
Uri parse = Uri.parse(str);
f().setAction("android.intent.action.VIEW");
f().setData(parse);
super.m();
}
}