package androidx.lifecycle; import android.app.Activity; import android.app.Application; import android.app.Fragment; import android.app.FragmentManager; import android.os.Build; import android.os.Bundle; import o.InterfaceC16541pFg; import o.LPk; import o.OEq; import o.wdQ; /* loaded from: classes.dex */ public class ReportFragment extends Fragment { public RVV c; /* loaded from: classes.dex */ public interface RVV { void a(); void b(); } public static void zv_(Activity activity) { if (Build.VERSION.SDK_INT >= 29) { LWm.registerIn(activity); } FragmentManager fragmentManager = activity.getFragmentManager(); if (fragmentManager.findFragmentByTag("androidx.lifecycle.LifecycleDispatcher.report_fragment_tag") == null) { fragmentManager.beginTransaction().add(new ReportFragment(), "androidx.lifecycle.LifecycleDispatcher.report_fragment_tag").commit(); fragmentManager.executePendingTransactions(); } } /* JADX WARN: Multi-variable type inference failed */ static void zt_(Activity activity, wdQ.HBt hBt) { if (activity instanceof OEq) { LPk lifecycle = ((OEq) activity).getLifecycle(); lifecycle.d("handleLifecycleEvent"); lifecycle.d(hBt.a()); } else if (activity instanceof InterfaceC16541pFg) { wdQ lifecycle2 = ((InterfaceC16541pFg) activity).getLifecycle(); if (lifecycle2 instanceof LPk) { LPk lPk = (LPk) lifecycle2; lPk.d("handleLifecycleEvent"); lPk.d(hBt.a()); } } } public static ReportFragment zu_(Activity activity) { return (ReportFragment) activity.getFragmentManager().findFragmentByTag("androidx.lifecycle.LifecycleDispatcher.report_fragment_tag"); } @Override // android.app.Fragment public void onActivityCreated(Bundle bundle) { super.onActivityCreated(bundle); wdQ.HBt hBt = wdQ.HBt.ON_CREATE; if (Build.VERSION.SDK_INT < 29) { zt_(getActivity(), hBt); } } @Override // android.app.Fragment public void onStart() { super.onStart(); RVV rvv = this.c; if (rvv != null) { rvv.b(); } wdQ.HBt hBt = wdQ.HBt.ON_START; if (Build.VERSION.SDK_INT < 29) { zt_(getActivity(), hBt); } } @Override // android.app.Fragment public void onResume() { super.onResume(); RVV rvv = this.c; if (rvv != null) { rvv.a(); } wdQ.HBt hBt = wdQ.HBt.ON_RESUME; if (Build.VERSION.SDK_INT < 29) { zt_(getActivity(), hBt); } } @Override // android.app.Fragment public void onPause() { super.onPause(); wdQ.HBt hBt = wdQ.HBt.ON_PAUSE; if (Build.VERSION.SDK_INT < 29) { zt_(getActivity(), hBt); } } @Override // android.app.Fragment public void onStop() { super.onStop(); wdQ.HBt hBt = wdQ.HBt.ON_STOP; if (Build.VERSION.SDK_INT < 29) { zt_(getActivity(), hBt); } } @Override // android.app.Fragment public void onDestroy() { super.onDestroy(); wdQ.HBt hBt = wdQ.HBt.ON_DESTROY; if (Build.VERSION.SDK_INT < 29) { zt_(getActivity(), hBt); } this.c = null; } /* loaded from: classes.dex */ static class LWm implements Application.ActivityLifecycleCallbacks { @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityCreated(Activity activity, Bundle bundle) { } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityDestroyed(Activity activity) { } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityPaused(Activity activity) { } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityResumed(Activity activity) { } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivitySaveInstanceState(Activity activity, Bundle bundle) { } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityStarted(Activity activity) { } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityStopped(Activity activity) { } LWm() { } static void registerIn(Activity activity) { activity.registerActivityLifecycleCallbacks(new LWm()); } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityPostCreated(Activity activity, Bundle bundle) { ReportFragment.zt_(activity, wdQ.HBt.ON_CREATE); } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityPostStarted(Activity activity) { ReportFragment.zt_(activity, wdQ.HBt.ON_START); } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityPostResumed(Activity activity) { ReportFragment.zt_(activity, wdQ.HBt.ON_RESUME); } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityPrePaused(Activity activity) { ReportFragment.zt_(activity, wdQ.HBt.ON_PAUSE); } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityPreStopped(Activity activity) { ReportFragment.zt_(activity, wdQ.HBt.ON_STOP); } @Override // android.app.Application.ActivityLifecycleCallbacks public final void onActivityPreDestroyed(Activity activity) { ReportFragment.zt_(activity, wdQ.HBt.ON_DESTROY); } } @Override // android.app.Fragment public void onCreate(Bundle bundle) { super.onCreate(bundle); } }