42 lines
1.4 KiB
Java
42 lines
1.4 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.pm.PackageInfo;
|
||
|
import android.content.pm.PackageManager;
|
||
|
import java.util.UUID;
|
||
|
import java.util.concurrent.ConcurrentHashMap;
|
||
|
import java.util.concurrent.ConcurrentMap;
|
||
|
|
||
|
/* renamed from: o.pNu, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class C16560pNu {
|
||
|
private static final ConcurrentMap<String, InterfaceC2545agd> e = new ConcurrentHashMap();
|
||
|
|
||
|
public static InterfaceC2545agd b(Context context) {
|
||
|
String obj;
|
||
|
String packageName = context.getPackageName();
|
||
|
ConcurrentMap<String, InterfaceC2545agd> concurrentMap = e;
|
||
|
InterfaceC2545agd interfaceC2545agd = concurrentMap.get(packageName);
|
||
|
if (interfaceC2545agd != null) {
|
||
|
return interfaceC2545agd;
|
||
|
}
|
||
|
PackageInfo FV_ = FV_(context);
|
||
|
if (FV_ != null) {
|
||
|
obj = String.valueOf(FV_.versionCode);
|
||
|
} else {
|
||
|
obj = UUID.randomUUID().toString();
|
||
|
}
|
||
|
xBn xbn = new xBn(obj);
|
||
|
InterfaceC2545agd putIfAbsent = concurrentMap.putIfAbsent(packageName, xbn);
|
||
|
return putIfAbsent != null ? putIfAbsent : xbn;
|
||
|
}
|
||
|
|
||
|
private static PackageInfo FV_(Context context) {
|
||
|
try {
|
||
|
return context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
|
||
|
} catch (PackageManager.NameNotFoundException unused) {
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
}
|