phoneapp/silenceactionplugin/data/silence.rul
author William Roberts <williamr@symbian.org>
Sun, 04 Apr 2010 09:45:01 +0100
branchRCL_3
changeset 18 011c89ac62cb
parent 15 2a26698d78ba
permissions -rw-r--r--
Make sure ordinal 1 is NewPhoneUIStateMachineFactoryL - new fix for Bug 1614

<script xmlns="http://www.nokia.com/ns/cep/script/1.0/"
xmlns:cep="http://www.nokia.com/ns/cep/1.0/">

    <!-- Check if we have incoming call and we receive display down orientation event -->
    <if>
        <and>
            <!-- Must have a ringin call and receive orientation event from sensor -->
            <equals>
                <contextRef source='Call' type='State'/>
                <string>Ringing</string>
            </equals>
            <equals>
                <contextRef source='Sensor' type='Setting.Active'/>
                <string>On</string>
            </equals>
            <!-- Check that turning interaction is set -->
            <equals>
                <contextRef source='Sensor' type='Setting.TurningInteraction.SilenceCalls'/>
                <string>On</string>
            </equals>
            <!-- ...and previous orientation is not 'Undefined' ... -->
            <notEqual>
                <contextRef source='Sensor' type='Event.Orientation.Previous'/>
                <string>Undefined</string>
            </notEqual>
            <contextChanged>
                <contextRef source='Sensor' type='Event.Orientation'/>
            </contextChanged>
            <equals>
                <contextRef source='Sensor' type='Event.Orientation'/>
                <string>DisplayDownwards</string>
            </equals>
        </and>
        <actions>
            <!-- DEBUG -->
            <!-- <publishContext><contextRef source="Test" type="Log" value="silence.rul - 01 silence call only"/></publishContext> -->

            <!-- Silence ringing tone -->
            <Phone Command='Silence'/>
            <!-- Vibra feedback -->
            <Vibra Mode='Start' Delay='0' Repeats='2' RepeatInterval='200' Duration='50' Intensity='50'/>
        </actions>
    </if>

</script>