package com.amplifyframework.devmenu;

import android.os.Bundle;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.k;
import com.amplifyframework.core.R;
import com.amplifyframework.devmenu.DeveloperMenu;
import v4.j;
import v4.y;
import y4.d;

/* loaded from: classes4.dex */
public final class DeveloperMenuActivity extends k {
    /* JADX INFO: Access modifiers changed from: protected */
    @Override // androidx.fragment.app.k, androidx.activity.h, androidx.core.app.f, android.app.Activity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.activity_dev_menu);
        findViewById(R.id.dev_layout).setFocusable(true);
        j b10 = y.b(this, R.id.nav_host_fragment);
        y4.g.f((Toolbar) findViewById(R.id.toolbar), b10, new d.a(b10.D()).a());
        DeveloperMenu.singletonInstance(getApplicationContext()).setOnHideAction(new DeveloperMenu.HideAction() { // from class: com.amplifyframework.devmenu.h
            @Override // com.amplifyframework.devmenu.DeveloperMenu.HideAction
            public final void hideDeveloperMenu() {
                DeveloperMenuActivity.this.finish();
            }
        });
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // androidx.fragment.app.k, android.app.Activity
    public void onStart() {
        DeveloperMenu.singletonInstance(getApplicationContext()).setVisible(true);
        super.onStart();
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // androidx.fragment.app.k, android.app.Activity
    public void onStop() {
        DeveloperMenu.singletonInstance(getApplicationContext()).setVisible(false);
        super.onStop();
    }
}
