title: How to pop fragment off backstack
body: <p>I have an activity A, which calls fragment Bf, which calls fragment Cf.  I want Bf to be placed in the backstack when Cf is called so that users can navigate back to it.  However, if a specific button is pressed in Cf, I would like Bf to be removed from the backstack.  Is this possible?</p>
  
  <p>I see that there is a popBackStack() function.  However, I am a little confused on how this would work.  Is it safe to use this function?  Is there any possibility that an activity from a different application would be inserted after Bf on the backstack? </p>
  
  <p>Also, is there any way to alter the savedInstanceState of the fragment on the backstack? </p>
  
  <p>I just can't figure out how to do a robust test on the backstack using the emulator.</p>