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;

/* JADX INFO: renamed from: ᵧʠ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class C3626 implements InterfaceC4422 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final /* synthetic */ C4735 f13751;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final /* synthetic */ int f13752;

    public /* synthetic */ C3626(C4735 c4735, int i) {
        this.f13752 = i;
        this.f13751 = c4735;
    }

    @Override // defpackage.InterfaceC4422
    public final ListenableFuture apply(Object obj) throws IOException {
        ListenableFuture listenableFuture;
        int i = this.f13752;
        C4735 c4735 = this.f13751;
        switch (i) {
            case 0:
                synchronized (c4735.f17999) {
                    listenableFuture = (ListenableFuture) c4735.f18002;
                    break;
                }
                return listenableFuture;
            case 1:
                return AbstractC4226.m9197(c4735.m9897((Uri) AbstractC4226.m9192((ListenableFuture) c4735.f18005)));
            case 2:
                c4735.m9900((Uri) AbstractC4226.m9192((ListenableFuture) c4735.f18005), obj);
                return C1453.f5917;
            default:
                Uri uri = (Uri) obj;
                Uri uriBuild = uri.buildUpon().path(String.valueOf(uri.getPath()).concat(".bak")).build();
                try {
                    C0355 c0355 = (C0355) c4735.f18001;
                    C5339 c5339M1675 = c0355.m1675(uriBuild);
                    if (c5339M1675.f20139.mo1412(c5339M1675.f20140)) {
                        C5339 c5339M16752 = c0355.m1675(uriBuild);
                        C5339 c5339M16753 = c0355.m1675(uri);
                        InterfaceC4309 interfaceC4309 = c5339M16752.f20139;
                        if (interfaceC4309 != c5339M16753.f20139) {
                            throw new zzsk("Cannot rename file across backends");
                        }
                        interfaceC4309.mo9227(c5339M16752.f20140, c5339M16753.f20140);
                    }
                    return C1453.f5917;
                } catch (IOException e) {
                    return AbstractC4226.m9193(e);
                }
        }
    }
}
