package io.flutter.plugins.pathprovider;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import defpackage.e;
import ed.h;
import ed.i;
import java.io.File;
import java.util.ArrayList;

/* JADX INFO: loaded from: classes.dex */
public interface b {
    static void setUp(@NonNull i iVar, @Nullable b bVar) {
        setUp(iVar, "", bVar);
    }

    @Nullable
    String getApplicationCachePath();

    @Nullable
    String getApplicationDocumentsPath();

    @Nullable
    String getApplicationSupportPath();

    @Nullable
    String getExternalStoragePath();

    @Nullable
    String getTemporaryPath();

    static void setUp(@NonNull i iVar, @NonNull String str, @Nullable final b bVar) {
        String strConcat = str.isEmpty() ? "" : ".".concat(str);
        h hVarB = iVar.b();
        String strI = e.i("dev.flutter.pigeon.path_provider_android.PathProviderApi.getTemporaryPath", strConcat);
        c cVar = c.f28272d;
        ed.e eVar = new ed.e(iVar, strI, cVar, hVarB);
        if (bVar != null) {
            final int i10 = 0;
            eVar.setMessageHandler(new ed.c(bVar) { // from class: io.flutter.plugins.pathprovider.a

                /* JADX INFO: renamed from: b, reason: collision with root package name */
                public final /* synthetic */ b f28271b;

                {
                    this.f28271b = bVar;
                }

                @Override // ed.c
                public final void onMessage(Object obj, ed.d dVar) {
                    int i11 = i10;
                    b bVar2 = this.f28271b;
                    switch (i11) {
                        case 0:
                            ArrayList arrayList = new ArrayList();
                            try {
                                arrayList.add(0, bVar2.getTemporaryPath());
                            } catch (Throwable th) {
                                arrayList = hb.a.H0(th);
                            }
                            dVar.reply(arrayList);
                            break;
                        case 1:
                            ArrayList arrayList2 = new ArrayList();
                            try {
                                arrayList2.add(0, bVar2.getApplicationSupportPath());
                            } catch (Throwable th2) {
                                arrayList2 = hb.a.H0(th2);
                            }
                            dVar.reply(arrayList2);
                            break;
                        case 2:
                            ArrayList arrayList3 = new ArrayList();
                            try {
                                arrayList3.add(0, bVar2.getApplicationDocumentsPath());
                            } catch (Throwable th3) {
                                arrayList3 = hb.a.H0(th3);
                            }
                            dVar.reply(arrayList3);
                            break;
                        case 3:
                            ArrayList arrayList4 = new ArrayList();
                            try {
                                arrayList4.add(0, bVar2.getApplicationCachePath());
                            } catch (Throwable th4) {
                                arrayList4 = hb.a.H0(th4);
                            }
                            dVar.reply(arrayList4);
                            break;
                        case 4:
                            ArrayList arrayList5 = new ArrayList();
                            try {
                                arrayList5.add(0, bVar2.getExternalStoragePath());
                            } catch (Throwable th5) {
                                arrayList5 = hb.a.H0(th5);
                            }
                            dVar.reply(arrayList5);
                            break;
                        case 5:
                            ArrayList arrayList6 = new ArrayList();
                            try {
                                d dVar2 = (d) bVar2;
                                dVar2.getClass();
                                ArrayList arrayList7 = new ArrayList();
                                for (File file : dVar2.f28273a.getExternalCacheDirs()) {
                                    if (file != null) {
                                        arrayList7.add(file.getAbsolutePath());
                                    }
                                }
                                arrayList6.add(0, arrayList7);
                            } catch (Throwable th6) {
                                arrayList6 = hb.a.H0(th6);
                            }
                            dVar.reply(arrayList6);
                            break;
                        default:
                            ArrayList arrayList8 = new ArrayList();
                            try {
                                arrayList8.add(0, ((d) bVar2).a((Messages$StorageDirectory) ((ArrayList) obj).get(0)));
                            } catch (Throwable th7) {
                                arrayList8 = hb.a.H0(th7);
                            }
                            dVar.reply(arrayList8);
                            break;
                    }
                }
            });
        } else {
            eVar.setMessageHandler(null);
        }
        ed.e eVar2 = new ed.e(iVar, e.i("dev.flutter.pigeon.path_provider_android.PathProviderApi.getApplicationSupportPath", strConcat), cVar, iVar.b());
        if (bVar != null) {
            final int i11 = 1;
            eVar2.setMessageHandler(new ed.c(bVar) { // from class: io.flutter.plugins.pathprovider.a

                /* JADX INFO: renamed from: b, reason: collision with root package name */
                public final /* synthetic */ b f28271b;

                {
                    this.f28271b = bVar;
                }

                @Override // ed.c
                public final void onMessage(Object obj, ed.d dVar) {
                    int i112 = i11;
                    b bVar2 = this.f28271b;
                    switch (i112) {
                        case 0:
                            ArrayList arrayList = new ArrayList();
                            try {
                                arrayList.add(0, bVar2.getTemporaryPath());
                            } catch (Throwable th) {
                                arrayList = hb.a.H0(th);
                            }
                            dVar.reply(arrayList);
                            break;
                        case 1:
                            ArrayList arrayList2 = new ArrayList();
                            try {
                                arrayList2.add(0, bVar2.getApplicationSupportPath());
                            } catch (Throwable th2) {
                                arrayList2 = hb.a.H0(th2);
                            }
                            dVar.reply(arrayList2);
                            break;
                        case 2:
                            ArrayList arrayList3 = new ArrayList();
                            try {
                                arrayList3.add(0, bVar2.getApplicationDocumentsPath());
                            } catch (Throwable th3) {
                                arrayList3 = hb.a.H0(th3);
                            }
                            dVar.reply(arrayList3);
                            break;
                        case 3:
                            ArrayList arrayList4 = new ArrayList();
                            try {
                                arrayList4.add(0, bVar2.getApplicationCachePath());
                            } catch (Throwable th4) {
                                arrayList4 = hb.a.H0(th4);
                            }
                            dVar.reply(arrayList4);
                            break;
                        case 4:
                            ArrayList arrayList5 = new ArrayList();
                            try {
                                arrayList5.add(0, bVar2.getExternalStoragePath());
                            } catch (Throwable th5) {
                                arrayList5 = hb.a.H0(th5);
                            }
                            dVar.reply(arrayList5);
                            break;
                        case 5:
                            ArrayList arrayList6 = new ArrayList();
                            try {
                                d dVar2 = (d) bVar2;
                                dVar2.getClass();
                                ArrayList arrayList7 = new ArrayList();
                                for (File file : dVar2.f28273a.getExternalCacheDirs()) {
                                    if (file != null) {
                                        arrayList7.add(file.getAbsolutePath());
                                    }
                                }
                                arrayList6.add(0, arrayList7);
                            } catch (Throwable th6) {
                                arrayList6 = hb.a.H0(th6);
                            }
                            dVar.reply(arrayList6);
                            break;
                        default:
                            ArrayList arrayList8 = new ArrayList();
                            try {
                                arrayList8.add(0, ((d) bVar2).a((Messages$StorageDirectory) ((ArrayList) obj).get(0)));
                            } catch (Throwable th7) {
                                arrayList8 = hb.a.H0(th7);
                            }
                            dVar.reply(arrayList8);
                            break;
                    }
                }
            });
        } else {
            eVar2.setMessageHandler(null);
        }
        ed.e eVar3 = new ed.e(iVar, e.i("dev.flutter.pigeon.path_provider_android.PathProviderApi.getApplicationDocumentsPath", strConcat), cVar, iVar.b());
        if (bVar != null) {
            final int i12 = 2;
            eVar3.setMessageHandler(new ed.c(bVar) { // from class: io.flutter.plugins.pathprovider.a

                /* JADX INFO: renamed from: b, reason: collision with root package name */
                public final /* synthetic */ b f28271b;

                {
                    this.f28271b = bVar;
                }

                @Override // ed.c
                public final void onMessage(Object obj, ed.d dVar) {
                    int i112 = i12;
                    b bVar2 = this.f28271b;
                    switch (i112) {
                        case 0:
                            ArrayList arrayList = new ArrayList();
                            try {
                                arrayList.add(0, bVar2.getTemporaryPath());
                            } catch (Throwable th) {
                                arrayList = hb.a.H0(th);
                            }
                            dVar.reply(arrayList);
                            break;
                        case 1:
                            ArrayList arrayList2 = new ArrayList();
                            try {
                                arrayList2.add(0, bVar2.getApplicationSupportPath());
                            } catch (Throwable th2) {
                                arrayList2 = hb.a.H0(th2);
                            }
                            dVar.reply(arrayList2);
                            break;
                        case 2:
                            ArrayList arrayList3 = new ArrayList();
                            try {
                                arrayList3.add(0, bVar2.getApplicationDocumentsPath());
                            } catch (Throwable th3) {
                                arrayList3 = hb.a.H0(th3);
                            }
                            dVar.reply(arrayList3);
                            break;
                        case 3:
                            ArrayList arrayList4 = new ArrayList();
                            try {
                                arrayList4.add(0, bVar2.getApplicationCachePath());
                            } catch (Throwable th4) {
                                arrayList4 = hb.a.H0(th4);
                            }
                            dVar.reply(arrayList4);
                            break;
                        case 4:
                            ArrayList arrayList5 = new ArrayList();
                            try {
                                arrayList5.add(0, bVar2.getExternalStoragePath());
                            } catch (Throwable th5) {
                                arrayList5 = hb.a.H0(th5);
                            }
                            dVar.reply(arrayList5);
                            break;
                        case 5:
                            ArrayList arrayList6 = new ArrayList();
                            try {
                                d dVar2 = (d) bVar2;
                                dVar2.getClass();
                                ArrayList arrayList7 = new ArrayList();
                                for (File file : dVar2.f28273a.getExternalCacheDirs()) {
                                    if (file != null) {
                                        arrayList7.add(file.getAbsolutePath());
                                    }
                                }
                                arrayList6.add(0, arrayList7);
                            } catch (Throwable th6) {
                                arrayList6 = hb.a.H0(th6);
                            }
                            dVar.reply(arrayList6);
                            break;
                        default:
                            ArrayList arrayList8 = new ArrayList();
                            try {
                                arrayList8.add(0, ((d) bVar2).a((Messages$StorageDirectory) ((ArrayList) obj).get(0)));
                            } catch (Throwable th7) {
                                arrayList8 = hb.a.H0(th7);
                            }
                            dVar.reply(arrayList8);
                            break;
                    }
                }
            });
        } else {
            eVar3.setMessageHandler(null);
        }
        ed.e eVar4 = new ed.e(iVar, e.i("dev.flutter.pigeon.path_provider_android.PathProviderApi.getApplicationCachePath", strConcat), cVar, iVar.b());
        if (bVar != null) {
            final int i13 = 3;
            eVar4.setMessageHandler(new ed.c(bVar) { // from class: io.flutter.plugins.pathprovider.a

                /* JADX INFO: renamed from: b, reason: collision with root package name */
                public final /* synthetic */ b f28271b;

                {
                    this.f28271b = bVar;
                }

                @Override // ed.c
                public final void onMessage(Object obj, ed.d dVar) {
                    int i112 = i13;
                    b bVar2 = this.f28271b;
                    switch (i112) {
                        case 0:
                            ArrayList arrayList = new ArrayList();
                            try {
                                arrayList.add(0, bVar2.getTemporaryPath());
                            } catch (Throwable th) {
                                arrayList = hb.a.H0(th);
                            }
                            dVar.reply(arrayList);
                            break;
                        case 1:
                            ArrayList arrayList2 = new ArrayList();
                            try {
                                arrayList2.add(0, bVar2.getApplicationSupportPath());
                            } catch (Throwable th2) {
                                arrayList2 = hb.a.H0(th2);
                            }
                            dVar.reply(arrayList2);
                            break;
                        case 2:
                            ArrayList arrayList3 = new ArrayList();
                            try {
                                arrayList3.add(0, bVar2.getApplicationDocumentsPath());
                            } catch (Throwable th3) {
                                arrayList3 = hb.a.H0(th3);
                            }
                            dVar.reply(arrayList3);
                            break;
                        case 3:
                            ArrayList arrayList4 = new ArrayList();
                            try {
                                arrayList4.add(0, bVar2.getApplicationCachePath());
                            } catch (Throwable th4) {
                                arrayList4 = hb.a.H0(th4);
                            }
                            dVar.reply(arrayList4);
                            break;
                        case 4:
                            ArrayList arrayList5 = new ArrayList();
                            try {
                                arrayList5.add(0, bVar2.getExternalStoragePath());
                            } catch (Throwable th5) {
                                arrayList5 = hb.a.H0(th5);
                            }
                            dVar.reply(arrayList5);
                            break;
                        case 5:
                            ArrayList arrayList6 = new ArrayList();
                            try {
                                d dVar2 = (d) bVar2;
                                dVar2.getClass();
                                ArrayList arrayList7 = new ArrayList();
                                for (File file : dVar2.f28273a.getExternalCacheDirs()) {
                                    if (file != null) {
                                        arrayList7.add(file.getAbsolutePath());
                                    }
                                }
                                arrayList6.add(0, arrayList7);
                            } catch (Throwable th6) {
                                arrayList6 = hb.a.H0(th6);
                            }
                            dVar.reply(arrayList6);
                            break;
                        default:
                            ArrayList arrayList8 = new ArrayList();
                            try {
                                arrayList8.add(0, ((d) bVar2).a((Messages$StorageDirectory) ((ArrayList) obj).get(0)));
                            } catch (Throwable th7) {
                                arrayList8 = hb.a.H0(th7);
                            }
                            dVar.reply(arrayList8);
                            break;
                    }
                }
            });
        } else {
            eVar4.setMessageHandler(null);
        }
        ed.e eVar5 = new ed.e(iVar, e.i("dev.flutter.pigeon.path_provider_android.PathProviderApi.getExternalStoragePath", strConcat), cVar, iVar.b());
        if (bVar != null) {
            final int i14 = 4;
            eVar5.setMessageHandler(new ed.c(bVar) { // from class: io.flutter.plugins.pathprovider.a

                /* JADX INFO: renamed from: b, reason: collision with root package name */
                public final /* synthetic */ b f28271b;

                {
                    this.f28271b = bVar;
                }

                @Override // ed.c
                public final void onMessage(Object obj, ed.d dVar) {
                    int i112 = i14;
                    b bVar2 = this.f28271b;
                    switch (i112) {
                        case 0:
                            ArrayList arrayList = new ArrayList();
                            try {
                                arrayList.add(0, bVar2.getTemporaryPath());
                            } catch (Throwable th) {
                                arrayList = hb.a.H0(th);
                            }
                            dVar.reply(arrayList);
                            break;
                        case 1:
                            ArrayList arrayList2 = new ArrayList();
                            try {
                                arrayList2.add(0, bVar2.getApplicationSupportPath());
                            } catch (Throwable th2) {
                                arrayList2 = hb.a.H0(th2);
                            }
                            dVar.reply(arrayList2);
                            break;
                        case 2:
                            ArrayList arrayList3 = new ArrayList();
                            try {
                                arrayList3.add(0, bVar2.getApplicationDocumentsPath());
                            } catch (Throwable th3) {
                                arrayList3 = hb.a.H0(th3);
                            }
                            dVar.reply(arrayList3);
                            break;
                        case 3:
                            ArrayList arrayList4 = new ArrayList();
                            try {
                                arrayList4.add(0, bVar2.getApplicationCachePath());
                            } catch (Throwable th4) {
                                arrayList4 = hb.a.H0(th4);
                            }
                            dVar.reply(arrayList4);
                            break;
                        case 4:
                            ArrayList arrayList5 = new ArrayList();
                            try {
                                arrayList5.add(0, bVar2.getExternalStoragePath());
                            } catch (Throwable th5) {
                                arrayList5 = hb.a.H0(th5);
                            }
                            dVar.reply(arrayList5);
                            break;
                        case 5:
                            ArrayList arrayList6 = new ArrayList();
                            try {
                                d dVar2 = (d) bVar2;
                                dVar2.getClass();
                                ArrayList arrayList7 = new ArrayList();
                                for (File file : dVar2.f28273a.getExternalCacheDirs()) {
                                    if (file != null) {
                                        arrayList7.add(file.getAbsolutePath());
                                    }
                                }
                                arrayList6.add(0, arrayList7);
                            } catch (Throwable th6) {
                                arrayList6 = hb.a.H0(th6);
                            }
                            dVar.reply(arrayList6);
                            break;
                        default:
                            ArrayList arrayList8 = new ArrayList();
                            try {
                                arrayList8.add(0, ((d) bVar2).a((Messages$StorageDirectory) ((ArrayList) obj).get(0)));
                            } catch (Throwable th7) {
                                arrayList8 = hb.a.H0(th7);
                            }
                            dVar.reply(arrayList8);
                            break;
                    }
                }
            });
        } else {
            eVar5.setMessageHandler(null);
        }
        ed.e eVar6 = new ed.e(iVar, e.i("dev.flutter.pigeon.path_provider_android.PathProviderApi.getExternalCachePaths", strConcat), cVar, iVar.b());
        if (bVar != null) {
            final int i15 = 5;
            eVar6.setMessageHandler(new ed.c(bVar) { // from class: io.flutter.plugins.pathprovider.a

                /* JADX INFO: renamed from: b, reason: collision with root package name */
                public final /* synthetic */ b f28271b;

                {
                    this.f28271b = bVar;
                }

                @Override // ed.c
                public final void onMessage(Object obj, ed.d dVar) {
                    int i112 = i15;
                    b bVar2 = this.f28271b;
                    switch (i112) {
                        case 0:
                            ArrayList arrayList = new ArrayList();
                            try {
                                arrayList.add(0, bVar2.getTemporaryPath());
                            } catch (Throwable th) {
                                arrayList = hb.a.H0(th);
                            }
                            dVar.reply(arrayList);
                            break;
                        case 1:
                            ArrayList arrayList2 = new ArrayList();
                            try {
                                arrayList2.add(0, bVar2.getApplicationSupportPath());
                            } catch (Throwable th2) {
                                arrayList2 = hb.a.H0(th2);
                            }
                            dVar.reply(arrayList2);
                            break;
                        case 2:
                            ArrayList arrayList3 = new ArrayList();
                            try {
                                arrayList3.add(0, bVar2.getApplicationDocumentsPath());
                            } catch (Throwable th3) {
                                arrayList3 = hb.a.H0(th3);
                            }
                            dVar.reply(arrayList3);
                            break;
                        case 3:
                            ArrayList arrayList4 = new ArrayList();
                            try {
                                arrayList4.add(0, bVar2.getApplicationCachePath());
                            } catch (Throwable th4) {
                                arrayList4 = hb.a.H0(th4);
                            }
                            dVar.reply(arrayList4);
                            break;
                        case 4:
                            ArrayList arrayList5 = new ArrayList();
                            try {
                                arrayList5.add(0, bVar2.getExternalStoragePath());
                            } catch (Throwable th5) {
                                arrayList5 = hb.a.H0(th5);
                            }
                            dVar.reply(arrayList5);
                            break;
                        case 5:
                            ArrayList arrayList6 = new ArrayList();
                            try {
                                d dVar2 = (d) bVar2;
                                dVar2.getClass();
                                ArrayList arrayList7 = new ArrayList();
                                for (File file : dVar2.f28273a.getExternalCacheDirs()) {
                                    if (file != null) {
                                        arrayList7.add(file.getAbsolutePath());
                                    }
                                }
                                arrayList6.add(0, arrayList7);
                            } catch (Throwable th6) {
                                arrayList6 = hb.a.H0(th6);
                            }
                            dVar.reply(arrayList6);
                            break;
                        default:
                            ArrayList arrayList8 = new ArrayList();
                            try {
                                arrayList8.add(0, ((d) bVar2).a((Messages$StorageDirectory) ((ArrayList) obj).get(0)));
                            } catch (Throwable th7) {
                                arrayList8 = hb.a.H0(th7);
                            }
                            dVar.reply(arrayList8);
                            break;
                    }
                }
            });
        } else {
            eVar6.setMessageHandler(null);
        }
        ed.e eVar7 = new ed.e(iVar, e.i("dev.flutter.pigeon.path_provider_android.PathProviderApi.getExternalStoragePaths", strConcat), cVar, iVar.b());
        if (bVar == null) {
            eVar7.setMessageHandler(null);
        } else {
            final int i16 = 6;
            eVar7.setMessageHandler(new ed.c(bVar) { // from class: io.flutter.plugins.pathprovider.a

                /* JADX INFO: renamed from: b, reason: collision with root package name */
                public final /* synthetic */ b f28271b;

                {
                    this.f28271b = bVar;
                }

                @Override // ed.c
                public final void onMessage(Object obj, ed.d dVar) {
                    int i112 = i16;
                    b bVar2 = this.f28271b;
                    switch (i112) {
                        case 0:
                            ArrayList arrayList = new ArrayList();
                            try {
                                arrayList.add(0, bVar2.getTemporaryPath());
                            } catch (Throwable th) {
                                arrayList = hb.a.H0(th);
                            }
                            dVar.reply(arrayList);
                            break;
                        case 1:
                            ArrayList arrayList2 = new ArrayList();
                            try {
                                arrayList2.add(0, bVar2.getApplicationSupportPath());
                            } catch (Throwable th2) {
                                arrayList2 = hb.a.H0(th2);
                            }
                            dVar.reply(arrayList2);
                            break;
                        case 2:
                            ArrayList arrayList3 = new ArrayList();
                            try {
                                arrayList3.add(0, bVar2.getApplicationDocumentsPath());
                            } catch (Throwable th3) {
                                arrayList3 = hb.a.H0(th3);
                            }
                            dVar.reply(arrayList3);
                            break;
                        case 3:
                            ArrayList arrayList4 = new ArrayList();
                            try {
                                arrayList4.add(0, bVar2.getApplicationCachePath());
                            } catch (Throwable th4) {
                                arrayList4 = hb.a.H0(th4);
                            }
                            dVar.reply(arrayList4);
                            break;
                        case 4:
                            ArrayList arrayList5 = new ArrayList();
                            try {
                                arrayList5.add(0, bVar2.getExternalStoragePath());
                            } catch (Throwable th5) {
                                arrayList5 = hb.a.H0(th5);
                            }
                            dVar.reply(arrayList5);
                            break;
                        case 5:
                            ArrayList arrayList6 = new ArrayList();
                            try {
                                d dVar2 = (d) bVar2;
                                dVar2.getClass();
                                ArrayList arrayList7 = new ArrayList();
                                for (File file : dVar2.f28273a.getExternalCacheDirs()) {
                                    if (file != null) {
                                        arrayList7.add(file.getAbsolutePath());
                                    }
                                }
                                arrayList6.add(0, arrayList7);
                            } catch (Throwable th6) {
                                arrayList6 = hb.a.H0(th6);
                            }
                            dVar.reply(arrayList6);
                            break;
                        default:
                            ArrayList arrayList8 = new ArrayList();
                            try {
                                arrayList8.add(0, ((d) bVar2).a((Messages$StorageDirectory) ((ArrayList) obj).get(0)));
                            } catch (Throwable th7) {
                                arrayList8 = hb.a.H0(th7);
                            }
                            dVar.reply(arrayList8);
                            break;
                    }
                }
            });
        }
    }
}
