Source:
private synchronized NotificationCompat.Builder createNotification( final VideoPlayerImpl player) { if (DEBUG) { Log.d(TAG, "createNotification()"); } notificationManager = NotificationManagerCompat.from(player.context); final NotificationCompat.Builder builder = new NotificationCompat.Builder(player.context, player.context.getString(R.string.notification_channel_id)); initializeNotificationSlots(player); int nonNothingSlotCount = 5; if (notificationSlots[3] == NotificationConstants.NOTHING) { --nonNothingSlotCount; } if (notificationSlots[4] == NotificationConstants.NOTHING) { --nonNothingSlotCount; } final List<Integer> compactSlotList = NotificationConstants.getCompactSlotsFromPreferences( player.context, player.sharedPreferences, nonNothingSlotCount); final int[] compactSlots = new int[compactSlotList.size()]; for (int i = 0; i < compactSlotList.size(); i++) { compactSlots[i] = compactSlotList.get(i); } builder.setStyle(new androidx.media.app.NotificationCompat.MediaStyle() .setMediaSession(player.mediaSessionManager.getSessionToken()) .setShowActionsInCompactView(compactSlots)) .setPriority(NotificationCompat.PRIORITY_HIGH) .setVisibility(NotificationCompat.VISIBILITY_PUBLIC) .setCategory(NotificationCompat.CATEGORY_TRANSPORT) .setShowWhen(false) .setSmallIcon(R.drawable.ic_newpipe_triangle_white) .setColor(ContextCompat.getColor(player.context, R.color.gray)) .setColorized(player.sharedPreferences.getBoolean( player.context.getString(R.string.colorize_notification_key), true)) .setDeleteIntent(PendingIntent.getBroadcast(player.context, NOTIFICATION_ID, new Intent(ACTION_CLOSE), FLAG_UPDATE_CURRENT)); return builder; }

Target:
private synchronized NotificationCompat.Builder createNotification( final VideoPlayerImpl player) { if (DEBUG) { Log.d(TAG, "createNotification()"); } notificationManager = NotificationManagerCompat.from(player.context); final NotificationCompat.Builder builder = new NotificationCompat.Builder(player.context, player.context.getString(R.string.notification_channel_id)); initializeNotificationSlots(player); int nonNothingSlotCount = 5; if (notificationSlots[3] == NotificationConstants.NOTHING) { --nonNothingSlotCount; } if (notificationSlots[4] == NotificationConstants.NOTHING) { --nonNothingSlotCount; } final List<Integer> compactSlotList = NotificationConstants.getCompactSlotsFromPreferences( player.context, player.sharedPreferences, nonNothingSlotCount); final int[] compactSlots = new int[compactSlotList.size()]; for (int i = 0; i < compactSlotList.size(); i++) { compactSlots[i] = compactSlotList.get(i); } builder.setStyle(new androidx.media.app.NotificationCompat.MediaStyle() .setMediaSession(player.mediaSessionManager.getSessionToken()) .setShowActionsInCompactView(compactSlots)) .setPriority(NotificationCompat.PRIORITY_HIGH) .setVisibility(NotificationCompat.VISIBILITY_PUBLIC) .setCategory(NotificationCompat.CATEGORY_TRANSPORT) .setShowWhen(false) .setSmallIcon(R.drawable.ic_newpipe_triangle_white) .setColor(ContextCompat.getColor(player.context, R.color.dark_background_color)) .setColorized(player.sharedPreferences.getBoolean( player.context.getString(R.string.notification_colorize_key), true)) .setDeleteIntent(PendingIntent.getBroadcast(player.context, NOTIFICATION_ID, new Intent(ACTION_CLOSE), FLAG_UPDATE_CURRENT)); return builder; }