title: onResume() method is not calling from the same activity
body: <p>I am running an Activity using service in my Application. So if the service is running and keyguard is locked, i am unlocking it through code and showing again my activity. For that, i wrote the code in the onReceive() method of the Activity.</p>
  
  <pre><code>protected void onResume() 
  {
      Log.d("Testing","ONRESUME OF HOME SCREEN");
      // only when screen turns on
      getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
      getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
      getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
      getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
      super.onResume();
   }
  </code></pre>
  
  <p>But when i am moving from my activity to another activity(Suppose phone's Home Screen),and locking the key guard, it is unlocking  and showing my activity. But if my activity is showing and locking the key guard, it is unable to unlock the key guard, unless i am manually unlocking it. </p>
  
  <p>I am not getting whats the problem. Please help....</p>