- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
58 lines
1.8 KiB
Java
58 lines
1.8 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.graphics.BitmapFactory;
|
|
import android.graphics.Shader;
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.util.Base64;
|
|
import com.applovin.impl.sdk.utils.StringUtils;
|
|
import java.util.Collections;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class ea {
|
|
private final Map a;
|
|
private final com.applovin.impl.sdk.j b;
|
|
|
|
public String b() {
|
|
return "google watermark";
|
|
}
|
|
|
|
public ea(Map map, com.applovin.impl.sdk.j jVar) {
|
|
this.a = map == null ? Collections.emptyMap() : map;
|
|
this.b = jVar;
|
|
}
|
|
|
|
public Drawable a() {
|
|
Object obj = this.a.get("google_watermark");
|
|
if (!a(obj)) {
|
|
this.b.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.b.J().b("GoogleWatermarkGenerator", "Unable to render invalid watermark: " + obj);
|
|
}
|
|
return null;
|
|
}
|
|
try {
|
|
byte[] decode = Base64.decode((String) obj, 0);
|
|
BitmapDrawable bitmapDrawable = new BitmapDrawable(com.applovin.impl.sdk.j.l().getResources(), BitmapFactory.decodeByteArray(decode, 0, decode.length));
|
|
Shader.TileMode tileMode = Shader.TileMode.REPEAT;
|
|
bitmapDrawable.setTileModeXY(tileMode, tileMode);
|
|
return bitmapDrawable;
|
|
} catch (Throwable th) {
|
|
this.b.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.b.J().a("GoogleWatermarkGenerator", "Failed to render watermark", th);
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public boolean c() {
|
|
return a(this.a.get("google_watermark"));
|
|
}
|
|
|
|
private boolean a(Object obj) {
|
|
return (obj instanceof String) && StringUtils.isValidString((String) obj);
|
|
}
|
|
}
|