package o; import androidx.fragment.app.FragmentActivity; import com.scb.phone.view.fragment.chubb.ChubbPaySuccessFragment; import java.lang.ref.WeakReference; /* renamed from: o.eNg, reason: case insensitive filesystem */ /* loaded from: classes5.dex */ public final class C10742eNg { private static InterfaceC15579guf b; private static InterfaceC15579guf d; private static final String[] c = {"android.permission.WRITE_EXTERNAL_STORAGE"}; private static final String[] a = {"android.permission.READ_MEDIA_IMAGES"}; public static void b(ChubbPaySuccessFragment chubbPaySuccessFragment, boolean z) { FragmentActivity requireActivity = chubbPaySuccessFragment.requireActivity(); String[] strArr = c; if (C15581guh.b(requireActivity, strArr)) { chubbPaySuccessFragment.a(z); return; } b = new RVV(chubbPaySuccessFragment, z, (byte) 0); if (C15581guh.e(chubbPaySuccessFragment, strArr)) { chubbPaySuccessFragment.e(b); } else { chubbPaySuccessFragment.requestPermissions(strArr, 23); } } public static void e(ChubbPaySuccessFragment chubbPaySuccessFragment, boolean z) { FragmentActivity requireActivity = chubbPaySuccessFragment.requireActivity(); String[] strArr = a; if (!C15581guh.b(requireActivity, strArr)) { d = new LWm(chubbPaySuccessFragment, z, (byte) 0); if (!C15581guh.e(chubbPaySuccessFragment, strArr)) { chubbPaySuccessFragment.requestPermissions(strArr, 24); return; } InterfaceC15579guf interfaceC15579guf = d; guQ.b("onShowRationaleAndroid13", new Object[0]); chubbPaySuccessFragment.e(interfaceC15579guf); return; } chubbPaySuccessFragment.a(z); } public static void c(ChubbPaySuccessFragment chubbPaySuccessFragment, int i, int[] iArr) { if (i == 23) { if (C15581guh.d(iArr)) { InterfaceC15579guf interfaceC15579guf = b; if (interfaceC15579guf != null) { interfaceC15579guf.a(); } } else if (!C15581guh.e(chubbPaySuccessFragment, c)) { ChubbPaySuccessFragment.w(); } else { ChubbPaySuccessFragment.B(); } b = null; return; } if (i == 24) { if (C15581guh.d(iArr)) { InterfaceC15579guf interfaceC15579guf2 = d; if (interfaceC15579guf2 != null) { interfaceC15579guf2.a(); } } else if (!C15581guh.e(chubbPaySuccessFragment, a)) { ChubbPaySuccessFragment.C(); } else { ChubbPaySuccessFragment.z(); } d = null; } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.eNg$RVV */ /* loaded from: classes5.dex */ public static final class RVV implements InterfaceC15579guf { private final WeakReference b; private final boolean c; private RVV(ChubbPaySuccessFragment chubbPaySuccessFragment, boolean z) { this.b = new WeakReference<>(chubbPaySuccessFragment); this.c = z; } @Override // o.InterfaceC15577gud public final void c() { ChubbPaySuccessFragment chubbPaySuccessFragment = this.b.get(); if (chubbPaySuccessFragment == null) { return; } chubbPaySuccessFragment.requestPermissions(C10742eNg.c, 23); } @Override // o.InterfaceC15577gud public final void e() { if (this.b.get() == null) { return; } ChubbPaySuccessFragment.B(); } @Override // o.InterfaceC15579guf public final void a() { ChubbPaySuccessFragment chubbPaySuccessFragment = this.b.get(); if (chubbPaySuccessFragment == null) { return; } chubbPaySuccessFragment.a(this.c); } /* synthetic */ RVV(ChubbPaySuccessFragment chubbPaySuccessFragment, boolean z, byte b) { this(chubbPaySuccessFragment, z); } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.eNg$LWm */ /* loaded from: classes5.dex */ public static final class LWm implements InterfaceC15579guf { private final WeakReference a; private final boolean e; private LWm(ChubbPaySuccessFragment chubbPaySuccessFragment, boolean z) { this.a = new WeakReference<>(chubbPaySuccessFragment); this.e = z; } @Override // o.InterfaceC15577gud public final void c() { ChubbPaySuccessFragment chubbPaySuccessFragment = this.a.get(); if (chubbPaySuccessFragment == null) { return; } chubbPaySuccessFragment.requestPermissions(C10742eNg.a, 24); } @Override // o.InterfaceC15577gud public final void e() { if (this.a.get() == null) { return; } ChubbPaySuccessFragment.z(); } @Override // o.InterfaceC15579guf public final void a() { ChubbPaySuccessFragment chubbPaySuccessFragment = this.a.get(); if (chubbPaySuccessFragment == null) { return; } chubbPaySuccessFragment.a(this.e); } /* synthetic */ LWm(ChubbPaySuccessFragment chubbPaySuccessFragment, boolean z, byte b) { this(chubbPaySuccessFragment, z); } } }