what-the-bank/sources/o/fNI.java

82 lines
1.9 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import android.graphics.Bitmap;
import android.util.LruCache;
/* loaded from: classes.dex */
public final class fNI implements fNB {
private LruCache<String, IeS> a;
public fNI(Context context) {
this(C13025fOf.d(context));
}
private fNI(int i) {
this.a = new LruCache<String, IeS>(this, i) { // from class: o.fNI.2
private fNI c;
{
this.c = this;
}
@Override // android.util.LruCache
protected final /* bridge */ /* synthetic */ int sizeOf(String str, IeS ieS) {
return ieS.a;
}
};
}
@Override // o.fNB
public final Bitmap aBj_(String str) {
IeS ieS = this.a.get(str);
if (ieS != null) {
return ieS.d;
}
return null;
}
@Override // o.fNB
public final void aBk_(String str, Bitmap bitmap) {
if (str == null || bitmap == null) {
throw new NullPointerException("key == null || bitmap == null");
}
int aBG_ = C13025fOf.aBG_(bitmap);
if (aBG_ > this.a.maxSize()) {
this.a.remove(str);
} else {
this.a.put(str, new IeS(bitmap, aBG_));
}
}
@Override // o.fNB
public final int c() {
return this.a.size();
}
@Override // o.fNB
public final int a() {
return this.a.maxSize();
}
@Override // o.fNB
public final void b(String str) {
for (String str2 : this.a.snapshot().keySet()) {
if (str2.startsWith(str) && str2.length() > str.length() && str2.charAt(str.length()) == '\n') {
this.a.remove(str2);
}
}
}
/* loaded from: classes.dex */
static final class IeS {
final int a;
final Bitmap d;
IeS(Bitmap bitmap, int i) {
this.d = bitmap;
this.a = i;
}
}
}