title: onSaveInstanceState is not getting called after screen rotation
body: <p>I know there are lots of quetions regarden onSaveInstanceState but I wasn't able to find an answer to my problem.</p>
  
  <p>I have an activity that extends AppCompatActivity; this activity uses 3 fragments and it has a variable 'int currentStep' to track which fragment is being displayed. In the onSavedInstanceState method I store the currentStep variable in the bundle, and then in onCreate method I restore it.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
      private final String CURRENT_STEP_TAG = "current_step";
      private int currentStep;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_pedido);        
  
          if(savedInstanceState == null) {
              loadFirstFragment();
          } else {            
              currentStep = savedInstanceState.getInt(CURRENT_STEP_TAG);
              if(currentStep == 2){
                  //Do some stuff...
              }
          }
      }
  
      @Override
      public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {
          Log.d("deubg", "--------onsaveinstancestate--------");
          outState.putInt(CURRENT_STEP_TAG, currentStep);
          super.onSaveInstanceState(outState, outPersistentState);
      }
  
   ...
  
  }
  </code></pre>
  
  <p>The thing is that onSavedInstanceState won't get called when screen orentation changes, and according to google documentation, it should. The message  "--------onsaveinstancestate--------" doesn't show in the console.
  However the Bundle savedInstanceState in the method onCreate is non null after screen rotation, but it doesn't have the int 'currentStep'.</p>
  
  <p>I've tried many things: changed AppCompatActivity for ActionBarActivity, moved the call for super.onSavedInstanceState to different locations, tried to store other variables; but no matter what I do the method doesn't execute.</p>
  
  <p>Also I DO NOT have android:configChanges in my manifest.</p>
  
  <p>My application is being compiled against sdk version 22, buildToolsVersion 22.0.1</p>