50 lines
1.4 KiB
Java
50 lines
1.4 KiB
Java
package com.google.android.gms.internal.firebase_ml;
|
|
|
|
import android.graphics.Rect;
|
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class zzpm {
|
|
public static float zza(Float f) {
|
|
return f == null ? BitmapDescriptorFactory.HUE_RED : f.floatValue();
|
|
}
|
|
|
|
private static int zzb(Integer num) {
|
|
if (num == null) {
|
|
return 0;
|
|
}
|
|
return num.intValue();
|
|
}
|
|
|
|
public static Rect zza(zziv zzivVar, float f) {
|
|
if (zzivVar == null || zzivVar.zzhs() == null || zzivVar.zzhs().size() != 4) {
|
|
return null;
|
|
}
|
|
int i = Integer.MAX_VALUE;
|
|
int i2 = 0;
|
|
int i3 = 0;
|
|
int i4 = Integer.MAX_VALUE;
|
|
for (zzju zzjuVar : zzivVar.zzhs()) {
|
|
i = Math.min(zzb(zzjuVar.zzib()), i);
|
|
i4 = Math.min(zzb(zzjuVar.zzic()), i4);
|
|
i2 = Math.max(zzb(zzjuVar.zzib()), i2);
|
|
i3 = Math.max(zzb(zzjuVar.zzic()), i3);
|
|
}
|
|
return new Rect(Math.round(i * f), Math.round(i4 * f), Math.round(i2 * f), Math.round(i3 * f));
|
|
}
|
|
|
|
public static String zzch(String str) {
|
|
return str == null ? "" : str;
|
|
}
|
|
|
|
public static String zzbl(int i) {
|
|
if (i == 1) {
|
|
return "builtin/stable";
|
|
}
|
|
if (i != 2) {
|
|
return null;
|
|
}
|
|
return "builtin/latest";
|
|
}
|
|
}
|