package com.google.android.play.core.assetpacks; import android.content.Context; import android.content.pm.PackageManager; /* loaded from: classes2.dex */ final class r2 { /* renamed from: c, reason: collision with root package name */ private static final r3.h0 f5032c = new r3.h0("PackageStateCache"); /* renamed from: a, reason: collision with root package name */ private final Context f5033a; /* renamed from: b, reason: collision with root package name */ private int f5034b = -1; r2(Context context) { this.f5033a = context; } public final synchronized int a() { if (this.f5034b == -1) { try { this.f5034b = this.f5033a.getPackageManager().getPackageInfo(this.f5033a.getPackageName(), 0).versionCode; } catch (PackageManager.NameNotFoundException unused) { f5032c.b("The current version of the app could not be retrieved", new Object[0]); } } return this.f5034b; } }