导航菜单

页面标题

页面副标题

Uptodown App Store v6.80 - SearchActivity.java 源代码

正在查看: Uptodown App Store v6.80 应用的 SearchActivity.java JAVA 源代码文件

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


package com.uptodown.activities;

import N1.k;
import android.app.SearchManager;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.widget.AppCompatAutoCompleteTextView;
import androidx.appcompat.widget.SearchView;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import c2.B0;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import com.uptodown.UptodownApp;
import com.uptodown.activities.SearchActivity;
import f2.InterfaceC0921d;
import g2.C0945F;
import g2.C0955f;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CancellationException;
import kotlin.jvm.internal.AbstractC1009g;
import o3.s0;
import u2.v;

public final class SearchActivity extends AbstractC0740a {
    public static final b Q = new b(null);
    private s0 L;
    private M1.C M;
    private a N;
    private final ActivityResultLauncher P;
    private final R2.g J = R2.h.a(new d3.a() {
        @Override
        public final Object invoke() {
            c2.B0 t3;
            t3 = SearchActivity.t3(SearchActivity.this);
            return t3;
        }
    });
    private final R2.g K = new ViewModelLazy(kotlin.jvm.internal.D.b(J.class), new j(this), new i(this), new k(null, this));
    private boolean O = true;

    final class a extends ArrayAdapter implements Filterable {
        private final LayoutInflater a;
        final SearchActivity b;

        public static final class C0182a extends Filter {
            final SearchActivity a;
            final a b;

            C0182a(SearchActivity searchActivity, a aVar) {
                this.a = searchActivity;
                this.b = aVar;
            }

            @Override
            public CharSequence convertResultToString(Object resultValue) {
                kotlin.jvm.internal.m.e(resultValue, "resultValue");
                String a = ((C0945F) resultValue).a();
                kotlin.jvm.internal.m.b(a);
                return a;
            }

            @Override
            protected Filter.FilterResults performFiltering(CharSequence charSequence) {
                kotlin.jvm.internal.m.e(charSequence, "charSequence");
                v.a aVar = u2.v.v;
                Context applicationContext = this.a.getApplicationContext();
                kotlin.jvm.internal.m.d(applicationContext, "getApplicationContext(...)");
                u2.v a = aVar.a(applicationContext);
                a.a();
                ArrayList y02 = a.y0();
                a.i();
                if (charSequence.length() > 0) {
                    ArrayList arrayList = new ArrayList();
                    int size = y02.size();
                    for (int i = 0; i < size; i++) {
                        String a4 = ((C0945F) y02.get(i)).a();
                        if (a4 != null && m3.m.D(a4, charSequence, false, 2, null)) {
                            arrayList.add(y02.get(i));
                        }
                    }
                    y02 = arrayList;
                }
                Filter.FilterResults filterResults = new Filter.FilterResults();
                filterResults.values = y02;
                filterResults.count = y02.size();
                return filterResults;
            }

            @Override
            protected void publishResults(CharSequence charSequence, Filter.FilterResults filterResults) {
                kotlin.jvm.internal.m.e(charSequence, "charSequence");
                kotlin.jvm.internal.m.e(filterResults, "filterResults");
                this.b.clear();
                Object obj = filterResults.values;
                kotlin.jvm.internal.m.c(obj, "null cannot be cast to non-null type kotlin.collections.List<*>");
                Iterator it = ((List) obj).iterator();
                while (it.hasNext()) {
                    this.b.add((C0945F) it.next());
                }
                if (filterResults.count > 0) {
                    a aVar = this.a.N;
                    kotlin.jvm.internal.m.b(aVar);
                    aVar.notifyDataSetChanged();
                } else {
                    a aVar2 = this.a.N;
                    kotlin.jvm.internal.m.b(aVar2);
                    aVar2.notifyDataSetInvalidated();
                }
            }
        }

