Screen rotation ice cream flashes
<p>I have a service that run an activity when I want to lock an app , everything works well , but</p>

<p>when a locked app running , it shows lock screen well , but when I turn on Auto Rotation ON in device and rotate device , my activity load and and creates and stops and Destroy and again load , stop , destroy and this happens untill I kill activity .</p>

<p>where is my problem with Auto Rotation </p>

<p>I have this in manifest :</p>

<pre><code>&lt;activity
            android:name="activity_lockScreen"
            android:configChanges="keyboardHidden|orientation"
            android:label="Lock Screen"
            android:screenOrientation="portrait" &gt;
&lt;/activity&gt;
</code></pre>

<p>and this code to run activity at service </p>

<pre><code>Intent lockIntent = new Intent(this, lockScreen.class);
    lockIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    Log.d(tag, "new Run");
    startActivity(lockIntent);
</code></pre>

<p>my app works well on android 2.3 and 2.2 , but I got splash screen On android 4.0 , It seem that there is a problem with android 4 autorotation </p>

<p>Also called only once .</p>
