protected boolean areNotificationsEnabled(String channelName) {
        ensureOnCreateCalled();

        if (!NotificationManagerCompat.from(this).areNotificationsEnabled()) return false;

        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return true;

        String channelId = channelNameToId(channelName);
        NotificationChannel channel = mNotificationManager.getNotificationChannel(channelId);

        return channel == null || channel.getImportance() != NotificationManager.IMPORTANCE_NONE;
    }
Checks whether notifications are enabled.
@param channelName The name of the notification channel to be used on Android O+.
@return Whether notifications are enabled.
customtabs/src/android/support/customtabs/trusted/TrustedWebActivityService.java