package defpackage;

import android.net.Uri;
import com.google.android.gms.internal.measurement.zzsk;
import com.google.common.util.concurrent.ListenableFuture;
import java.io.IOException;

/* renamed from: ᵔᵴᵖᵾ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final /* synthetic */ class C2253 implements InterfaceC1293 {

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final /* synthetic */ int f8818;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final /* synthetic */ C3423 f8819;

    public /* synthetic */ C2253(C3423 c3423, int i) {
        this.f8818 = i;
        this.f8819 = c3423;
    }

    @Override // defpackage.InterfaceC1293
    public final ListenableFuture apply(Object obj) throws IOException {
        ListenableFuture listenableFuture;
        int i = this.f8818;
        C3423 c3423 = this.f8819;
        switch (i) {
            case 0:
                synchronized (c3423.f12732) {
                    listenableFuture = (ListenableFuture) c3423.f12731;
                }
                return listenableFuture;
            case 1:
                return AbstractC2725.m6770(c3423.m7786((Uri) AbstractC2725.m6769((ListenableFuture) c3423.f12733)));
            case 2:
                c3423.m7787((Uri) AbstractC2725.m6769((ListenableFuture) c3423.f12733), obj);
                return C0671.f3309;
            default:
                Uri uri = (Uri) obj;
                Uri uriBuild = uri.buildUpon().path(String.valueOf(uri.getPath()).concat(".bak")).build();
                try {
                    C1109 c1109 = (C1109) c3423.f12724;
                    C1770 c1770M3529 = c1109.m3529(uriBuild);
                    if (c1770M3529.f7146.mo2022(c1770M3529.f7148)) {
                        C1770 c1770M35292 = c1109.m3529(uriBuild);
                        C1770 c1770M35293 = c1109.m3529(uri);
                        InterfaceC3824 interfaceC3824 = c1770M35292.f7146;
                        if (interfaceC3824 != c1770M35293.f7146) {
                            throw new zzsk("Cannot rename file across backends");
                        }
                        interfaceC3824.mo2018(c1770M35292.f7148, c1770M35293.f7148);
                    }
                    return C0671.f3309;
                } catch (IOException e) {
                    return AbstractC2725.m6767(e);
                }
        }
    }
}
