导航菜单

页面标题

页面副标题

Mitra Bukalapak v2.55.0 - ToolbarActivity.java 源代码

正在查看: Mitra Bukalapak v2.55.0 应用的 ToolbarActivity.java JAVA 源代码文件

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


package com.bukalapak.mitra.lib.activity;

import android.content.Context;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.h;
import com.bukalapak.android.lib.api4.tungku.data.HomepageTouchpointTypeCategory;
import com.bukalapak.android.lib.api4.tungku.data.SingleKycIdentity;
import com.google.android.material.appbar.AppBarLayout;
import defpackage.C0215xl4;
import defpackage.av2;
import defpackage.dk4;
import defpackage.ep8;
import defpackage.ex2;
import defpackage.f5;
import defpackage.p64;
import defpackage.qx1;
import defpackage.rb7;
import defpackage.xk4;
import defpackage.z72;
import kotlin.Metadata;

@Metadata(d1 = {"\u0000\\\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u000b\b\u0017\u0018\u0000 02\u00020\u00012\u00020\u0002:\u0001#B\u0007¢\u0006\u0004\b.\u0010/J\b\u0010\u0004\u001a\u00020\u0003H\u0002J\u0012\u0010\u0007\u001a\u00020\u00032\b\u0010\u0006\u001a\u0004\u0018\u00010\u0005H\u0014J\u0012\u0010\n\u001a\u00020\u00032\b\u0010\t\u001a\u0004\u0018\u00010\bH\u0014J\u0010\u0010\u000e\u001a\u00020\r2\u0006\u0010\f\u001a\u00020\u000bH\u0016J\u0010\u0010\u000f\u001a\u00020\r2\u0006\u0010\f\u001a\u00020\u000bH\u0016J\u0010\u0010\u0012\u001a\u00020\r2\u0006\u0010\u0011\u001a\u00020\u0010H\u0016J\b\u0010\u0013\u001a\u00020\u0003H\u0016J\n\u0010\u0015\u001a\u0004\u0018\u00010\u0014H\u0014J\b\u0010\u0017\u001a\u0004\u0018\u00010\u0016R\"\u0010\u001f\u001a\u00020\u00188\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b\u0019\u0010\u001a\u001a\u0004\b\u001b\u0010\u001c\"\u0004\b\u001d\u0010\u001eR\u001d\u0010%\u001a\u0004\u0018\u00010 8VX\u0096\u0084\u0002¢\u0006\f\n\u0004\b!\u0010\"\u001a\u0004\b#\u0010$R\u001d\u0010*\u001a\u0004\u0018\u00010&8VX\u0096\u0084\u0002¢\u0006\f\n\u0004\b'\u0010\"\u001a\u0004\b(\u0010)R\u0016\u0010-\u001a\u00020\r8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b+\u0010,¨\u00061"}, d2 = {"Lcom/bukalapak/mitra/lib/activity/ToolbarActivity;", "Lcom/bukalapak/mitra/lib/activity/a;", "Lz72;", "Llm9;", "C", "Landroid/content/Context;", "newBase", "attachBaseContext", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "Landroid/view/Menu;", HomepageTouchpointTypeCategory.MENU, SingleKycIdentity.EMPTY, "onPrepareOptionsMenu", "onCreateOptionsMenu", "Landroid/view/MenuItem;", "item", "onOptionsItemSelected", "onBackPressed", "Landroidx/fragment/app/Fragment;", "s", SingleKycIdentity.EMPTY, "B", "Lqx1;", "k", "Lqx1;", "A", "()Lqx1;", "setDevopsUtils", "(Lqx1;)V", "devopsUtils", "Landroidx/appcompat/widget/Toolbar;", "l", "Lxk4;", SingleKycIdentity.A, "()Landroidx/appcompat/widget/Toolbar;", "toolbar", "Lcom/google/android/material/appbar/AppBarLayout;", "m", "g", "()Lcom/google/android/material/appbar/AppBarLayout;", "appBar", "n", "Z", "hideToolbar", "<init>", "()V", SingleKycIdentity.O, "lib_mitra_activity_release"}, k = 1, mv = {1, 8, 0})
public class ToolbarActivity extends a implements z72 {

