public static int getActionCount(Notification notification) {
        if (Build.VERSION.SDK_INT >= 19) {
            return notification.actions != null ? notification.actions.length : 0;
        } else if (Build.VERSION.SDK_INT >= 16) {
            return NotificationCompatJellybean.getActionCount(notification);
        } else {
            return 0;
        }
    }
Get the number of actions in this notification in a backwards compatible
manner. Actions were supported from JellyBean (Api level 16) forwards.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/NotificationCompat.java