title: Prevent restarting landscape Android application on lock
body: <p>I am developing a game (sort of) which uses OpenGL and has background music. Application runs only in landscape mode. </p>
  
  <p>Problem I have, happens when user locks screen. At that point <code>onStop()</code> is called, screen orientation is changed and soon after my Activity is restarted as a result of orientation change. This means OpenGL surface is recreated, music starts playing again and all sorts of other things. This is counter-intuitive as locking screen should suspend CPU intensive operations, not start them.</p>
  
  <p>Adding <code>android:configChanges="orientation"</code> to manifest did nothing. I do realize that I am probably missing <code>screenSize</code> in <code>android:configChanges</code> but I can not add it since I am targeting earlier API versions which do not have this option available.</p>
  
  <p>So, question is: What's the proper way to handle this? On which event should I initialize my application so that everything works as expected?</p>