导航菜单

页面标题

页面副标题

Moneyman v2.316.0.0 - FAQSearchActivity.java 源代码

正在查看: Moneyman v2.316.0.0 应用的 FAQSearchActivity.java JAVA 源代码文件

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


package com.freshchat.consumer.sdk.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import androidx.appcompat.widget.SearchView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.exponea.sdk.services.inappcontentblock.ContentBlockCarouselViewController;
import com.freshchat.consumer.sdk.R;
import com.freshchat.consumer.sdk.a.m;
import com.freshchat.consumer.sdk.service.Status;

public class FAQSearchActivity extends ct<com.freshchat.consumer.sdk.l.u> {
    private RecyclerView fp;
    private com.freshchat.consumer.sdk.a.m fq;
    private View fu;
    private TextView fv;
    private boolean fw = false;
    private final m.b fs = new dm(this);
    private com.freshchat.consumer.sdk.g.d dq = new dn(this);
    private final MenuItem.OnActionExpandListener fx = new dq(this);
    private final View.OnClickListener ah = new dr(this);

    public void e(boolean z7) {
        b(((com.freshchat.consumer.sdk.l.u) this.eZ).I(z7));
    }

    @Override
    public String[] J() {
        return new String[]{"com.freshchat.consumer.sdk.actions.FAQSearchResultFetched"};
    }

    @Override
    public void K() {
        com.freshchat.consumer.sdk.l.u uVar = new com.freshchat.consumer.sdk.l.u(a());
        this.eZ = uVar;
        uVar.h(getIntent());
    }

    @Override
    public String L() {
        return ContentBlockCarouselViewController.EMPTY_PLACEHOLDER_ID;
    }

    @Override
    public void O() {
        e(false);
    }

    @Override
    public String P() {
        return getString(R.string.freshchat_no_articles_found);
    }

    @Override
    public View Q() {
        return this.fp;
    }

    @Override
    public void R() {
        com.freshchat.consumer.sdk.b.o.d(this.fu);
        this.fq.a(Status.SUCCESS);
        f(this.fp);
    }

    public void f(boolean z7) {
        String P7 = z7 ? P() : getString(R.string.freshchat_minimum_search_criteria);
        e(this.fu);
        this.fv.setText(P7);
    }

    @Override
    public void i(String str) {
        if (this.fw) {
            f(true);
        } else {
            com.freshchat.consumer.sdk.b.o.d(this.fu);
            super.i(str);
        }
    }

    public void j(int i5) {
        Intent ai;
        try {
            if (!com.freshchat.consumer.sdk.util.w.a(((com.freshchat.consumer.sdk.l.u) this.eZ).hZ()) || (ai = ((com.freshchat.consumer.sdk.l.u) this.eZ).ai(i5)) == null) {
                return;
            }
            startActivity(ai);
        } catch (Exception e4) {
            com.freshchat.consumer.sdk.util.aj.a(e4);
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.freshchat_activity_faq_search);
        w();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.freshchat_articles_list, menu);
        MenuItem findItem = menu.findItem(R.id.freshchat_menu_item_contact_us);
        MenuItem findItem2 = menu.findItem(R.id.freshchat_menu_item_search_solutions);
        SearchView searchView = (SearchView) findItem2.getActionView();
        searchView.setOnQueryTextListener(new Cdo(this, searchView));
        searchView.setQueryHint(getString(R.string.freshchat_faq_search_query_hint));
        searchView.setOnQueryTextFocusChangeListener(new dp(this));
        findItem2.setOnActionExpandListener(this.fx);
        findItem2.expandActionView();
        com.freshchat.consumer.sdk.b.o.a(searchView, getSupportActionBar());
        boolean z7 = ((com.freshchat.consumer.sdk.l.u) this.eZ).f() && ((com.freshchat.consumer.sdk.l.u) this.eZ).d();
        if (findItem != null) {
            findItem.setVisible(z7);
        }
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        if (menuItem.getItemId() != R.id.freshchat_categories_menu_item_contact_us) {
            return super.onOptionsItemSelected(menuItem);
        }
        ((com.freshchat.consumer.sdk.l.u) this.eZ).kJ();
        return true;
    }

    @Override
    public void w() {
        super.w();
        RecyclerView recyclerView = (RecyclerView) findViewById(R.id.search_faq_recycler_view);
        this.fp = recyclerView;
        recyclerView.setLayoutManager(new LinearLayoutManager(a()));
        com.freshchat.consumer.sdk.a.m mVar = new com.freshchat.consumer.sdk.a.m(((com.freshchat.consumer.sdk.l.u) this.eZ).hZ(), this.fs, this.dq);
        this.fq = mVar;
        this.fp.setAdapter(mVar);
        this.fp.addOnScrollListener(new dl(this));
        this.fu = findViewById(R.id.search_description_view);
        this.fv = (TextView) findViewById(R.id.search_description);
        if (((com.freshchat.consumer.sdk.l.u) this.eZ).f()) {
            a(((com.freshchat.consumer.sdk.l.u) this.eZ).d(), this.ah);
        }
        f(false);
    }

    @Override
    public String[] b() {
        return new String[]{"com.freshchat.consumer.sdk.actions.TokenWaitTimeout", "com.freshchat.consumer.sdk.actions.FAQApiVersionChanged"};
    }

    @Override
    public void a(Context context, Intent intent) {
        if ("com.freshchat.consumer.sdk.actions.FAQSearchResultFetched".equals(intent.getAction())) {
            b(((com.freshchat.consumer.sdk.l.u) this.eZ).h(intent.getExtras()));
        } else if ("android.net.conn.CONNECTIVITY_CHANGE".equals(intent.getAction())) {
            b(((com.freshchat.consumer.sdk.l.u) this.eZ).kP());
        }
    }

    @Override
    public void b(Status status) {
        if (status == null) {
            return;
        }
        if (((com.freshchat.consumer.sdk.l.u) this.eZ).c(status)) {
            super.b(status);
        } else {
            this.fq.a(status);
        }
    }

    public void j(String str) {
        if (((com.freshchat.consumer.sdk.l.u) this.eZ).bV(str)) {
            return;
        }
        if (((com.freshchat.consumer.sdk.l.u) this.eZ).bU(str)) {
            ((com.freshchat.consumer.sdk.l.u) this.eZ).mh();
            this.fp.setAdapter(this.fq);
            b(((com.freshchat.consumer.sdk.l.u) this.eZ).mf());
            com.freshchat.consumer.sdk.b.o.d(this.fu);
            return;
        }
        f(false);
    }
}