package androidx.core.app; 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.graphics.drawable.IconCompat; import com.google.android.gms.ads.RequestConfiguration; import java.util.ArrayList; /* loaded from: classes.dex */ public abstract class m { public static class a { /* renamed from: a, reason: collision with root package name */ final Bundle f1437a; /* renamed from: b, reason: collision with root package name */ private IconCompat f1438b; /* renamed from: c, reason: collision with root package name */ private final m0[] f1439c; /* renamed from: d, reason: collision with root package name */ private final m0[] f1440d; /* renamed from: e, reason: collision with root package name */ private boolean f1441e; /* renamed from: f, reason: collision with root package name */ boolean f1442f; /* renamed from: g, reason: collision with root package name */ private final int f1443g; /* renamed from: h, reason: collision with root package name */ private final boolean f1444h; /* renamed from: i, reason: collision with root package name */ public int f1445i; /* renamed from: j, reason: collision with root package name */ public CharSequence f1446j; /* renamed from: k, reason: collision with root package name */ public PendingIntent f1447k; public a(int i10, CharSequence charSequence, PendingIntent pendingIntent) { this(i10 != 0 ? IconCompat.c(null, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, i10) : null, charSequence, pendingIntent); } public PendingIntent a() { return this.f1447k; } public boolean b() { return this.f1441e; } public Bundle c() { return this.f1437a; } public IconCompat d() { int i10; if (this.f1438b == null && (i10 = this.f1445i) != 0) { this.f1438b = IconCompat.c(null, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, i10); } return this.f1438b; } public m0[] e() { return this.f1439c; } public int f() { return this.f1443g; } public boolean g() { return this.f1442f; } public CharSequence h() { return this.f1446j; } public boolean i() { return this.f1444h; } public a(IconCompat iconCompat, CharSequence charSequence, PendingIntent pendingIntent) { this(iconCompat, charSequence, pendingIntent, new Bundle(), null, null, true, 0, true, false); } a(IconCompat iconCompat, CharSequence charSequence, PendingIntent pendingIntent, Bundle bundle, m0[] m0VarArr, m0[] m0VarArr2, boolean z10, int i10, boolean z11, boolean z12) { this.f1442f = true; this.f1438b = iconCompat; if (iconCompat != null && iconCompat.i() == 2) { this.f1445i = iconCompat.e(); } this.f1446j = e.d(charSequence); this.f1447k = pendingIntent; this.f1437a = bundle == null ? new Bundle() : bundle; this.f1439c = m0VarArr; this.f1440d = m0VarArr2; this.f1441e = z10; this.f1443g = i10; this.f1442f = z11; this.f1444h = z12; } } public static class b extends f { /* renamed from: e, reason: collision with root package name */ private Bitmap f1448e; /* renamed from: f, reason: collision with root package name */ private IconCompat f1449f; /* renamed from: g, reason: collision with root package name */ private boolean f1450g; /* renamed from: h, reason: collision with root package name */ private boolean f1451h; private static class a { static void a(Notification.BigPictureStyle bigPictureStyle, Bitmap bitmap) { bigPictureStyle.bigLargeIcon(bitmap); } static void b(Notification.BigPictureStyle bigPictureStyle, CharSequence charSequence) { bigPictureStyle.setSummaryText(charSequence); } } /* renamed from: androidx.core.app.m$b$b, reason: collision with other inner class name */ private static class C0017b { static void a(Notification.BigPictureStyle bigPictureStyle, Icon icon) { bigPictureStyle.bigLargeIcon(icon); } } private static class c { static void a(Notification.BigPictureStyle bigPictureStyle, boolean z10) { bigPictureStyle.showBigPictureWhenCollapsed(z10); } } @Override // androidx.core.app.m.f public void b(l lVar) { int i10 = Build.VERSION.SDK_INT; Notification.BigPictureStyle bigPicture = new Notification.BigPictureStyle(lVar.a()).setBigContentTitle(this.f1480b).bigPicture(this.f1448e); if (this.f1450g) { IconCompat iconCompat = this.f1449f; if (iconCompat == null) { a.a(bigPicture, null); } else if (i10 >= 23) { C0017b.a(bigPicture, this.f1449f.q(lVar instanceof i0 ? ((i0) lVar).f() : null)); } else if (iconCompat.i() == 1) { a.a(bigPicture, this.f1449f.d()); } else { a.a(bigPicture, null); } } if (this.f1482d) { a.b(bigPicture, this.f1481c); } if (i10 >= 31) { c.a(bigPicture, this.f1451h); } } @Override // androidx.core.app.m.f protected String c() { return "androidx.core.app.NotificationCompat$BigPictureStyle"; } public b h(Bitmap bitmap) { this.f1449f = bitmap == null ? null : IconCompat.b(bitmap); this.f1450g = true; return this; } public b i(Bitmap bitmap) { this.f1448e = bitmap; return this; } } public static class c extends f { /* renamed from: e, reason: collision with root package name */ private CharSequence f1452e; @Override // androidx.core.app.m.f public void a(Bundle bundle) { super.a(bundle); } @Override // androidx.core.app.m.f public void b(l lVar) { Notification.BigTextStyle bigText = new Notification.BigTextStyle(lVar.a()).setBigContentTitle(this.f1480b).bigText(this.f1452e); if (this.f1482d) { bigText.setSummaryText(this.f1481c); } } @Override // androidx.core.app.m.f protected String c() { return "androidx.core.app.NotificationCompat$BigTextStyle"; } public c h(CharSequence charSequence) { this.f1452e = e.d(charSequence); return this; } } public static final class d { public static Notification.BubbleMetadata a(d dVar) { return null; } } public static abstract class f { /* renamed from: a, reason: collision with root package name */ protected e f1479a; /* renamed from: b, reason: collision with root package name */ CharSequence f1480b; /* renamed from: c, reason: collision with root package name */ CharSequence f1481c; /* renamed from: d, reason: collision with root package name */ boolean f1482d = false; public void a(Bundle bundle) { if (this.f1482d) { bundle.putCharSequence("android.summaryText", this.f1481c); } CharSequence charSequence = this.f1480b; if (charSequence != null) { bundle.putCharSequence("android.title.big", charSequence); } String c10 = c(); if (c10 != null) { bundle.putString("androidx.core.app.extra.COMPAT_TEMPLATE", c10); } } public abstract void b(l lVar); protected abstract String c(); public RemoteViews d(l lVar) { return null; } public RemoteViews e(l lVar) { return null; } public RemoteViews f(l lVar) { return null; } public void g(e eVar) { if (this.f1479a != eVar) { this.f1479a = eVar; if (eVar != null) { eVar.w(this); } } } } public static Bundle a(Notification notification) { return notification.extras; } public static class e { boolean A; boolean B; String C; Bundle D; int E; int F; Notification G; RemoteViews H; RemoteViews I; RemoteViews J; String K; int L; String M; long N; int O; int P; boolean Q; Notification R; boolean S; Icon T; public ArrayList U; /* renamed from: a, reason: collision with root package name */ public Context f1453a; /* renamed from: b, reason: collision with root package name */ public ArrayList f1454b; /* renamed from: c, reason: collision with root package name */ public ArrayList f1455c; /* renamed from: d, reason: collision with root package name */ ArrayList f1456d; /* renamed from: e, reason: collision with root package name */ CharSequence f1457e; /* renamed from: f, reason: collision with root package name */ CharSequence f1458f; /* renamed from: g, reason: collision with root package name */ PendingIntent f1459g; /* renamed from: h, reason: collision with root package name */ PendingIntent f1460h; /* renamed from: i, reason: collision with root package name */ RemoteViews f1461i; /* renamed from: j, reason: collision with root package name */ Bitmap f1462j; /* renamed from: k, reason: collision with root package name */ CharSequence f1463k; /* renamed from: l, reason: collision with root package name */ int f1464l; /* renamed from: m, reason: collision with root package name */ int f1465m; /* renamed from: n, reason: collision with root package name */ boolean f1466n; /* renamed from: o, reason: collision with root package name */ boolean f1467o; /* renamed from: p, reason: collision with root package name */ f f1468p; /* renamed from: q, reason: collision with root package name */ CharSequence f1469q; /* renamed from: r, reason: collision with root package name */ CharSequence f1470r; /* renamed from: s, reason: collision with root package name */ CharSequence[] f1471s; /* renamed from: t, reason: collision with root package name */ int f1472t; /* renamed from: u, reason: collision with root package name */ int f1473u; /* renamed from: v, reason: collision with root package name */ boolean f1474v; /* renamed from: w, reason: collision with root package name */ String f1475w; /* renamed from: x, reason: collision with root package name */ boolean f1476x; /* renamed from: y, reason: collision with root package name */ String f1477y; /* renamed from: z, reason: collision with root package name */ boolean f1478z; public e(Context context, String str) { this.f1454b = new ArrayList(); this.f1455c = new ArrayList(); this.f1456d = new ArrayList(); this.f1466n = true; this.f1478z = false; this.E = 0; this.F = 0; this.L = 0; this.O = 0; this.P = 0; Notification notification = new Notification(); this.R = notification; this.f1453a = context; this.K = str; notification.when = System.currentTimeMillis(); this.R.audioStreamType = -1; this.f1465m = 0; this.U = new ArrayList(); this.Q = true; } protected static CharSequence d(CharSequence charSequence) { return charSequence == null ? charSequence : charSequence.length() > 5120 ? charSequence.subSequence(0, 5120) : charSequence; } private Bitmap e(Bitmap bitmap) { if (bitmap == null || Build.VERSION.SDK_INT >= 27) { return bitmap; } Resources resources = this.f1453a.getResources(); int dimensionPixelSize = resources.getDimensionPixelSize(o.b.f12541b); int dimensionPixelSize2 = resources.getDimensionPixelSize(o.b.f12540a); 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); } private void n(int i10, boolean z10) { if (z10) { Notification notification = this.R; notification.flags = i10 | notification.flags; } else { Notification notification2 = this.R; notification2.flags = (~i10) & notification2.flags; } } public e A(long j10) { this.R.when = j10; return this; } public e a(int i10, CharSequence charSequence, PendingIntent pendingIntent) { this.f1454b.add(new a(i10, charSequence, pendingIntent)); return this; } public Notification b() { return new i0(this).c(); } public Bundle c() { if (this.D == null) { this.D = new Bundle(); } return this.D; } public e f(boolean z10) { n(16, z10); return this; } public e g(String str) { this.K = str; return this; } public e h(int i10) { this.E = i10; return this; } public e i(PendingIntent pendingIntent) { this.f1459g = pendingIntent; return this; } public e j(CharSequence charSequence) { this.f1458f = d(charSequence); return this; } public e k(CharSequence charSequence) { this.f1457e = d(charSequence); return this; } public e l(int i10) { Notification notification = this.R; notification.defaults = i10; if ((i10 & 4) != 0) { notification.flags |= 1; } return this; } public e m(PendingIntent pendingIntent) { this.R.deleteIntent = pendingIntent; return this; } public e o(Bitmap bitmap) { this.f1462j = e(bitmap); return this; } public e p(int i10, int i11, int i12) { Notification notification = this.R; notification.ledARGB = i10; notification.ledOnMS = i11; notification.ledOffMS = i12; notification.flags = ((i11 == 0 || i12 == 0) ? 0 : 1) | (notification.flags & (-2)); return this; } public e q(boolean z10) { this.f1478z = z10; return this; } public e r(int i10) { this.f1464l = i10; return this; } public e s(int i10) { this.f1465m = i10; return this; } public e t(boolean z10) { this.f1466n = z10; return this; } public e u(int i10) { this.R.icon = i10; return this; } public e v(Uri uri) { Notification notification = this.R; notification.sound = uri; notification.audioStreamType = -1; notification.audioAttributes = new AudioAttributes.Builder().setContentType(4).setUsage(5).build(); return this; } public e w(f fVar) { if (this.f1468p != fVar) { this.f1468p = fVar; if (fVar != null) { fVar.g(this); } } return this; } public e x(CharSequence charSequence) { this.R.tickerText = d(charSequence); return this; } public e y(long[] jArr) { this.R.vibrate = jArr; return this; } public e z(int i10) { this.F = i10; return this; } public e(Context context) { this(context, null); } } }