21 New Patches.
[webos-internals:djcin7s-modifications.git] / phone / phone-call-block-anyone-not-in-contacts.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..8fc44c2 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,11 @@ 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)){
11 +                       this.flagCallRejected(callId);
12 +               } else {
13 +                       this.announcer.announceIncoming(callId, number, contact, !!(contact.name), this.isConnected(), update);
14 +               }
15         },
16         
17         // called if lookup returns late.  checks for incoming call and updates that if it's up; otherwise