翰林优商.apk(点击下载) / j.java


package com.mbridge.msdk.mbdownload;

import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import com.mbridge.msdk.foundation.controller.a;
import com.mbridge.msdk.foundation.tools.s;
import com.mbridge.msdk.shell.MBService;

/* compiled from: NotificationUtils */
public final class j {
    public static String a(int i, String str) {
        if (i == 0) {
            return null;
        }
        return (i + "") + ":" + str;
    }

    public static PendingIntent a(Context context, String str) {
        Intent intent = new Intent(context, MBService.class);
        intent.putExtra("com.mbridge.msdk.broadcast.download.msg", str);
        return PendingIntent.getService(context, str.hashCode(), intent, 134217728);
    }

    public static void a() {
        Context j = a.f().j();
        if (j != null && s.w(j) >= 26 && Build.VERSION.SDK_INT >= 26) {
            ((NotificationManager) j.getSystemService("notification")).createNotificationChannel(new NotificationChannel("download", "下载进度", 2));
        }
    }
}