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

627 lines
18 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.app.Notification;
import android.app.PendingIntent;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.Icon;
import android.media.AudioAttributes;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.widget.RemoteViews;
import androidx.core.content.LocusIdCompat;
import androidx.core.graphics.drawable.IconCompat;
import java.util.ArrayList;
import o.KtR;
/* loaded from: classes.dex */
public class rvM {
/* loaded from: classes.dex */
public static class LWm {
@Deprecated
public ArrayList<String> A;
Notification B;
boolean C;
int D;
public ArrayList<Use> E;
int F;
int G;
boolean H;
int I;
CharSequence[] J;
boolean K;
Notification L;
CharSequence M;
String N;
String O;
boolean P;
ojQ Q;
CharSequence R;
Icon S;
RemoteViews T;
int V;
boolean W;
long X;
Sts a;
public ArrayList<RVV> b;
RemoteViews c;
boolean d;
int e;
boolean f;
String g;
String h;
boolean i;
int j;
RemoteViews k;
CharSequence l;
CharSequence m;
PendingIntent n;
/* renamed from: o, reason: collision with root package name */
CharSequence f9260o;
public Context p;
int q;
Bundle r;
int s;
PendingIntent t;
boolean u;
String v;
Bitmap w;
RemoteViews x;
ArrayList<RVV> y;
LocusIdCompat z;
public LWm(Context context, String str) {
this.b = new ArrayList<>();
this.E = new ArrayList<>();
this.y = new ArrayList<>();
this.K = true;
this.C = false;
this.j = 0;
this.V = 0;
this.e = 0;
this.q = 0;
this.s = 0;
Notification notification = new Notification();
this.B = notification;
this.p = context;
this.g = str;
notification.when = System.currentTimeMillis();
this.B.audioStreamType = -1;
this.I = 0;
this.A = new ArrayList<>();
this.d = true;
}
@Deprecated
public LWm(Context context) {
this(context, null);
}
public LWm c(long j) {
this.B.when = j;
return this;
}
public LWm c(int i) {
this.B.icon = i;
return this;
}
public LWm a(CharSequence charSequence) {
this.f9260o = c(charSequence);
return this;
}
public LWm d(CharSequence charSequence) {
this.l = c(charSequence);
return this;
}
public LWm mR_(PendingIntent pendingIntent) {
this.B.deleteIntent = pendingIntent;
return this;
}
public LWm b(CharSequence charSequence) {
this.B.tickerText = c(charSequence);
return this;
}
public LWm mS_(Bitmap bitmap) {
this.w = mM_(bitmap);
return this;
}
private Bitmap mM_(Bitmap bitmap) {
if (bitmap == null || Build.VERSION.SDK_INT >= 27) {
return bitmap;
}
Resources resources = this.p.getResources();
int dimensionPixelSize = resources.getDimensionPixelSize(KtR.LWm.compat_notification_large_icon_max_width);
int dimensionPixelSize2 = resources.getDimensionPixelSize(KtR.LWm.compat_notification_large_icon_max_height);
if (bitmap.getWidth() <= dimensionPixelSize && bitmap.getHeight() <= dimensionPixelSize2) {
return bitmap;
}
double min = Math.min(dimensionPixelSize / Math.max(1, bitmap.getWidth()), dimensionPixelSize2 / Math.max(1, bitmap.getHeight()));
return Bitmap.createScaledBitmap(bitmap, (int) Math.ceil(bitmap.getWidth() * min), (int) Math.ceil(bitmap.getHeight() * min), true);
}
public LWm mT_(Uri uri) {
this.B.sound = uri;
this.B.audioStreamType = -1;
this.B.audioAttributes = new AudioAttributes.Builder().setContentType(4).setUsage(5).build();
return this;
}
public LWm a(long[] jArr) {
this.B.vibrate = jArr;
return this;
}
public LWm c(int i, int i2, int i3) {
this.B.ledARGB = i;
this.B.ledOnMS = i2;
this.B.ledOffMS = i3;
int i4 = (this.B.ledOnMS == 0 || this.B.ledOffMS == 0) ? 0 : 1;
Notification notification = this.B;
notification.flags = i4 | (notification.flags & (-2));
return this;
}
public LWm e(boolean z) {
a(16, z);
return this;
}
public LWm d(int i) {
this.B.defaults = i;
if ((i & 4) != 0) {
this.B.flags |= 1;
}
return this;
}
private void a(int i, boolean z) {
if (z) {
Notification notification = this.B;
notification.flags = i | notification.flags;
} else {
Notification notification2 = this.B;
notification2.flags = (~i) & notification2.flags;
}
}
public Bundle mP_() {
if (this.r == null) {
this.r = new Bundle();
}
return this.r;
}
public LWm mN_(int i, CharSequence charSequence, PendingIntent pendingIntent) {
this.b.add(new RVV(i, charSequence, pendingIntent));
return this;
}
public LWm d(ojQ ojq) {
if (this.Q != ojq) {
this.Q = ojq;
if (ojq != null) {
ojq.e(this);
}
}
return this;
}
public Notification mO_() {
return new Xjt(this).mY_();
}
protected static CharSequence c(CharSequence charSequence) {
return (charSequence != null && charSequence.length() > 5120) ? charSequence.subSequence(0, 5120) : charSequence;
}
public LWm j(int i) {
this.V = i;
return this;
}
public LWm b(boolean z) {
this.K = z;
return this;
}
public LWm a(int i) {
this.I = i;
return this;
}
public LWm e(int i) {
this.D = i;
return this;
}
public LWm c(boolean z) {
this.C = z;
return this;
}
public LWm mQ_(PendingIntent pendingIntent) {
this.n = pendingIntent;
return this;
}
public LWm b(int i) {
this.j = i;
return this;
}
public LWm c(String str) {
this.g = str;
return this;
}
}
/* loaded from: classes.dex */
public static abstract class ojQ {
CharSequence a;
CharSequence b;
boolean d = false;
protected LWm e;
protected String d() {
return null;
}
public void e(URw uRw) {
}
public RemoteViews mV_(URw uRw) {
return null;
}
public RemoteViews mW_(URw uRw) {
return null;
}
public RemoteViews mX_(URw uRw) {
return null;
}
public void e(LWm lWm) {
if (this.e != lWm) {
this.e = lWm;
if (lWm != null) {
lWm.d(this);
}
}
}
public void mU_(Bundle bundle) {
if (this.d) {
bundle.putCharSequence("android.summaryText", this.b);
}
CharSequence charSequence = this.a;
if (charSequence != null) {
bundle.putCharSequence("android.title.big", charSequence);
}
String d = d();
if (d != null) {
bundle.putString("androidx.core.app.extra.COMPAT_TEMPLATE", d);
}
}
}
/* loaded from: classes.dex */
public static class IeS extends ojQ {
private IconCompat c;
private boolean f;
private IconCompat g;
private CharSequence h;
private boolean i;
public IeS mz_(Bitmap bitmap) {
this.g = bitmap == null ? null : IconCompat.pY_(bitmap);
return this;
}
public IeS my_(Bitmap bitmap) {
this.c = bitmap == null ? null : IconCompat.pY_(bitmap);
this.f = true;
return this;
}
@Override // o.rvM.ojQ
public void e(URw uRw) {
Notification.BigPictureStyle bigContentTitle = new Notification.BigPictureStyle(uRw.na_()).setBigContentTitle(this.a);
if (this.g != null) {
if (Build.VERSION.SDK_INT >= 31) {
C0123IeS.mD_(bigContentTitle, this.g.qd_(uRw instanceof Xjt ? ((Xjt) uRw).e() : null));
} else if (this.g.c() == 1) {
bigContentTitle = bigContentTitle.bigPicture(this.g.qa_());
}
}
if (this.f) {
if (this.c == null) {
LWm.mA_(bigContentTitle, null);
} else {
HBt.mC_(bigContentTitle, this.c.qd_(uRw instanceof Xjt ? ((Xjt) uRw).e() : null));
}
}
if (this.d) {
LWm.mB_(bigContentTitle, this.b);
}
if (Build.VERSION.SDK_INT >= 31) {
C0123IeS.mF_(bigContentTitle, this.i);
C0123IeS.mE_(bigContentTitle, this.h);
}
}
/* loaded from: classes.dex */
static class LWm {
static void mA_(Notification.BigPictureStyle bigPictureStyle, Bitmap bitmap) {
bigPictureStyle.bigLargeIcon(bitmap);
}
static void mB_(Notification.BigPictureStyle bigPictureStyle, CharSequence charSequence) {
bigPictureStyle.setSummaryText(charSequence);
}
}
/* loaded from: classes.dex */
static class HBt {
static void mC_(Notification.BigPictureStyle bigPictureStyle, Icon icon) {
bigPictureStyle.bigLargeIcon(icon);
}
}
/* renamed from: o.rvM$IeS$IeS, reason: collision with other inner class name */
/* loaded from: classes.dex */
static class C0123IeS {
static void mF_(Notification.BigPictureStyle bigPictureStyle, boolean z) {
bigPictureStyle.showBigPictureWhenCollapsed(z);
}
static void mE_(Notification.BigPictureStyle bigPictureStyle, CharSequence charSequence) {
bigPictureStyle.setContentDescription(charSequence);
}
static void mD_(Notification.BigPictureStyle bigPictureStyle, Icon icon) {
bigPictureStyle.bigPicture(icon);
}
}
@Override // o.rvM.ojQ
protected String d() {
return "o.rvM$IeS";
}
}
/* loaded from: classes.dex */
public static class HBt extends ojQ {
private CharSequence c;
public HBt e(CharSequence charSequence) {
this.c = LWm.c(charSequence);
return this;
}
@Override // o.rvM.ojQ
public void e(URw uRw) {
Notification.BigTextStyle bigText = new Notification.BigTextStyle(uRw.na_()).setBigContentTitle(this.a).bigText(this.c);
if (this.d) {
bigText.setSummaryText(this.b);
}
}
@Override // o.rvM.ojQ
public void mU_(Bundle bundle) {
super.mU_(bundle);
}
@Override // o.rvM.ojQ
protected String d() {
return "o.rvM$HBt";
}
}
/* loaded from: classes.dex */
public static class RVV {
boolean a;
@Deprecated
public int b;
public PendingIntent c;
public CharSequence d;
final Bundle e;
private boolean f;
private boolean g;
private final C17360wCa[] h;
private final boolean i;
private IconCompat j;
private final C17360wCa[] m;
private final int n;
public RVV(int i, CharSequence charSequence, PendingIntent pendingIntent) {
this(i != 0 ? IconCompat.pZ_(null, "", i) : null, charSequence, pendingIntent);
}
public RVV(IconCompat iconCompat, CharSequence charSequence, PendingIntent pendingIntent) {
this(iconCompat, charSequence, pendingIntent, new Bundle(), null, null, true, 0, true, false, false);
}
RVV(IconCompat iconCompat, CharSequence charSequence, PendingIntent pendingIntent, Bundle bundle, C17360wCa[] c17360wCaArr, C17360wCa[] c17360wCaArr2, boolean z, int i, boolean z2, boolean z3, boolean z4) {
this.a = true;
this.j = iconCompat;
if (iconCompat != null && iconCompat.c() == 2) {
this.b = iconCompat.e();
}
this.d = LWm.c(charSequence);
this.c = pendingIntent;
this.e = bundle == null ? new Bundle() : bundle;
this.m = c17360wCaArr;
this.h = c17360wCaArr2;
this.g = z;
this.n = i;
this.a = z2;
this.i = z3;
this.f = z4;
}
public IconCompat d() {
int i;
if (this.j == null && (i = this.b) != 0) {
this.j = IconCompat.pZ_(null, "", i);
}
return this.j;
}
public boolean g() {
return this.i;
}
public boolean f() {
return this.f;
}
public CharSequence h() {
return this.d;
}
public boolean i() {
return this.a;
}
public int j() {
return this.n;
}
public C17360wCa[] e() {
return this.m;
}
public Bundle mx_() {
return this.e;
}
public boolean b() {
return this.g;
}
public PendingIntent mw_() {
return this.c;
}
}
/* loaded from: classes.dex */
public static final class Sts {
private int a;
private PendingIntent b;
private int c;
private int d;
private IconCompat e;
private String f;
private PendingIntent h;
public static Notification.BubbleMetadata mH_(Sts sts) {
if (sts == null) {
return null;
}
if (Build.VERSION.SDK_INT >= 30) {
return RVV.mL_(sts);
}
if (Build.VERSION.SDK_INT == 29) {
return HBt.mK_(sts);
}
return null;
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public static class HBt {
static Notification.BubbleMetadata mK_(Sts sts) {
if (sts == null || sts.mJ_() == null) {
return null;
}
Notification.BubbleMetadata.Builder suppressNotification = new Notification.BubbleMetadata.Builder().setIcon(sts.b().qc_()).setIntent(sts.mJ_()).setDeleteIntent(sts.mI_()).setAutoExpandBubble(sts.d()).setSuppressNotification(sts.h());
if (sts.e() != 0) {
suppressNotification.setDesiredHeight(sts.e());
}
if (sts.a() != 0) {
suppressNotification.setDesiredHeightResId(sts.a());
}
return suppressNotification.build();
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public static class RVV {
static Notification.BubbleMetadata mL_(Sts sts) {
Notification.BubbleMetadata.Builder builder;
if (sts == null) {
return null;
}
if (sts.f() != null) {
builder = new Notification.BubbleMetadata.Builder(sts.f());
} else {
builder = new Notification.BubbleMetadata.Builder(sts.mJ_(), sts.b().qc_());
}
builder.setDeleteIntent(sts.mI_()).setAutoExpandBubble(sts.d()).setSuppressNotification(sts.h());
if (sts.e() != 0) {
builder.setDesiredHeight(sts.e());
}
if (sts.a() != 0) {
builder.setDesiredHeightResId(sts.a());
}
return builder.build();
}
}
public final boolean h() {
return (this.a & 2) != 0;
}
public final String f() {
return this.f;
}
public final PendingIntent mJ_() {
return this.h;
}
public final IconCompat b() {
return this.e;
}
public final int a() {
return this.d;
}
public final int e() {
return this.c;
}
public final PendingIntent mI_() {
return this.b;
}
public final boolean d() {
return (this.a & 1) != 0;
}
}
public static Bundle mv_(Notification notification) {
return notification.extras;
}
@Deprecated
public rvM() {
}
}