75 else |
75 else |
76 { |
76 { |
77 TVPbkUSimStoreProperty uprop; |
77 TVPbkUSimStoreProperty uprop; |
78 TInt err = aStore.GetUSimStoreProperties( uprop ); |
78 TInt err = aStore.GetUSimStoreProperties( uprop ); |
79 if( err == KErrNone ) |
79 if( err == KErrNone ) |
80 { |
80 { |
81 switch ( aType ) |
81 switch ( aType ) |
82 { |
82 { |
83 case EVPbkSimAdditionalNumber: |
83 case EVPbkSimAdditionalNumber1: // FALLTHROUGH |
84 { |
84 case EVPbkSimAdditionalNumber2: // FALLTHROUGH |
85 result = uprop.iMaxAnrLength; |
85 case EVPbkSimAdditionalNumber3: // FALLTHROUGH |
86 break; |
86 case EVPbkSimAdditionalNumberLast: // same as EVPbkSimAdditionalNumber |
87 } |
87 { |
88 case EVPbkSimReading: |
88 result = uprop.iMaxAnrLength; |
89 case EVPbkSimNickName: |
89 break; |
90 { |
90 } |
91 result = uprop.iMaxScndNameLength; |
91 case EVPbkSimReading: // FALLTHROUGH |
92 break; |
92 case EVPbkSimNickName: |
93 } |
93 { |
94 case EVPbkSimEMailAddress: |
94 result = uprop.iMaxScndNameLength; |
95 { |
95 break; |
96 result = uprop.iMaxEmailLength; |
96 } |
97 break; |
97 case EVPbkSimEMailAddress: |
98 } |
98 { |
99 case EVPbkSimGroupName: |
99 result = uprop.iMaxEmailLength; |
100 { |
100 break; |
101 result = uprop.iMaxGroupNameLength; |
101 } |
102 break; |
102 case EVPbkSimGroupName: |
103 } |
103 { |
104 default: |
104 result = uprop.iMaxGroupNameLength; |
105 { |
105 break; |
106 break; |
106 } |
107 } |
107 default: |
108 } |
108 { |
109 } |
109 break; |
|
110 } |
|
111 } |
|
112 } |
110 } |
113 } |
111 return (TInt16)result; |
114 return (TInt16)result; |
112 } |
115 } |
113 |
116 |
114 // ----------------------------------------------------------------------------- |
117 // ----------------------------------------------------------------------------- |
287 { |
290 { |
288 SetDataL( aData ); |
291 SetDataL( aData ); |
289 |
292 |
290 // Max length must be calculated for number types only because other |
293 // Max length must be calculated for number types only because other |
291 // types are not splitted in several records in SIM card. |
294 // types are not splitted in several records in SIM card. |
292 if ( iType == EVPbkSimGsmNumber || iType == EVPbkSimAdditionalNumber ) |
295 if ( iType == EVPbkSimGsmNumber |
|
296 || iType == EVPbkSimAdditionalNumber1 |
|
297 || iType == EVPbkSimAdditionalNumber2 |
|
298 || iType == EVPbkSimAdditionalNumber3 |
|
299 || iType == EVPbkSimAdditionalNumberLast ) // same as EVPbkSimAdditionalNumber |
293 { |
300 { |
294 TInt currentMaxLength = MaxLength( iType, |
301 TInt currentMaxLength = MaxLength( iType, |
295 iParentContact.ParentStore() ); |
302 iParentContact.ParentStore() ); |
296 iMaxLength = CalculateNumberMaxLength( aData, currentMaxLength, |
303 iMaxLength = CalculateNumberMaxLength( aData, currentMaxLength, |
297 iParentContact.ParentStore().SystemPhoneNumberMaxLength() ); |
304 iParentContact.ParentStore().SystemPhoneNumberMaxLength() ); |