package androidx.lifecycle;

import android.app.Fragment;
import android.content.ComponentCallbacks2;
import android.os.Bundle;
import androidx.lifecycle.a;

/* JADX INFO: loaded from: classes.dex */
public class ReportFragment extends Fragment {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private a f792c;

    interface a {
        void a();

        void b();

        void onStart();
    }

    private void a(a.EnumC0027a enumC0027a) {
        ComponentCallbacks2 activity = getActivity();
        if (activity instanceof d) {
            ((d) activity).a().b(enumC0027a);
        } else if (activity instanceof b) {
            androidx.lifecycle.a aVarA = ((b) activity).a();
            if (aVarA instanceof c) {
                ((c) aVarA).b(enumC0027a);
            }
        }
    }

    private void b(a aVar) {
        if (aVar != null) {
            aVar.a();
        }
    }

    private void c(a aVar) {
        if (aVar != null) {
            aVar.b();
        }
    }

    private void d(a aVar) {
        if (aVar != null) {
            aVar.onStart();
        }
    }

    @Override // android.app.Fragment
    public void onActivityCreated(Bundle bundle) {
        super.onActivityCreated(bundle);
        b(this.f792c);
        a(a.EnumC0027a.ON_CREATE);
    }

    @Override // android.app.Fragment
    public void onDestroy() {
        super.onDestroy();
        a(a.EnumC0027a.ON_DESTROY);
        this.f792c = null;
    }

    @Override // android.app.Fragment
    public void onPause() {
        super.onPause();
        a(a.EnumC0027a.ON_PAUSE);
    }

    @Override // android.app.Fragment
    public void onResume() {
        super.onResume();
        c(this.f792c);
        a(a.EnumC0027a.ON_RESUME);
    }

    @Override // android.app.Fragment
    public void onStart() {
        super.onStart();
        d(this.f792c);
        a(a.EnumC0027a.ON_START);
    }

    @Override // android.app.Fragment
    public void onStop() {
        super.onStop();
        a(a.EnumC0027a.ON_STOP);
    }
}
