102 lines
3.1 KiB
Java
102 lines
3.1 KiB
Java
|
package o;
|
||
|
|
||
|
import android.graphics.Bitmap;
|
||
|
import android.graphics.BitmapFactory;
|
||
|
import android.net.NetworkInfo;
|
||
|
import com.squareup.picasso.Picasso;
|
||
|
import java.io.IOException;
|
||
|
|
||
|
/* renamed from: o.fNZ, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes.dex */
|
||
|
public abstract class AbstractC12987fNZ {
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public boolean aBy_(NetworkInfo networkInfo) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
public abstract Sts c(fNW fnw, int i) throws IOException;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public boolean c() {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
public abstract boolean d(fNW fnw);
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public int e() {
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
/* renamed from: o.fNZ$Sts */
|
||
|
/* loaded from: classes.dex */
|
||
|
public static final class Sts {
|
||
|
final giD a;
|
||
|
final Picasso.HBt b;
|
||
|
final int c;
|
||
|
final Bitmap e;
|
||
|
|
||
|
public Sts(Bitmap bitmap, Picasso.HBt hBt) {
|
||
|
this((Bitmap) C13025fOf.d(bitmap, "bitmap == null"), null, hBt, 0);
|
||
|
}
|
||
|
|
||
|
public Sts(giD gid, Picasso.HBt hBt) {
|
||
|
this(null, (giD) C13025fOf.d(gid, "source == null"), hBt, 0);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public Sts(Bitmap bitmap, giD gid, Picasso.HBt hBt, int i) {
|
||
|
if ((bitmap != null) == (gid != null)) {
|
||
|
throw new AssertionError();
|
||
|
}
|
||
|
this.e = bitmap;
|
||
|
this.a = gid;
|
||
|
this.b = (Picasso.HBt) C13025fOf.d(hBt, "loadedFrom == null");
|
||
|
this.c = i;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static void aBw_(int i, int i2, int i3, int i4, BitmapFactory.Options options, fNW fnw) {
|
||
|
int min;
|
||
|
double floor;
|
||
|
if (i4 > i2 || i3 > i) {
|
||
|
if (i2 == 0) {
|
||
|
floor = Math.floor(i3 / i);
|
||
|
} else if (i == 0) {
|
||
|
floor = Math.floor(i4 / i2);
|
||
|
} else {
|
||
|
int floor2 = (int) Math.floor(i4 / i2);
|
||
|
int floor3 = (int) Math.floor(i3 / i);
|
||
|
if (fnw.d) {
|
||
|
min = Math.max(floor2, floor3);
|
||
|
} else {
|
||
|
min = Math.min(floor2, floor3);
|
||
|
}
|
||
|
}
|
||
|
min = (int) floor;
|
||
|
} else {
|
||
|
min = 1;
|
||
|
}
|
||
|
options.inSampleSize = min;
|
||
|
options.inJustDecodeBounds = false;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static BitmapFactory.Options aBx_(fNW fnw) {
|
||
|
boolean z = (fnw.p == 0 && fnw.s == 0) ? false : true;
|
||
|
boolean z2 = fnw.a != null;
|
||
|
if (!z && !z2 && !fnw.f) {
|
||
|
return null;
|
||
|
}
|
||
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
||
|
options.inJustDecodeBounds = z;
|
||
|
options.inInputShareable = fnw.f;
|
||
|
options.inPurgeable = fnw.f;
|
||
|
if (z2) {
|
||
|
options.inPreferredConfig = fnw.a;
|
||
|
}
|
||
|
return options;
|
||
|
}
|
||
|
}
|