package B;

import android.app.Notification;
import android.app.NotificationManager;
import android.content.Context;
import android.os.Bundle;
import java.util.HashSet;

/* JADX INFO: loaded from: classes.dex */
public final class n {

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static String f501d;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public static m f504g;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final Context f505a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final NotificationManager f506b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final Object f500c = new Object();

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static HashSet f502e = new HashSet();

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static final Object f503f = new Object();

    public n(Context context) {
        this.f505a = context;
        this.f506b = (NotificationManager) context.getSystemService("notification");
    }

    public final void a(Notification notification) {
        Bundle bundle = notification.extras;
        if (bundle == null || !bundle.getBoolean("android.support.useSideChannel")) {
            this.f506b.notify(null, 88, notification);
            return;
        }
        j jVar = new j(this.f505a.getPackageName(), notification);
        synchronized (f503f) {
            try {
                if (f504g == null) {
                    f504g = new m(this.f505a.getApplicationContext());
                }
                f504g.f497r.obtainMessage(0, jVar).sendToTarget();
            } catch (Throwable th) {
                throw th;
            }
        }
        this.f506b.cancel(null, 88);
    }
}
