I have a PendingIntent set as the contentIntent inside of a foreground notification and this PendingIntent should launch the last running activity with singleTop so that another instance of the activity is not created.
The issue I am having is that when Don't keep Activities is set in the developer options a duplicate activity is created at the top of the stack (A,B,C,C) where I would like (A,B,C) where C is the last running activity.
I know it is duplicated because when I use the back button I see two identical activities before reaching my previous activities.