package o; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import android.util.Log; import com.google.android.gms.tasks.Task; import com.google.android.gms.tasks.Tasks; import com.google.android.play.core.install.InstallException; import java.util.Map; /* loaded from: classes.dex */ final class OAW { iNu a; final String c; final C3296aup e; private final Context i; static final yax d = new yax("AppUpdateService"); private static final Intent b = new Intent("com.google.android.play.core.install.BIND_UPDATE_SERVICE").setPackage("com.android.vending"); /* JADX INFO: Access modifiers changed from: package-private */ public OAW(Context context, C3296aup c3296aup) { this.c = context.getPackageName(); this.i = context; this.e = c3296aup; if (C17581xvw.e(context)) { Context applicationContext = context.getApplicationContext(); this.a = new iNu(applicationContext != null ? applicationContext : context, d, b, zcQ.d); } } /* JADX INFO: Access modifiers changed from: package-private */ public static /* synthetic */ Bundle Nv_(OAW oaw, String str) { Integer num; Bundle bundle = new Bundle(); bundle.putAll(Nw_()); bundle.putString("package.name", str); try { num = Integer.valueOf(oaw.i.getPackageManager().getPackageInfo(oaw.i.getPackageName(), 0).versionCode); } catch (PackageManager.NameNotFoundException unused) { yax yaxVar = d; Object[] objArr = new Object[0]; if (Log.isLoggable("PlayCore", 6)) { yax.d(yaxVar.d, "The current version of the app could not be retrieved", objArr); } num = null; } if (num != null) { bundle.putInt("app.version.code", num.intValue()); } return bundle; } /* JADX INFO: Access modifiers changed from: package-private */ public static Bundle Nw_() { Bundle bundle = new Bundle(); Bundle bundle2 = new Bundle(); Map c = TLK.c(); bundle2.putInt("playcore_version_code", ((Integer) c.get("java")).intValue()); if (c.containsKey("native")) { bundle2.putInt("playcore_native_version", ((Integer) c.get("native")).intValue()); } if (c.containsKey("unity")) { bundle2.putInt("playcore_unity_version", ((Integer) c.get("unity")).intValue()); } bundle.putAll(bundle2); bundle.putInt("playcore.version.code", 11004); return bundle; } /* JADX INFO: Access modifiers changed from: package-private */ public static Task d() { yax yaxVar = d; Object[] objArr = {-9}; if (Log.isLoggable("PlayCore", 6)) { yax.d(yaxVar.d, "onError(%d)", objArr); } return Tasks.forException(new InstallException(-9)); } }