title: Android Immersive mode reset when changing activity
body: <p>I'm facing a problem when using immersive mode. Here is the code I put on all activities:</p>
  
  <pre><code> @Override
   public void onWindowFocusChanged(boolean hasFocus) {
       super.onWindowFocusChanged(hasFocus);
       if (hasFocus) {
           getWindow().getDecorView().setSystemUiVisibility(
               View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                   | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                   | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                   | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                   | View.SYSTEM_UI_FLAG_FULLSCREEN
                   | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
           );
       }
   }
  </code></pre>
  
  <p>The <code>navigationBar</code> and <code>statusBar</code> are invisible, this is good.</p>
  
  <p>The problem is that every time I go to another activity, the <code>navigationBar</code> appears, then disappears. I would like that the <code>navigationBar</code> to not appear like that.</p>