title: FLAG_TURN_SCREEN_ON doesn't work
body: <p>I have a service with registered accelerometer inside. When certain shake pattern is recognized the service starts one activity using this code.</p>
  
  <pre><code>Intent launchIntent = new Intent("my.package.MAIN_ACTIVITY");
  LaunchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  startActivity(LaunchIntent);
  </code></pre>
  
  <p>At <code>onCreate</code> I use this code snippet to unlock the phone and turn the screen on:</p>
  
  <pre><code>Window window = getWindow();
  window.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
                  WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
  window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON|
                  WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
  </code></pre>
  
  <p>If the user don't interact with activity some time I use this code to enable the display to turn off:</p>
  
  <pre><code>Window window = getWindow();
  window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
  </code></pre>
  
  <p>If the display turns  off and phone locks while activity is displayed and I repeat the shake pattern the <code>onStart</code> method is called. I tried to put the same code for turning on and unlocking as above, but it doesn't work (display is not turned on).</p>
  
  <p>What could be the problem?</p>