5 new ported patches for 1.4.0.
[webos-internals:shivaramv-modifications.git] / phone / phone-call-duration-in-call-log.patch
1 diff --git a/usr/palm/applications/com.palm.app.phoneprefs/app/controllers/preflist-assistant.js b/usr/palm/applications/com.palm.app.phoneprefs/app/controllers/preflist-assistant.js
2 index 498ffa0..8bd1899 100644
3 --- a/usr/palm/applications/com.palm.app.phoneprefs/app/controllers/preflist-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.phoneprefs/app/controllers/preflist-assistant.js
5 @@ -103,6 +103,10 @@ var PreflistAssistant = Class.create({
6                         value: true
7                 };
8                        
9 +       this.phoneAppHideCallDurationModel = {
10 +                       value: false
11 +               };
12 +                      
13          this.callFwdModel = {
14                         value: false
15                 };
16 @@ -145,6 +149,11 @@ var PreflistAssistant = Class.create({
17          }, this.showContactMatchModel);
18          this.controller.get('showContactMatch').addEventListener(Mojo.Event.propertyChange, this.doPropertyChanged.bindAsEventListener(this, 'showContactMatch'));
19  
20 +               this.controller.setupWidget('phoneAppHideCallDuration', {
21 +           modelProperty: 'value'
22 +       }, this.phoneAppHideCallDurationModel);
23 +       this.controller.get('phoneAppHideCallDuration').addEventListener(Mojo.Event.propertyChange, this.doPropertyChanged.bindAsEventListener(this, 'phoneAppHideCallDuration'));
24 +
25                 this.controller.setupWidget('callfwd', {
26              modelProperty: 'value'
27          }, this.callFwdModel);
28 @@ -393,6 +402,7 @@ var PreflistAssistant = Class.create({
29                         ['phoneInternationalDialingActive', 'phoneInternationalDialingRegionId'],this.updateInternationalDialingSettings.bind(this));
30                 this.networkStatusQueryReq = TelephonyService.networkStatusQuery(this.updateNetworkname.bind(this));
31          this.getSystemPreferencesServiceShowcontactmatchReq = SystemService.getSystemPreferencesService('showcontactmatch',this.updateShowcontactmatch.bind(this));
32 +       this.getSystemPreferencesServicephoneAppHideCallDurationReq = SystemService.getSystemPreferencesService('phoneAppHideCallDuration',this.updatephoneAppHideCallDuration.bind(this));
33                 this.updateManualDataSettingsReq = SystemService.getManualDataSettings(this.updateManualDataSettings.bind(this));
34                 this.getVoiceNumberEditableReq = SystemService.getSystemPreferencesService('allowEditVoicemail',this.updateVoicenumberEditableQueryDone.bind(this));
35                 this.getBandSelectionAllowed = SystemService.getSystemPreferencesService('hideRatSelection',this.updateRatSelection.bind(this));
36 @@ -1002,7 +1012,14 @@ voiceNumberSetDone: function(payload){
37          
38      },
39         
40 +        //phoneAppHideCallDuration
41 +    updatephoneAppHideCallDuration: function(payload){
42 +                if(payload.phoneAppHideCallDuration == undefined)
43 +                        return;
44 +        this.phoneAppHideCallDurationModel.value = payload.phoneAppHideCallDuration;
45 +        this.controller.modelChanged(this.phoneAppHideCallDurationModel);
46         
47 +    },
48         
49         //DTMF
50      updateDTMF: function(payload){
51 @@ -2174,6 +2191,9 @@ break;
52                         case 'showContactMatch':
53                     this.setSystemPreferencesServiceReq = SystemService.setSystemPreferencesService('showcontactmatch',value,null);
54                                 break;
55 +                       case 'phoneAppHideCallDuration':
56 +                   this.setSystemPreferencesServiceReq = SystemService.setSystemPreferencesService('phoneAppHideCallDuration',value,null);
57 +                               break;
58              case 'showOutgoingCallerID':
59                  this.clirSetReq = TelephonyService.clirSet(!value, this.handleError.bind(this));
60                 break;            
61 diff --git a/usr/palm/applications/com.palm.app.phoneprefs/app/views/preflist/preflist-scene.html b/usr/palm/applications/com.palm.app.phoneprefs/app/views/preflist/preflist-scene.html
62 index 9912c08..8448dd1 100644
63 --- a/usr/palm/applications/com.palm.app.phoneprefs/app/views/preflist/preflist-scene.html
64 +++ b/usr/palm/applications/com.palm.app.phoneprefs/app/views/preflist/preflist-scene.html
65 @@ -42,6 +42,22 @@
66          </div>
67      </div>
68  
69 +  <div class="palm-group">
70 +        <div x-mojo-loc="" class="palm-group-title">
71 +            Call Log
72 +        </div>
73 +        <div class="palm-list">
74 +            <div class="palm-row single">
75 +                                <div class="palm-row-wrapper">
76 +                        <div id="phoneAppHideCallDuration" x-mojo-element="ToggleButton"></div>
77 +                        <div class="title capitalize" x-mojo-loc="">
78 +                            Hide Call Duration
79 +                        </div>
80 +                    </div>
81 +            </div>
82 +        </div>
83 +    </div>
84 +
85      <div class="palm-group" id="calls">
86          <div x-mojo-loc="" class="palm-group-title">
87              Calls