package androidx.core.app; import android.app.Notification; import android.app.PendingIntent; import android.content.Context; import android.graphics.Bitmap; import android.os.Build; import android.os.Bundle; import android.widget.RemoteViews; import java.util.ArrayList; /* loaded from: classes.dex */ public class NotificationCompat { public static class Action { final Bundle a; private final RemoteInput[] b; private final RemoteInput[] c; private boolean d; boolean e; private final int f; public int g; public CharSequence h; public PendingIntent i; public Action(int i, CharSequence charSequence, PendingIntent pendingIntent) { this(i, charSequence, pendingIntent, new Bundle(), null, null, true, 0, true); } public PendingIntent a() { return this.i; } public boolean b() { return this.d; } public RemoteInput[] c() { return this.c; } public Bundle d() { return this.a; } public int e() { return this.g; } public RemoteInput[] f() { return this.b; } public int g() { return this.f; } public boolean h() { return this.e; } public CharSequence i() { return this.h; } Action(int i, CharSequence charSequence, PendingIntent pendingIntent, Bundle bundle, RemoteInput[] remoteInputArr, RemoteInput[] remoteInputArr2, boolean z, int i2, boolean z2) { this.e = true; this.g = i; this.h = Builder.d(charSequence); this.i = pendingIntent; this.a = bundle == null ? new Bundle() : bundle; this.b = remoteInputArr; this.c = remoteInputArr2; this.d = z; this.f = i2; this.e = z2; } } public static class BigTextStyle extends Style { private CharSequence e; public BigTextStyle a(CharSequence charSequence) { this.e = Builder.d(charSequence); return this; } @Override // androidx.core.app.NotificationCompat.Style public void a(NotificationBuilderWithBuilderAccessor notificationBuilderWithBuilderAccessor) { if (Build.VERSION.SDK_INT >= 16) { Notification.BigTextStyle bigText = new Notification.BigTextStyle(notificationBuilderWithBuilderAccessor.a()).setBigContentTitle(this.b).bigText(this.e); if (this.d) { bigText.setSummaryText(this.c); } } } } public static class Builder { String A; Bundle B; int C; int D; Notification E; RemoteViews F; RemoteViews G; RemoteViews H; String I; int J; String K; long L; int M; Notification N; @Deprecated public ArrayList O; public Context a; public ArrayList b; ArrayList c; CharSequence d; CharSequence e; PendingIntent f; PendingIntent g; RemoteViews h; Bitmap i; CharSequence j; int k; int l; boolean m; boolean n; Style o; CharSequence p; CharSequence[] q; int r; int s; boolean t; String u; boolean v; String w; boolean x; boolean y; boolean z; public Builder(Context context, String str) { this.b = new ArrayList<>(); this.c = new ArrayList<>(); this.m = true; this.x = false; this.C = 0; this.D = 0; this.J = 0; this.M = 0; this.N = new Notification(); this.a = context; this.I = str; this.N.when = System.currentTimeMillis(); this.N.audioStreamType = -1; this.l = 0; this.O = new ArrayList<>(); } protected static CharSequence d(CharSequence charSequence) { return (charSequence != null && charSequence.length() > 5120) ? charSequence.subSequence(0, 5120) : charSequence; } public Builder a(long j) { this.N.when = j; return this; } public Builder b(int i) { this.N.icon = i; return this; } public Builder c(CharSequence charSequence) { this.N.tickerText = d(charSequence); return this; } public Builder a(CharSequence charSequence) { this.e = d(charSequence); return this; } public Builder b(CharSequence charSequence) { this.d = d(charSequence); return this; } public Builder a(PendingIntent pendingIntent) { this.f = pendingIntent; return this; } public Builder b(boolean z) { this.x = z; return this; } public Builder a(boolean z) { a(16, z); return this; } public Bundle b() { if (this.B == null) { this.B = new Bundle(); } return this.B; } private void a(int i, boolean z) { if (z) { Notification notification = this.N; notification.flags = i | notification.flags; } else { Notification notification2 = this.N; notification2.flags = (~i) & notification2.flags; } } public Builder a(int i) { this.l = i; return this; } public Builder a(int i, CharSequence charSequence, PendingIntent pendingIntent) { this.b.add(new Action(i, charSequence, pendingIntent)); return this; } public Builder a(Style style) { if (this.o != style) { this.o = style; Style style2 = this.o; if (style2 != null) { style2.a(this); } } return this; } public Builder a(String str) { this.I = str; return this; } public Notification a() { return new NotificationCompatBuilder(this).b(); } @Deprecated public Builder(Context context) { this(context, null); } } public static abstract class Style { protected Builder a; CharSequence b; CharSequence c; boolean d = false; public void a(Bundle bundle) { } public abstract void a(NotificationBuilderWithBuilderAccessor notificationBuilderWithBuilderAccessor); public void a(Builder builder) { if (this.a != builder) { this.a = builder; Builder builder2 = this.a; if (builder2 != null) { builder2.a(this); } } } public RemoteViews b(NotificationBuilderWithBuilderAccessor notificationBuilderWithBuilderAccessor) { return null; } public RemoteViews c(NotificationBuilderWithBuilderAccessor notificationBuilderWithBuilderAccessor) { return null; } public RemoteViews d(NotificationBuilderWithBuilderAccessor notificationBuilderWithBuilderAccessor) { return null; } } public static Bundle a(Notification notification) { int i = Build.VERSION.SDK_INT; if (i >= 19) { return notification.extras; } if (i >= 16) { return NotificationCompatJellybean.a(notification); } return null; } }