package com.google.android.play.core.assetpacks; import java.io.File; import java.util.concurrent.Executor; /* loaded from: classes2.dex */ final class y2 { /* renamed from: a, reason: collision with root package name */ private final e0 f5166a; /* renamed from: b, reason: collision with root package name */ private final w1 f5167b; /* renamed from: c, reason: collision with root package name */ private final h1 f5168c; /* renamed from: d, reason: collision with root package name */ private final r3.o f5169d; /* renamed from: e, reason: collision with root package name */ private final r3.o f5170e; y2(e0 e0Var, r3.o oVar, w1 w1Var, r3.o oVar2, h1 h1Var) { this.f5166a = e0Var; this.f5169d = oVar; this.f5167b = w1Var; this.f5170e = oVar2; this.f5168c = h1Var; } public final void a(final w2 w2Var) { File t10 = this.f5166a.t(w2Var.f5165b, w2Var.f5127c, w2Var.f5129e); if (!t10.exists()) { throw new d1(String.format("Cannot find pack files to promote for pack %s at %s", w2Var.f5165b, t10.getAbsolutePath()), w2Var.f5164a); } File t11 = this.f5166a.t(w2Var.f5165b, w2Var.f5128d, w2Var.f5129e); t11.mkdirs(); if (!t10.renameTo(t11)) { throw new d1(String.format("Cannot promote pack %s from %s to %s", w2Var.f5165b, t10.getAbsolutePath(), t11.getAbsolutePath()), w2Var.f5164a); } ((Executor) this.f5170e.a()).execute(new Runnable() { // from class: com.google.android.play.core.assetpacks.x2 @Override // java.lang.Runnable public final void run() { y2.this.b(w2Var); } }); this.f5167b.i(w2Var.f5165b, w2Var.f5128d, w2Var.f5129e); this.f5168c.c(w2Var.f5165b); ((t3) this.f5169d.a()).b(w2Var.f5164a, w2Var.f5165b); } final /* synthetic */ void b(w2 w2Var) { this.f5166a.b(w2Var.f5165b, w2Var.f5128d, w2Var.f5129e); } }