导航菜单

页面标题

页面副标题

MedEd v5.3.6 - InterstitialActivity.java 源代码

正在查看: MedEd v5.3.6 应用的 InterstitialActivity.java JAVA 源代码文件

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


package com.freshchat.consumer.sdk.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.FrameLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.Toast;
import com.freshchat.consumer.sdk.ConversationOptions;
import com.freshchat.consumer.sdk.FaqOptions;
import com.freshchat.consumer.sdk.R;
import com.freshchat.consumer.sdk.beans.Channel;
import com.freshchat.consumer.sdk.receiver.FreshchatReceiver;
import com.freshchat.consumer.sdk.service.e.m$a;
import defpackage.Ml1$a;
import java.util.ArrayList;
import java.util.List;

public class InterstitialActivity extends cr {
    private boolean fR;
    private FaqOptions g = new FaqOptions();
    private ConversationOptions aO = new ConversationOptions();
    private boolean fQ = false;
    Ml1$a<List<String>> fS = new du(this);
    Ml1$a<List<String>> fT = new dv(this);
    Ml1$a<List<Channel>> fU = new dw(this);

    private void cC() {
        if (this.fQ) {
            return;
        }
        if (getSupportActionBar() != null) {
            getSupportActionBar().f();
        }
        RelativeLayout relativeLayout = new RelativeLayout(this);
        FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -1);
        ProgressBar progressBar = new ProgressBar(this);
        progressBar.setIndeterminate(true);
        RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(-2, -2);
        layoutParams2.addRule(13, -1);
        relativeLayout.addView(progressBar, layoutParams2);
        setContentView(relativeLayout, layoutParams);
        this.fQ = true;
    }

    private void cD() {
        Ml1 supportLoaderManager;
        Ml1$a<List<String>> ml1$a;
        if (com.freshchat.consumer.sdk.util.w.e(this.g.getTags())) {
            s().jm();
        } else {
            if (!com.freshchat.consumer.sdk.util.au.bx(a())) {
                ArrayList<String> arrayList = new ArrayList<>(this.g.getTags());
                cC();
                Bundle bundle = new Bundle();
                bundle.putStringArrayList("TAGS", arrayList);
                if (this.g.getFilterType() == FaqOptions.FilterType.ARTICLE) {
                    supportLoaderManager = getSupportLoaderManager();
                    ml1$a = this.fT;
                } else {
                    if (this.g.getFilterType() != FaqOptions.FilterType.CATEGORY) {
                        return;
                    }
                    supportLoaderManager = getSupportLoaderManager();
                    ml1$a = this.fS;
                }
                supportLoaderManager.c(0, bundle, ml1$a);
                return;
            }
            s().jw();
        }
        finish();
    }

    private void cE() {
        Bundle bundle;
        if (com.freshchat.consumer.sdk.util.ds.a(this.aO.getTopicName())) {
            this.aO.getTopicName().toLowerCase();
        }
        String conversationReferenceID = this.aO.getConversationReferenceID();
        if (com.freshchat.consumer.sdk.util.ds.a(conversationReferenceID)) {
            cC();
            bundle = new Bundle();
            bundle.putString("EXTRA_CONVERSATION_REFERENCE_ID", conversationReferenceID);
        } else if (com.freshchat.consumer.sdk.util.w.e(this.aO.getTags())) {
            cF().jm();
            finish();
            return;
        } else {
            ArrayList<String> arrayList = new ArrayList<>(this.aO.getTags());
            cC();
            bundle = new Bundle();
            bundle.putStringArrayList("TAGS", arrayList);
        }
        getSupportLoaderManager().c(0, bundle, this.fU);
    }

    public com.freshchat.consumer.sdk.util.y cF() {
        return com.freshchat.consumer.sdk.util.cc.a(this, this.aO);
    }

    public void cb(String str) {
        if (com.freshchat.consumer.sdk.util.db.cm(a())) {
            com.freshchat.consumer.sdk.util.b.a(a(), 19, m$a.IMMEDIATE, str);
        } else {
            Toast.makeText(a(), R.string.freshchat_error_message_not_connected_to_internet, 0).show();
            finish();
        }
    }

    public void d(List<String> list) {
        s().G(list);
        finish();
    }

    public void e(List<Channel> list) {
        cF().E(list);
        finish();
    }

    private void k(String str) {
        if (com.freshchat.consumer.sdk.util.ds.a(str)) {
            new Intent((Context) this, (Class<?>) FreshchatReceiver.class).setAction("com.freshchat.consumer.sdk.actions.NotificationClicked");
            com.freshchat.consumer.sdk.b.a.e((Context) this, str);
        } else {
            com.freshchat.consumer.sdk.util.co.d("FRESHCHAT_WARNING", com.freshchat.consumer.sdk.b.c.INVALID_NOTIFICATION_CLICK_ACTION_MISSING_DEEPLINK.toString().replace("{{action_str}}", "com.freshchat.consumer.sdk.actions.NotificationClicked"));
        }
        finish();
    }

    private com.freshchat.consumer.sdk.util.ao s() {
        return com.freshchat.consumer.sdk.util.cc.a(this, this.g);
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        Bundle extras = getIntent().getExtras();
        if (extras.getBoolean("IS_FROM_NOTIFICATION_CLICK", false)) {
            k(extras.getString("FRESHCHAT_DEEPLINK"));
            return;
        }
        if (!"FaqOptions".equals(extras.getString("OPTIONS_TYPE"))) {
            if ("ConversationOptions".equals(extras.getString("OPTIONS_TYPE"))) {
                this.aO = com.freshchat.consumer.sdk.util.x.d(getIntent().getExtras());
                cE();
                return;
            }
            return;
        }
        this.g = com.freshchat.consumer.sdk.util.an.e(getIntent().getExtras());
        boolean z = !com.freshchat.consumer.sdk.util.dn.a(this);
        this.fR = z;
        if (!z) {
            cD();
        } else {
            com.freshchat.consumer.sdk.util.b.ao(a());
            cC();
        }
    }

    public void c(List<String> list) {
        s().F(list);
        finish();
    }

    @Override
    public void a(Context context, Intent intent) {
        if (com.freshchat.consumer.sdk.util.ds.A(intent.getAction(), "com.freshchat.consumer.sdk.actions.FAQAvailable")) {
            if (this.g != null) {
                cD();
            }
        } else if (com.freshchat.consumer.sdk.util.ds.A(intent.getAction(), "com.freshchat.consumer.sdk.actions.ParallelConvUpdated")) {
            String conversationReferenceID = this.aO.getConversationReferenceID();
            String stringExtra = intent.getStringExtra("EXTRA_CONVERSATION_REFERENCE_ID");
            boolean booleanExtra = intent.getBooleanExtra("EXTRA_PARALLEL_CONV_FETCH_SUCCESS", false);
            if (com.freshchat.consumer.sdk.util.ds.A(stringExtra, conversationReferenceID)) {
                if (!booleanExtra) {
                    Toast.makeText(a(), R.string.freshchat_error_message_not_connected_to_internet, 0).show();
                    finish();
                } else {
                    Bundle bundle = new Bundle();
                    bundle.putString("EXTRA_CONVERSATION_REFERENCE_ID", conversationReferenceID);
                    getSupportLoaderManager().c(0, bundle, this.fU);
                }
            }
        }
    }

    @Override
    public String[] b() {
        return this.fR ? new String[]{"com.freshchat.consumer.sdk.actions.RemoteConfigUpdated", "com.freshchat.consumer.sdk.actions.ParallelConvUpdated", "com.freshchat.consumer.sdk.actions.FAQAvailable"} : new String[]{"com.freshchat.consumer.sdk.actions.ParallelConvUpdated"};
    }

    public void a(Channel channel, String str) {
        if (com.freshchat.consumer.sdk.util.ds.a(str)) {
            com.freshchat.consumer.sdk.util.y a = com.freshchat.consumer.sdk.util.cc.a(a(), new ConversationOptions(str, channel.getName()));
            if (a != null) {
                a.f(channel);
                finish();
            }
        }
    }
}