black screen behind the activity after user unlocked the device in android
<pre><code>&lt;pre&gt;
</code></pre>

<p>I have created activity applying dialog theme.I am launching this activity from service for the push intent.if user is unlocked the devices.i can see my activity but behind the black screen and if i removed WindowManager.LayoutParams.TYPE_KEYGUARD,i cannot see the blackscreen but activity doesn't display if user unlocked the device.</p>

<pre><code>i have called this before setcontentview.


getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
                getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON );


and also overidden the below method.



public void onAttachedToWindow()
{
 this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);  
 super.onAttachedToWindow(); 
}

  &lt;/pre&gt;
</code></pre>
