<!--
........................................................................................................................
Description:
    This rule script defines when to launch certain applications always in portrait mode.
    
Feature:
    autorotateui
    
Dependencies:
    None
........................................................................................................................
-->
<script xmlns="http://www.nokia.com/ns/cep/script/1.0/"
xmlns:cep="http://www.nokia.com/ns/cep/1.0/">

<!--
........................................................................................................................
Description:
    Set default HW layout to portrait mode.
........................................................................................................................
-->
    <if>
        <or>
            <!-- Sensor setting has been disabled -->
            <and>
                <!-- Sensor setting context value changes to 'Off' -->
                <contextChanged>
                    <contextRef source='Sensor' type='Setting.Active'/>
                </contextChanged>
                <equals>
                    <contextRef source='Sensor' type='Setting.Active'/>
                    <string>Off</string>
                </equals>
            </and>
    
            <!-- Turning interaction setting has been disabled -->
            <and>
                <!-- Turning interaction setting context value changes to 'Off' -->
                <contextChanged>
                    <contextRef source='Sensor' type='Setting.TurningInteraction.AutoRotation'/>
                </contextChanged>
                <equals>
                    <contextRef source='Sensor' type='Setting.TurningInteraction.AutoRotation'/>
                    <string>Off</string>
                </equals>
            </and>
        </or>
        <actions>
            <!-- Switch to 'Normal' mode (Portrait) -->
            <Orientation Mode='Normal'/>
        </actions>
    </if>

</script>