导航菜单

页面标题

页面副标题

Housing v14.7.8 - h.java 源代码

正在查看: Housing v14.7.8 应用的 h.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package cl.json.social;

import android.content.Intent;
import android.net.Uri;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.WritableMap;
import com.newrelic.agent.android.instrumentation.Instrumented;
import com.newrelic.agent.android.instrumentation.LogInstrumentation;

@Instrumented
public class h extends o {
    private static final String PACKAGE = "com.instagram.android";
    private static final String PLAY_STORE_LINK = "https://play.google.com/store/apps/details?id=com.instagram.android";

    public h(ReactApplicationContext reactApplicationContext) {
        super(reactApplicationContext);
    }

    @Override
    public final String b() {
        return null;
    }

    @Override
    public final String c() {
        return PACKAGE;
    }

    @Override
    public final String d() {
        return PLAY_STORE_LINK;
    }

    @Override
    public final void f(ReadableMap readableMap) {
        super.f(readableMap);
        if (!n.e("type", readableMap)) {
            LogInstrumentation.e(cl.json.a.NAME, "No type provided");
            return;
        }
        String string = readableMap.getString("type");
        if (string.startsWith("text")) {
            this.intent.setPackage(PACKAGE);
            this.intent.setType("text/plain");
            this.intent.setAction("android.intent.action.SEND");
            g(null);
            return;
        }
        if (!n.e("url", readableMap)) {
            LogInstrumentation.e(cl.json.a.NAME, "No url provided");
            return;
        }
        String string2 = readableMap.getString("url");
        if (string2.startsWith("instagram://")) {
            Uri parse = Uri.parse(string2);
            this.intent.setAction("android.intent.action.VIEW");
            this.intent.setData(parse);
            g(null);
            return;
        }
        String[] split = string.split(y1.c.SEPARATOR);
        String str = split[split.length - 1];
        boolean startsWith = string.startsWith("image");
        String str2 = this.chooserTitle;
        Boolean valueOf = Boolean.valueOf(n.e("useInternalStorage", this.options) && this.options.getBoolean("useInternalStorage"));
        Uri b3 = (startsWith ? new cl.json.e(string2, defpackage.a.l("image/", str), "image", valueOf, this.reactContext) : new cl.json.e(string2, defpackage.a.l("video/", str), androidx.media3.common.q.BASE_TYPE_VIDEO, valueOf, this.reactContext)).b();
        Intent intent = new Intent("android.intent.action.SEND");
        if (startsWith) {
            intent.setType("image/*");
        } else {
            intent.setType("video/*");
        }
        intent.putExtra("android.intent.extra.STREAM", b3);
        intent.setPackage(PACKAGE);
        Intent intent2 = new Intent("com.instagram.share.ADD_TO_STORY");
        intent2.setDataAndType(b3, str);
        intent2.addFlags(1);
        intent2.setPackage(PACKAGE);
        Intent createChooser = Intent.createChooser(intent, str2);
        createChooser.addFlags(268435456);
        createChooser.putExtra("android.intent.extra.INITIAL_INTENTS", new Intent[]{intent2});
        this.reactContext.getCurrentActivity().grantUriPermission(PACKAGE, b3, 1);
        this.reactContext.startActivity(createChooser);
        WritableMap createMap = Arguments.createMap();
        createMap.putBoolean("success", true);
        createMap.putString("message", this.intent.getPackage());
        q.b(createMap);
    }
}