package com.heytap.mcssdk.b; import android.app.NotificationChannel; import android.app.NotificationManager; import android.content.Context; import android.os.Build; import android.text.TextUtils; import com.heytap.mcssdk.R; import com.heytap.mcssdk.f.d; import com.heytap.mcssdk.f.f; import com.huawei.hms.push.constant.RemoteMessageConst; public class a { private static final String a = "Heytap PUSH"; private static final String b = "System Default Channel"; private static final int c = 3; /* access modifiers changed from: private */ /* access modifiers changed from: public */ private boolean a(Context context, String str, String str2, int i) { NotificationManager notificationManager; if (context == null || (notificationManager = (NotificationManager) context.getSystemService(RemoteMessageConst.NOTIFICATION)) == null) { return false; } notificationManager.createNotificationChannel(new NotificationChannel(str, str2, i)); return true; } public void a(final Context context) { if (Build.VERSION.SDK_INT >= 26) { f.a(new Runnable() { /* class com.heytap.mcssdk.b.a.AnonymousClass1 */ public void run() { if (!d.a(context)) { String string = context.getString(R.string.system_default_channel); if (TextUtils.isEmpty(string)) { string = a.b; } d.a(context, a.this.a(context, a.a, string, 3)); } } }); } } }