        public a(SearchActivity searchActivity, Context context) {
            super(context, -1);
            kotlin.jvm.internal.m.e(context, "context");
            this.b = searchActivity;
            LayoutInflater from = LayoutInflater.from(context);
            kotlin.jvm.internal.m.d(from, "from(...)");
            this.a = from;
        }

        public static final void b(SearchActivity searchActivity, View view) {
            kotlin.jvm.internal.m.e(view, "view");
            if (UptodownApp.F.a0()) {
                Object tag = view.getTag();
                kotlin.jvm.internal.m.c(tag, "null cannot be cast to non-null type kotlin.String");
                v.a aVar = u2.v.v;
                Context applicationContext = searchActivity.getApplicationContext();
                kotlin.jvm.internal.m.d(applicationContext, "getApplicationContext(...)");
                u2.v a = aVar.a(applicationContext);
                a.a();
                int J = a.J((String) tag);
                a.i();
                if (J > 0) {
                    a aVar2 = searchActivity.N;
                    kotlin.jvm.internal.m.b(aVar2);
                    aVar2.getFilter().filter(searchActivity.u3().b.b.getText().toString());
                }
            }
        }

        @Override
        public Filter getFilter() {
            return new C0182a(this.b, this);
        }

        @Override
        public View getView(int i, View view, ViewGroup parent) {
            LinearLayout linearLayout;
            kotlin.jvm.internal.m.e(parent, "parent");
            C0945F c0945f = (C0945F) getItem(i);
            if (c0945f == null) {
                View inflate = this.a.inflate(2131558807, parent, false);
                kotlin.jvm.internal.m.c(inflate, "null cannot be cast to non-null type android.widget.LinearLayout");
                return (LinearLayout) inflate;
            }
            if (view != null) {
                linearLayout = (LinearLayout) view;
            } else {
                View inflate2 = this.a.inflate(2131558807, parent, false);
                kotlin.jvm.internal.m.c(inflate2, "null cannot be cast to non-null type android.widget.LinearLayout");
                linearLayout = (LinearLayout) inflate2;
            }
            TextView textView = (TextView) linearLayout.findViewById(2131364099);
            ImageView imageView = (ImageView) linearLayout.findViewById(2131362311);
            imageView.setTag(c0945f.a());
            final SearchActivity searchActivity = this.b;
            imageView.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view2) {
                    SearchActivity.a.b(SearchActivity.this, view2);
                }
            });
            textView.setTypeface(N1.k.g.x());
            textView.setText(c0945f.a());
            return linearLayout;
        }
    }

    public static final class b {
        public b(AbstractC1009g abstractC1009g) {
            this();
        }

        private b() {
        }
    }

    public static final class c implements TextWatcher {
        public c() {
        }

        @Override
        public void afterTextChanged(Editable editable) {
            String I3 = SearchActivity.this.I3(String.valueOf(editable));
            int length = I3.length();
            if (2 > length || length >= 40) {
                if (SearchActivity.this.L != null) {
                    s0 s0Var = SearchActivity.this.L;
                    kotlin.jvm.internal.m.b(s0Var);
                    s0.a.a(s0Var, (CancellationException) null, 1, (Object) null);
                }
                if (SearchActivity.this.M != null) {
                    M1.C c = SearchActivity.this.M;
                    kotlin.jvm.internal.m.b(c);
                    c.c(new ArrayList());
                }
            } else {
                SearchActivity.this.J3(I3, 2);
            }
            if (String.valueOf(editable).length() > 0) {
                SearchActivity.this.u3().b.d.setVisibility(0);
                SearchActivity.this.u3().b.e.setVisibility(8);
                return;
            }
            M1.C c4 = SearchActivity.this.M;
            if (c4 != null) {
                c4.c(new ArrayList());
            }
            SearchActivity.this.u3().b.d.setVisibility(8);
            SearchActivity.this.u3().b.e.setVisibility(0);
        }

        @Override
        public void beforeTextChanged(CharSequence charSequence, int i, int i4, int i5) {
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i, int i4, int i5) {
        }
    }

    public static final class d extends RecyclerView.OnScrollListener {
        final LinearLayoutManager a;
        final SearchActivity b;

        d(LinearLayoutManager linearLayoutManager, SearchActivity searchActivity) {
            this.a = linearLayoutManager;
            this.b = searchActivity;
        }

        public void onScrolled(RecyclerView recyclerView, int i, int i4) {
            kotlin.jvm.internal.m.e(recyclerView, "recyclerView");
            if (i4 > 0) {
                int childCount = this.a.getChildCount();
                int itemCount = this.a.getItemCount();
                int findFirstVisibleItemPosition = this.a.findFirstVisibleItemPosition();
                SearchActivity searchActivity = this.b;
                String I3 = searchActivity.I3(searchActivity.u3().b.b.getText().toString());
                if (I3.length() <= 2 || childCount + findFirstVisibleItemPosition < itemCount || this.b.v3().d()) {
                    return;
                }
                this.b.L3(I3);
            }
        }
    }

    public static final class e implements InterfaceC0921d {
        e() {
        }

        @Override
        public void a(C0955f app) {
            kotlin.jvm.internal.m.e(app, "app");
            if (UptodownApp.F.a0()) {
                SearchActivity.this.D2(app.e());
            }
        }
    }

    static final class f extends kotlin.coroutines.jvm.internal.l implements d3.p {
        int a;

        static final class a implements r3.f {
            final SearchActivity a;

            a(SearchActivity searchActivity) {
                this.a = searchActivity;
            }

            public final java.lang.Object emit(u2.H r4, V2.d r5) {
                throw new UnsupportedOperationException("Method not decompiled: com.uptodown.activities.SearchActivity.f.a.emit(u2.H, V2.d):java.lang.Object");
            }
        }

        f(V2.d dVar) {
            super(2, dVar);
        }

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return SearchActivity.this.new f(dVar);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c = W2.b.c();
            int i = this.a;
            if (i == 0) {
                R2.n.b(obj);
                r3.I c4 = SearchActivity.this.v3().c();
                a aVar = new a(SearchActivity.this);
                this.a = 1;
                if (c4.collect(aVar, this) == c) {
                    return c;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                R2.n.b(obj);
            }
            throw new R2.d();
        }

        @Override
        public final Object invoke(o3.J j, V2.d dVar) {
            return ((f) create(j, dVar)).invokeSuspend(R2.s.a);
        }
    }

    static final class g extends kotlin.coroutines.jvm.internal.l implements d3.p {
        int a;
        final int b;
        final SearchActivity c;
        final String d;

        g(int i, SearchActivity searchActivity, String str, V2.d dVar) {
            super(2, dVar);
            this.b = i;
            this.c = searchActivity;
            this.d = str;
        }

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return new g(this.b, this.c, this.d, dVar);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c = W2.b.c();
            int i = this.a;
            if (i == 0) {
                R2.n.b(obj);
                long j = this.b * 1000;
                this.a = 1;
                if (o3.U.b(j, this) == c) {
                    return c;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                R2.n.b(obj);
            }
            J v3 = this.c.v3();
            ?? r02 = this.c;
            v3.b(r02, r02.I3(this.d), 0);
            return R2.s.a;
        }

        @Override
        public final Object invoke(o3.J j, V2.d dVar) {
            return ((g) create(j, dVar)).invokeSuspend(R2.s.a);
        }
    }

    static final class h extends kotlin.coroutines.jvm.internal.l implements d3.p {
        int a;
        final String c;

        h(String str, V2.d dVar) {
            super(2, dVar);
            this.c = str;
        }

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return SearchActivity.this.new h(this.c, dVar);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            W2.b.c();
            if (this.a != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            R2.n.b(obj);
            J v3 = SearchActivity.this.v3();
            ?? r02 = SearchActivity.this;
            String I3 = r02.I3(this.c);
            M1.C c = SearchActivity.this.M;
            kotlin.jvm.internal.m.b(c);
            v3.b(r02, I3, c.getItemCount());
            return R2.s.a;
        }

        @Override
        public final Object invoke(o3.J j, V2.d dVar) {
            return ((h) create(j, dVar)).invokeSuspend(R2.s.a);
        }
    }

    public static final class i extends kotlin.jvm.internal.n implements d3.a {
        final ComponentActivity a;

        public i(ComponentActivity componentActivity) {
            super(0);
            this.a = componentActivity;
        }

        @Override
        public final ViewModelProvider.Factory invoke() {
            return this.a.getDefaultViewModelProviderFactory();
        }
    }

    public static final class j extends kotlin.jvm.internal.n implements d3.a {
        final ComponentActivity a;

        public j(ComponentActivity componentActivity) {
            super(0);
            this.a = componentActivity;
        }

        @Override
        public final ViewModelStore invoke() {
            return this.a.getViewModelStore();
        }
    }

    public static final class k extends kotlin.jvm.internal.n implements d3.a {
        final d3.a a;
        final ComponentActivity b;

        public k(d3.a aVar, ComponentActivity componentActivity) {
            super(0);
            this.a = aVar;
            this.b = componentActivity;
        }

        @Override
        public final CreationExtras invoke() {
            CreationExtras creationExtras;
            d3.a aVar = this.a;
            return (aVar == null || (creationExtras = (CreationExtras) aVar.invoke()) == null) ? this.b.getDefaultViewModelCreationExtras() : creationExtras;
        }
    }

    public SearchActivity() {
        ActivityResultLauncher registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
            public final void onActivityResult(Object obj) {
                SearchActivity.N3(SearchActivity.this, (ActivityResult) obj);
            }
        });
        kotlin.jvm.internal.m.d(registerForActivityResult, "registerForActivityResult(...)");
        this.P = registerForActivityResult;
    }

    public static final void A3(SearchActivity searchActivity, View view) {
        if (UptodownApp.F.a0()) {
            searchActivity.u3().b.b.setText(TtmlNode.ANONYMOUS_REGION_ID);
        }
    }

    public static final void B3(SearchActivity searchActivity, View view) {
        if (UptodownApp.F.a0()) {
            searchActivity.F3();
        }
    }

    public static final boolean C3(SearchActivity searchActivity, TextView v, int i4, KeyEvent keyEvent) {
        kotlin.jvm.internal.m.e(v, "v");
        if (i4 != 3) {
            return false;
        }
        String obj = v.getText().toString();
        if (obj.length() <= 0) {
            return true;
        }
        searchActivity.x3();
        K3(searchActivity, obj, 0, 2, null);
        Bundle bundle = new Bundle();
        bundle.putString(MimeTypes.BASE_TYPE_TEXT, obj);
        u2.z n22 = searchActivity.n2();
        if (n22 != null) {
            n22.d("search", bundle);
        }
        searchActivity.M3(obj);
        searchActivity.u3().b.b.dismissDropDown();
        return true;
    }

    public static final void D3(SearchActivity searchActivity, AdapterView adapterView, View view, int i4, long j4) {
        kotlin.jvm.internal.m.e(adapterView, "adapterView");
        if (UptodownApp.F.a0()) {
            Object itemAtPosition = adapterView.getItemAtPosition(i4);
            kotlin.jvm.internal.m.c(itemAtPosition, "null cannot be cast to non-null type com.uptodown.models.RecentSearch");
            C0945F c0945f = (C0945F) itemAtPosition;
            if (c0945f.a() != null) {
                String a4 = c0945f.a();
                kotlin.jvm.internal.m.b(a4);
                K3(searchActivity, a4, 0, 2, null);
            }
        }
    }

    public static final void E3(View view) {
    }

    private final void F3() {
        try {
            this.P.launch(new Intent("android.speech.action.RECOGNIZE_SPEECH"));
        } catch (ActivityNotFoundException e4) {
            e4.printStackTrace();
            String string = getString(2131952038);
            kotlin.jvm.internal.m.d(string, "getString(...)");
            r0(string);
        }
    }

    public final void G3(ArrayList arrayList) {
        this.M = new M1.C(arrayList, new e());
    }

    private final String H3(String str) {
        return new m3.j("[^a-zA-Z0-9 ]+").g(str, TtmlNode.ANONYMOUS_REGION_ID);
    }

    public final String I3(String str) {
        kotlin.jvm.internal.m.b(str);
        return m3.m.w(str, "/", TtmlNode.ANONYMOUS_REGION_ID, false, 4, null);
    }

    public final void J3(String str, int i4) {
        s0 s0Var = this.L;
        if (s0Var != null) {
            kotlin.jvm.internal.m.b(s0Var);
            s0.a.a(s0Var, (CancellationException) null, 1, (Object) null);
        }
        this.L = o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), (V2.g) null, (o3.L) null, new g(i4, this, str, null), 3, (Object) null);
    }

    static void K3(SearchActivity searchActivity, String str, int i4, int i5, Object obj) {
        if ((i5 & 2) != 0) {
            i4 = 0;
        }
        searchActivity.J3(str, i4);
    }

    public final void L3(String str) {
        if (this.O) {
            s0 s0Var = this.L;
            if (s0Var != null) {
                kotlin.jvm.internal.m.b(s0Var);
                if (!s0Var.A()) {
                    return;
                }
            }
            if (this.M != null) {
                v3().e(true);
                M1.C c4 = this.M;
                if (c4 != null) {
                    c4.d(true);
                }
                this.L = o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), (V2.g) null, (o3.L) null, new h(str, null), 3, (Object) null);
            }
        }
    }

    private final void M3(String str) {
        C0945F c0945f = new C0945F();
        c0945f.c(H3(str));
        c0945f.d(String.valueOf(System.currentTimeMillis()));
        u2.v a4 = u2.v.v.a(this);
        a4.a();
        Iterator it = a4.y0().iterator();
        kotlin.jvm.internal.m.d(it, "iterator(...)");
        while (true) {
            if (!it.hasNext()) {
                a4.U0(c0945f);
                break;
            }
            Object next = it.next();
            kotlin.jvm.internal.m.d(next, "next(...)");
            if (m3.m.p(((C0945F) next).a(), str, true)) {
                break;
            }
        }
        a4.i();
    }

    public static final void N3(SearchActivity searchActivity, ActivityResult activityResult) {
        if (activityResult.getResultCode() != -1 || activityResult.getData() == null) {
            return;
        }
        Intent data = activityResult.getData();
        kotlin.jvm.internal.m.b(data);
        ArrayList<String> stringArrayListExtra = data.getStringArrayListExtra("android.speech.extra.RESULTS");
        searchActivity.u3().b.b.setText(stringArrayListExtra != null ? (String) stringArrayListExtra.get(0) : null);
    }

    public static final B0 t3(SearchActivity searchActivity) {
        return B0.c(searchActivity.getLayoutInflater());
    }

    public final B0 u3() {
        return (B0) this.J.getValue();
    }

    public final J v3() {
        return (J) this.K.getValue();
    }

    private final void w3(Intent intent) {
        String stringExtra;
        if (!kotlin.jvm.internal.m.a("android.intent.action.SEARCH", intent.getAction()) || (stringExtra = intent.getStringExtra(MBridgeConstans.DYNAMIC_VIEW_WX_QUERY)) == null) {
            return;
        }
        K3(this, stringExtra, 0, 2, null);
    }

    private final void x3() {
        Object systemService = getSystemService("input_method");
        kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
        ((InputMethodManager) systemService).hideSoftInputFromWindow(u3().b.b.getWindowToken(), 0);
    }

    private final void y3() {
        setContentView(u3().getRoot());
        ImageView imageView = (ImageView) findViewById(2131362285);
        if (imageView != null) {
            imageView.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    SearchActivity.z3(SearchActivity.this, view);
                }
            });
        }
        u3().b.d.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                SearchActivity.A3(SearchActivity.this, view);
            }
        });
        u3().b.e.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                SearchActivity.B3(SearchActivity.this, view);
            }
        });
        u3().b.b.requestFocus();
        AppCompatAutoCompleteTextView appCompatAutoCompleteTextView = u3().b.b;
        k.a aVar = N1.k.g;
        appCompatAutoCompleteTextView.setTypeface(aVar.x());
        u3().b.b.setOnEditorActionListener(new TextView.OnEditorActionListener() {
            @Override
            public final boolean onEditorAction(TextView textView, int i4, KeyEvent keyEvent) {
                boolean C3;
                C3 = SearchActivity.C3(SearchActivity.this, textView, i4, keyEvent);
                return C3;
            }
        });
        this.N = new a(this, this);
        u3().b.b.setAdapter(this.N);
        u3().b.b.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public final void onItemClick(AdapterView adapterView, View view, int i4, long j4) {
                SearchActivity.D3(SearchActivity.this, adapterView, view, i4, j4);
            }
        });
        AppCompatAutoCompleteTextView actvSearchBar = u3().b.b;
        kotlin.jvm.internal.m.d(actvSearchBar, "actvSearchBar");
        actvSearchBar.addTextChangedListener(new c());
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, 1, false);
        u3().d.setLayoutManager(linearLayoutManager);
        u3().d.setItemAnimator(new DefaultItemAnimator());
        u3().d.addOnScrollListener(new d(linearLayoutManager, this));
        RecyclerView rvSearchActivity = u3().d;
        kotlin.jvm.internal.m.d(rvSearchActivity, "rvSearchActivity");
        hideKeyboardOnScroll(rvSearchActivity);
        u3().c.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                SearchActivity.E3(view);
            }
        });
        u3().e.setTypeface(aVar.x());
    }

    public static final void z3(SearchActivity searchActivity, View view) {
        if (UptodownApp.F.a0()) {
            searchActivity.finish();
        }
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        y3();
        a aVar = this.N;
        kotlin.jvm.internal.m.b(aVar);
        aVar.getFilter().filter(u3().b.b.getText().toString());
        Intent intent = getIntent();
        if (intent != null) {
            w3(intent);
        }
        u3().c.setVisibility(8);
        o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new f(null), 2, (Object) null);
    }

    public boolean onCreateOptionsMenu(Menu menu) {
        kotlin.jvm.internal.m.e(menu, "menu");
        MenuInflater menuInflater = getMenuInflater();
        kotlin.jvm.internal.m.d(menuInflater, "getMenuInflater(...)");
        menuInflater.inflate(2131689476, menu);
        Object systemService = getSystemService("search");
        kotlin.jvm.internal.m.c(systemService, "null cannot be cast to non-null type android.app.SearchManager");
        SearchManager searchManager = (SearchManager) systemService;
        SearchView actionView = menu.findItem(2131361887).getActionView();
        if (actionView == null) {
            return true;
        }
        actionView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
        actionView.setIconifiedByDefault(false);
        return true;
    }

    protected void onNewIntent(Intent intent) {
        kotlin.jvm.internal.m.e(intent, "intent");
        super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
        w3(intent);
    }

    protected void onPause() {
        super/*androidx.fragment.app.FragmentActivity*/.onPause();
        x3();
    }

    @Override
    protected void onResume() {
        super.onResume();
        AppCompatAutoCompleteTextView actvSearchBar = u3().b.b;
        kotlin.jvm.internal.m.d(actvSearchBar, "actvSearchBar");
        showKeyboard(actvSearchBar);
    }

    public boolean onSearchRequested() {
        startSearch(null, false, new Bundle(), false);
        return true;
    }
}