title: Android Error Cancelling event due to no window focus
body: <p>I am learning Android, and trying to make multi screen app to get better at it. I have 3 activities. </p>
  
  <pre><code>1) Main
  2) Game
  3) GameOver
  </code></pre>
  
  <p>Main has game button, when pressed starts intent for the Game Activity. And after timer finishes in Game, I pass score variables to GameOver Activity over intent. 
  This flow works fine. But when I press back button after I see results in GameOver activit, the app minimizes. When I unMinimize the app it shows the Main activity screen (which actually want, but without app getting minimized). I am using finish() in Game activity where I am calling intent for GameOver. </p>
  
  <p>In logs, I am getting following errors:</p>
  
  <pre><code>D/OpenGLRenderer: endAllActiveAnimators on 0xb7d6e128 (RippleDrawable) with handle 0xb7877690
  W/ViewRootImpl: Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x68, repeatCount=0, eventTime=292244107, downTime=292244100, deviceId=-1, source=0x101 }
  </code></pre>
  
  <p>I created a test app to resolve/understand this issue having 3 activities and same flow. It is working find in that basic activity app. But not in my main app. I searched and found that its not an error. That's okay but I don't want my app to get minimized when back button is pressed. Any help?</p>