package o;

import android.os.Bundle;
import android.text.TextUtils;
import java.util.ArrayList;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class MS extends Eu0 {
    public final ArrayList b = new ArrayList();
    public final ArrayList c = new ArrayList();
    public final QW d;
    public String e;
    public Boolean f;

    public MS(QW qw) {
        if (TextUtils.isEmpty(qw.a)) {
            throw new IllegalArgumentException("User's name must not be empty.");
        }
        this.d = qw;
    }

    @Override // o.Eu0
    public final void g(Bundle bundle) {
        super.g(bundle);
        QW qw = this.d;
        bundle.putCharSequence("android.selfDisplayName", qw.a);
        bundle.putBundle("android.messagingStyleUser", qw.a());
        bundle.putCharSequence("android.hiddenConversationTitle", this.e);
        if (this.e != null && this.f.booleanValue()) {
            bundle.putCharSequence("android.conversationTitle", this.e);
        }
        ArrayList arrayList = this.b;
        if (!arrayList.isEmpty()) {
            bundle.putParcelableArray("android.messages", LS.a(arrayList));
        }
        ArrayList arrayList2 = this.c;
        if (!arrayList2.isEmpty()) {
            bundle.putParcelableArray("android.messages.historic", LS.a(arrayList2));
        }
        Boolean bool = this.f;
        if (bool != null) {
            bundle.putBoolean("android.isGroupConversation", bool.booleanValue());
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:11:0x001d  */
    @Override // o.Eu0
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void h(o.S60 r8) {
        /*
            r7 = this;
            java.lang.Object r0 = r7.a
            o.FS r0 = (o.FS) r0
            r1 = 28
            r2 = 0
            if (r0 == 0) goto L1f
            android.content.Context r0 = r0.a
            android.content.pm.ApplicationInfo r0 = r0.getApplicationInfo()
            int r0 = r0.targetSdkVersion
            if (r0 >= r1) goto L1f
            java.lang.Boolean r0 = r7.f
            if (r0 != 0) goto L1f
            java.lang.String r0 = r7.e
            if (r0 == 0) goto L1d
            r0 = 1
            goto L27
        L1d:
            r0 = r2
            goto L27
        L1f:
            java.lang.Boolean r0 = r7.f
            if (r0 == 0) goto L1d
            boolean r0 = r0.booleanValue()
        L27:
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0)
            r7.f = r0
            int r0 = android.os.Build.VERSION.SDK_INT
            o.QW r3 = r7.d
            if (r0 < r1) goto L3f
            r3.getClass()
            android.app.Person r0 = o.AbstractC0094Dq.s(r3)
            android.app.Notification$MessagingStyle r0 = o.IS.a(r0)
            goto L45
        L3f:
            java.lang.String r0 = r3.a
            android.app.Notification$MessagingStyle r0 = o.GS.b(r0)
        L45:
            java.util.ArrayList r3 = r7.b
            int r4 = r3.size()
            r5 = r2
        L4c:
            if (r5 >= r4) goto L5e
            java.lang.Object r6 = r3.get(r5)
            int r5 = r5 + 1
            o.LS r6 = (o.LS) r6
            android.app.Notification$MessagingStyle$Message r6 = r6.b()
            o.GS.a(r0, r6)
            goto L4c
        L5e:
            int r3 = android.os.Build.VERSION.SDK_INT
            r4 = 26
            if (r3 < r4) goto L7c
            java.util.ArrayList r3 = r7.c
            int r4 = r3.size()
        L6a:
            if (r2 >= r4) goto L7c
            java.lang.Object r5 = r3.get(r2)
            int r2 = r2 + 1
            o.LS r5 = (o.LS) r5
            android.app.Notification$MessagingStyle$Message r5 = r5.b()
            o.HS.a(r0, r5)
            goto L6a
        L7c:
            java.lang.Boolean r2 = r7.f
            boolean r2 = r2.booleanValue()
            if (r2 != 0) goto L88
            int r2 = android.os.Build.VERSION.SDK_INT
            if (r2 < r1) goto L8d
        L88:
            java.lang.String r2 = r7.e
            o.GS.c(r0, r2)
        L8d:
            int r2 = android.os.Build.VERSION.SDK_INT
            if (r2 < r1) goto L9a
            java.lang.Boolean r1 = r7.f
            boolean r1 = r1.booleanValue()
            o.IS.b(r0, r1)
        L9a:
            java.lang.Object r8 = r8.n
            android.app.Notification$Builder r8 = (android.app.Notification.Builder) r8
            r0.setBuilder(r8)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: o.MS.h(o.S60):void");
    }

    @Override // o.Eu0
    public final String j() {
        return "androidx.core.app.NotificationCompat$MessagingStyle";
    }
}
