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

238 lines
8.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.app.Notification;
import android.app.RemoteInput;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.RemoteViews;
import androidx.core.graphics.drawable.IconCompat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import o.C17360wCa;
import o.Use;
import o.rvM;
/* loaded from: classes.dex */
class Xjt implements URw {
private final rvM.LWm a;
private final Notification.Builder b;
private RemoteViews d;
private RemoteViews e;
private RemoteViews f;
private int i;
private final Context j;
private final List<Bundle> c = new ArrayList();
private final Bundle h = new Bundle();
/* JADX INFO: Access modifiers changed from: package-private */
public Xjt(rvM.LWm lWm) {
List list;
this.a = lWm;
this.j = lWm.p;
Notification.Builder builder = new Notification.Builder(lWm.p, lWm.g);
this.b = builder;
Notification notification = lWm.B;
builder.setWhen(notification.when).setSmallIcon(notification.icon, notification.iconLevel).setContent(notification.contentView).setTicker(notification.tickerText, lWm.T).setVibrate(notification.vibrate).setLights(notification.ledARGB, notification.ledOnMS, notification.ledOffMS).setOngoing((notification.flags & 2) != 0).setOnlyAlertOnce((notification.flags & 8) != 0).setAutoCancel((notification.flags & 16) != 0).setDefaults(notification.defaults).setContentTitle(lWm.f9260o).setContentText(lWm.l).setContentInfo(lWm.m).setContentIntent(lWm.n).setDeleteIntent(notification.deleteIntent).setFullScreenIntent(lWm.t, (notification.flags & 128) != 0).setLargeIcon(lWm.w).setNumber(lWm.D).setProgress(lWm.F, lWm.G, lWm.H);
builder.setSubText(lWm.R).setUsesChronometer(lWm.W).setPriority(lWm.I);
Iterator<rvM.RVV> it = lWm.b.iterator();
while (it.hasNext()) {
a(it.next());
}
if (lWm.r != null) {
this.h.putAll(lWm.r);
}
this.e = lWm.k;
this.d = lWm.c;
this.b.setShowWhen(lWm.K);
this.b.setLocalOnly(lWm.C).setGroup(lWm.v).setGroupSummary(lWm.u).setSortKey(lWm.O);
this.i = lWm.q;
this.b.setCategory(lWm.h).setColor(lWm.j).setVisibility(lWm.V).setPublicVersion(lWm.L).setSound(notification.sound, notification.audioAttributes);
if (Build.VERSION.SDK_INT < 28) {
list = b(a(lWm.E), lWm.A);
} else {
list = lWm.A;
}
if (list != null && !list.isEmpty()) {
Iterator it2 = list.iterator();
while (it2.hasNext()) {
this.b.addPerson((String) it2.next());
}
}
this.f = lWm.x;
if (lWm.y.size() > 0) {
Bundle bundle = lWm.mP_().getBundle("android.car.EXTENSIONS");
bundle = bundle == null ? new Bundle() : bundle;
Bundle bundle2 = new Bundle(bundle);
Bundle bundle3 = new Bundle();
for (int i = 0; i < lWm.y.size(); i++) {
bundle3.putBundle(Integer.toString(i), Bsy.nb_(lWm.y.get(i)));
}
bundle.putBundle("invisible_actions", bundle3);
bundle2.putBundle("invisible_actions", bundle3);
lWm.mP_().putBundle("android.car.EXTENSIONS", bundle);
this.h.putBundle("android.car.EXTENSIONS", bundle2);
}
if (lWm.S != null) {
this.b.setSmallIcon(lWm.S);
}
this.b.setExtras(lWm.r).setRemoteInputHistory(lWm.J);
if (lWm.k != null) {
this.b.setCustomContentView(lWm.k);
}
if (lWm.c != null) {
this.b.setCustomBigContentView(lWm.c);
}
if (lWm.x != null) {
this.b.setCustomHeadsUpContentView(lWm.x);
}
this.b.setBadgeIconType(lWm.e).setSettingsText(lWm.M).setShortcutId(lWm.N).setTimeoutAfter(lWm.X).setGroupAlertBehavior(lWm.q);
if (lWm.i) {
this.b.setColorized(lWm.f);
}
if (!TextUtils.isEmpty(lWm.g)) {
this.b.setSound(null).setDefaults(0).setLights(0, 0, 0).setVibrate(null);
}
if (Build.VERSION.SDK_INT >= 28) {
Iterator<Use> it3 = lWm.E.iterator();
while (it3.hasNext()) {
this.b.addPerson(Use.IeS.ne_(it3.next()));
}
}
if (Build.VERSION.SDK_INT >= 29) {
this.b.setAllowSystemGeneratedContextualActions(lWm.d);
this.b.setBubbleMetadata(rvM.Sts.mH_(lWm.a));
if (lWm.z != null) {
this.b.setLocusId(lWm.z.nv_());
}
}
if (Build.VERSION.SDK_INT >= 31 && lWm.s != 0) {
this.b.setForegroundServiceBehavior(lWm.s);
}
if (lWm.P) {
if (this.a.u) {
this.i = 2;
} else {
this.i = 1;
}
this.b.setVibrate(null);
this.b.setSound(null);
notification.defaults &= -2;
notification.defaults &= -3;
this.b.setDefaults(notification.defaults);
if (TextUtils.isEmpty(this.a.v)) {
this.b.setGroup("silent");
}
this.b.setGroupAlertBehavior(this.i);
}
}
private static List<String> b(List<String> list, List<String> list2) {
if (list == null) {
return list2;
}
if (list2 == null) {
return list;
}
wnv wnvVar = new wnv(list.size() + list2.size());
wnvVar.addAll(list);
wnvVar.addAll(list2);
return new ArrayList(wnvVar);
}
private static List<String> a(List<Use> list) {
if (list == null) {
return null;
}
ArrayList arrayList = new ArrayList(list.size());
for (Use use : list) {
String str = use.g;
CharSequence charSequence = use.a;
arrayList.add("");
}
return arrayList;
}
public Notification mY_() {
Bundle mv_;
RemoteViews mX_;
RemoteViews mV_;
rvM.ojQ ojq = this.a.Q;
if (ojq != null) {
ojq.e(this);
}
RemoteViews mW_ = ojq != null ? ojq.mW_(this) : null;
Notification mZ_ = mZ_();
if (mW_ != null) {
mZ_.contentView = mW_;
} else if (this.a.k != null) {
mZ_.contentView = this.a.k;
}
if (ojq != null && (mV_ = ojq.mV_(this)) != null) {
mZ_.bigContentView = mV_;
}
if (ojq != null && (mX_ = this.a.Q.mX_(this)) != null) {
mZ_.headsUpContentView = mX_;
}
if (ojq != null && (mv_ = rvM.mv_(mZ_)) != null) {
ojq.mU_(mv_);
}
return mZ_;
}
private void a(rvM.RVV rvv) {
Bundle bundle;
IconCompat d = rvv.d();
RemoteInput[] remoteInputArr = null;
Notification.Action.Builder builder = new Notification.Action.Builder(d != null ? d.qc_() : null, rvv.h(), rvv.mw_());
if (rvv.e() != null) {
C17360wCa[] e = rvv.e();
if (e != null) {
remoteInputArr = new RemoteInput[e.length];
for (int i = 0; i < e.length; i++) {
remoteInputArr[i] = C17360wCa.Sts.nf_(e[i]);
}
}
for (RemoteInput remoteInput : remoteInputArr) {
builder.addRemoteInput(remoteInput);
}
}
if (rvv.mx_() != null) {
bundle = new Bundle(rvv.mx_());
} else {
bundle = new Bundle();
}
bundle.putBoolean("android.support.allowGeneratedReplies", rvv.b());
builder.setAllowGeneratedReplies(rvv.b());
bundle.putInt("android.support.action.semanticAction", rvv.j());
if (Build.VERSION.SDK_INT >= 28) {
builder.setSemanticAction(rvv.j());
}
if (Build.VERSION.SDK_INT >= 29) {
builder.setContextual(rvv.g());
}
if (Build.VERSION.SDK_INT >= 31) {
builder.setAuthenticationRequired(rvv.f());
}
bundle.putBoolean("android.support.action.showsUserInterface", rvv.i());
builder.addExtras(bundle);
this.b.addAction(builder.build());
}
protected Notification mZ_() {
return this.b.build();
}
/* JADX INFO: Access modifiers changed from: package-private */
public Context e() {
return this.j;
}
@Override // o.URw
public Notification.Builder na_() {
return this.b;
}
}