    public qx1 devopsUtils;

    private final xk4 toolbar;

    private final xk4 appBar;

    private boolean hideToolbar;

    @Metadata(d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0002\u001a\n \u0001*\u0004\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lcom/google/android/material/appbar/AppBarLayout;", "kotlin.jvm.PlatformType", SingleKycIdentity.A, "()Lcom/google/android/material/appbar/AppBarLayout;"}, k = 3, mv = {1, 8, 0})
    static final class b extends dk4 implements ex2<AppBarLayout> {
        b() {
            super(0);
        }

        @Override
        public final AppBarLayout invoke() {
            return (AppBarLayout) ToolbarActivity.this.findViewById(ca7.a);
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0002\u001a\n \u0001*\u0004\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Landroidx/appcompat/widget/Toolbar;", "kotlin.jvm.PlatformType", SingleKycIdentity.A, "()Landroidx/appcompat/widget/Toolbar;"}, k = 3, mv = {1, 8, 0})
    static final class c extends dk4 implements ex2<Toolbar> {
        c() {
            super(0);
        }

        @Override
        public final Toolbar invoke() {
            return (Toolbar) ToolbarActivity.this.findViewById(ca7.b);
        }
    }

    public ToolbarActivity() {
        xk4 a;
        xk4 a2;
        a = C0215xl4.a(new c());
        this.toolbar = a;
        a2 = C0215xl4.a(new b());
        this.appBar = a2;
    }

    private final void C() {
        androidx.appcompat.app.a supportActionBar = getSupportActionBar();
        if (supportActionBar != null) {
            supportActionBar.v(12);
        }
    }

    public final qx1 A() {
        qx1 qx1Var = this.devopsUtils;
        if (qx1Var != null) {
            return qx1Var;
        }
        p64.t("devopsUtils");
        return null;
    }

    public final java.lang.String B() {
        throw new UnsupportedOperationException("Method not decompiled: com.bukalapak.mitra.lib.activity.ToolbarActivity.B():java.lang.String");
    }

    @Override
    public Toolbar a() {
        return (Toolbar) this.toolbar.getValue();
    }

    @Override
    protected void attachBaseContext(Context context) {
        super.attachBaseContext(context);
        ep8.b(this);
    }

    @Override
    public AppBarLayout g() {
        return (AppBarLayout) this.appBar.getValue();
    }

    @Override
    public void onBackPressed() {
        h mCurrentFragment = getMCurrentFragment();
        f5 f5Var = mCurrentFragment instanceof f5 ? (f5) mCurrentFragment : null;
        if (f5Var == null || !f5Var.d()) {
            super.onBackPressed();
        }
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        boolean booleanExtra = getIntent().getBooleanExtra("hide_toolbar", false);
        this.hideToolbar = booleanExtra;
        if (booleanExtra) {
            setContentView(rb7.b);
            return;
        }
        setContentView(rb7.a);
        setSupportActionBar(a());
        C();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        p64.h(menu, HomepageTouchpointTypeCategory.MENU);
        Fragment mCurrentFragment = getMCurrentFragment();
        if (mCurrentFragment != null) {
            mCurrentFragment.onCreateOptionsMenu(menu, getMenuInflater());
        }
        if (!this.hideToolbar) {
            A().c(this, menu);
        }
        return super.onCreateOptionsMenu(menu);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        p64.h(item, "item");
        if (item.getItemId() == 16908332) {
            onBackPressed();
            return true;
        }
        Fragment mCurrentFragment = getMCurrentFragment();
        if (mCurrentFragment != null) {
            return mCurrentFragment.onOptionsItemSelected(item);
        }
        return false;
    }

    @Override
    public boolean onPrepareOptionsMenu(Menu menu) {
        p64.h(menu, HomepageTouchpointTypeCategory.MENU);
        Fragment mCurrentFragment = getMCurrentFragment();
        if (mCurrentFragment != null) {
            mCurrentFragment.onPrepareOptionsMenu(menu);
        }
        return super.onPrepareOptionsMenu(menu);
    }

    @Override
    protected Fragment s() {
        return av2.a.a(getMFragmentGetterId());
    }
}