電視直播.apk(点击下载) / InteractionInfo.java


package com.tapsdk.tapad.model.entities;

import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.Log;
import androidx.annotation.Keep;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import org.json.JSONObject;

@Keep
public class InteractionInfo implements Parcelable {
    public static final Parcelable.Creator<InteractionInfo> CREATOR = new a();
    private static final String TAG = "InteractionInfo";
    public final String deepLinkUrl;
    public String extra = "";
    public JSONObject extraObject;
    public final int floatingLayerStyle;
    public final int interactionType;
    public final int landingType;
    public final String landingUrl;
    public final int triggerStyle;
    public final WxMiniProgramInfo wxMiniProgramInfo;

    static class a implements Parcelable.Creator<InteractionInfo> {
        a() {
        }

        /* renamed from: ʻ  reason: contains not printable characters */
        public InteractionInfo createFromParcel(Parcel parcel) {
            return new InteractionInfo(parcel);
        }

        /* renamed from: ʻ  reason: contains not printable characters */
        public InteractionInfo[] newArray(int i2) {
            return new InteractionInfo[i2];
        }
    }

    protected InteractionInfo(Parcel parcel) {
        this.interactionType = parcel.readInt();
        this.deepLinkUrl = parcel.readString();
        this.landingUrl = parcel.readString();
        this.floatingLayerStyle = parcel.readInt();
        this.triggerStyle = parcel.readInt();
        this.landingType = parcel.readInt();
        this.wxMiniProgramInfo = (WxMiniProgramInfo) parcel.readParcelable(WxMiniProgramInfo.class.getClassLoader());
        this.extra = parcel.readString();
    }

    public InteractionInfo(v0 v0Var) {
        WxMiniProgramInfo wxMiniProgramInfo2;
        int intValue = ((Integer) com.tapsdk.tapad.internal.m.a.m5751().m5752("interaction_type", Integer.class, -1)).intValue();
        int intValue2 = ((Integer) com.tapsdk.tapad.internal.m.a.m5751().m5752(CampaignEx.JSON_KEY_LANDING_TYPE, Integer.class, -1)).intValue();
        this.deepLinkUrl = v0Var.m6390();
        int intValue3 = ((Integer) com.tapsdk.tapad.internal.m.a.m5751().m5752("trigger_style", Integer.class, -1)).intValue();
        this.triggerStyle = intValue3 == -1 ? v0Var.m6396() : intValue3;
        int intValue4 = ((Integer) com.tapsdk.tapad.internal.m.a.m5751().m5752("float_layer_style", Integer.class, -1)).intValue();
        this.floatingLayerStyle = intValue4 == -1 ? v0Var.m6394() : intValue4;
        try {
            this.extraObject = new JSONObject(v0Var.m6395());
        } catch (Throwable th) {
            Log.i(TAG, th.getMessage());
        }
        try {
            JSONObject jSONObject = new JSONObject();
            int intValue5 = ((Integer) com.tapsdk.tapad.internal.m.a.m5751().m5752("shake_angle", Integer.class, -1)).intValue();
            if (intValue5 > 0) {
                jSONObject.put("shake_angle", intValue5);
                if (this.extraObject != null && this.extraObject.has("shake_angle")) {
                    this.extraObject.remove("shake_angle");
                    this.extraObject.put("shake_angle", intValue5);
                }
            }
            int intValue6 = ((Integer) com.tapsdk.tapad.internal.m.a.m5751().m5752("floating_layer_style_start_download", Integer.class, -1)).intValue();
            if (intValue6 != -1) {
                jSONObject.put("floating_layer_style_start_download", intValue6);
                if (this.extraObject != null && this.extraObject.has("floating_layer_style_start_download")) {
                    this.extraObject.remove("floating_layer_style_start_download");
                    this.extraObject.put("floating_layer_style_start_download", intValue6);
                }
            }
            if (this.extraObject == null) {
                this.extraObject = jSONObject;
            }
        } catch (Throwable th2) {
            Log.i(TAG, th2.getMessage());
        }
        if (intValue == -1) {
            this.landingUrl = v0Var.m6393();
            this.landingType = v0Var.m6397();
            this.wxMiniProgramInfo = new WxMiniProgramInfo(v0Var.m6392());
            this.interactionType = v0Var.m6391();
        } else if (intValue == 4) {
            this.interactionType = 4;
            if (intValue2 == 1) {
                this.landingType = 1;
                this.landingUrl = "https://adn.tapapis.cn/dev-engine-g3/bid/getWxLink";
            } else {
                this.landingType = 2;
                this.landingUrl = "https://adn.tapapis.cn/dev-engine-g3/bid/wx302";
            }
            this.wxMiniProgramInfo = new WxMiniProgramInfo("gh_222569bab786", "", "wx0f2b0cfc3d31045f", "com.xindong.rocket");
        } else {
            this.interactionType = intValue;
            if (intValue != 3) {
                this.landingUrl = v0Var.m6393();
                this.landingType = v0Var.m6397();
                wxMiniProgramInfo2 = new WxMiniProgramInfo(v0Var.m6392());
            } else if (intValue2 != -1) {
                if (intValue2 == 1) {
                    this.landingType = 1;
                    this.landingUrl = "https://adn.tapapis.cn/dev-engine-g3/bid/getWxLink";
                } else {
                    this.landingType = 2;
                    this.landingUrl = "https://adn.tapapis.cn/dev-engine-g3/bid/wx302";
                }
                wxMiniProgramInfo2 = new WxMiniProgramInfo(v0Var.m6392());
            } else {
                this.landingUrl = v0Var.m6393();
                this.landingType = v0Var.m6397();
                wxMiniProgramInfo2 = new WxMiniProgramInfo(v0Var.m6392());
            }
            this.wxMiniProgramInfo = wxMiniProgramInfo2;
        }
    }

    public boolean canStartDownloadInFloatingLayer() {
        try {
            return this.extraObject != null && this.extraObject.getInt("floating_layer_style_start_download") == 1;
        } catch (Throwable unused) {
            return false;
        }
    }

    public int describeContents() {
        return 0;
    }

    public float extractShakeAngle() {
        try {
            if (this.extraObject == null || !this.extraObject.has("shake_angle")) {
                return 120.0f;
            }
            return (float) this.extraObject.getInt("shake_angle");
        } catch (Throwable unused) {
            return 120.0f;
        }
    }

    public boolean isValidWxOpenSdk() {
        return !TextUtils.isEmpty(this.wxMiniProgramInfo.f5205) && !TextUtils.isEmpty(this.wxMiniProgramInfo.f5203);
    }

    public String toString() {
        return "InteractionInfo{interactionType=" + this.interactionType + ", deepLinkUrl='" + this.deepLinkUrl + '\'' + ", h5Url='" + this.landingUrl + '\'' + ", extra='" + this.extra + "'" + '}';
    }

    public void writeToParcel(Parcel parcel, int i2) {
        parcel.writeInt(this.interactionType);
        parcel.writeString(this.deepLinkUrl);
        parcel.writeString(this.landingUrl);
        parcel.writeInt(this.floatingLayerStyle);
        parcel.writeInt(this.triggerStyle);
        parcel.writeInt(this.landingType);
        parcel.writeParcelable(this.wxMiniProgramInfo, i2);
        parcel.writeString(this.extra);
    }
}