21 New Patches.
[webos-internals:djcin7s-modifications.git] / phone / phone-call-block-answer-then-hangup.patch
1 diff --git a/usr/palm/applications/com.palm.app.phone/app/models/TelephonyEventListener.js b/usr/palm/applications/com.palm.app.phone/app/models/TelephonyEventListener.js
2 index c7190b5..4c6339c 100644
3 --- a/usr/palm/applications/com.palm.app.phone/app/models/TelephonyEventListener.js
4 +++ b/usr/palm/applications/com.palm.app.phone/app/models/TelephonyEventListener.js
5 @@ -715,7 +715,12 @@ var TelephonyEventListener = Class.create({
6                 contact.cnapName = cnapName;
7                 
8                 QDLogger.log( "TelephonyEventListener#onIncomingLookupComplete", "namefromcontacts?:" , !!(contact.name));
9 -               this.announcer.announceIncoming(callId, number, contact, !!(contact.name), this.isConnected(), update);
10 +               if (contact.name === 'Do Not Answer'){
11 +                       TelephonyCommands.answer(callId);
12 +                       TelephonyCommands.disconnect(callId);
13 +               } else {
14 +                       this.announcer.announceIncoming(callId, number, contact, !!(contact.name), this.isConnected(), update);
15 +               }
16         },
17         
18         // called if lookup returns late.  checks for incoming call and updates that if it's up; otherwise