196 { |
196 { |
197 TRequestStatus status; |
197 TRequestStatus status; |
198 mobilePhone.GetCurrentNetwork( |
198 mobilePhone.GetCurrentNetwork( |
199 status, mobilePhoneNetworkInfoPckg, mobilePhoneLocationArea ); |
199 status, mobilePhoneNetworkInfoPckg, mobilePhoneLocationArea ); |
200 User::WaitForRequest( status ); |
200 User::WaitForRequest( status ); |
201 User::LeaveIfError( status.Int() ); |
201 User::LeaveIfError( status.Int() ); |
202 } |
202 } |
203 |
203 |
204 CleanupStack::PopAndDestroy( &mobilePhone ); |
204 CleanupStack::PopAndDestroy( &mobilePhone ); |
205 CleanupStack::PopAndDestroy( &server ); |
205 CleanupStack::PopAndDestroy( &server ); |
206 StrCopy( aLongName, mobilePhoneNetworkInfo.iLongName ); |
206 if ( mobilePhoneNetworkInfo.iLongName.Length() > 0 ) |
|
207 { |
|
208 StrCopy( aLongName, mobilePhoneNetworkInfo.iLongName ); |
|
209 } |
|
210 else if ( mobilePhoneNetworkInfo.iShortName.Length() > 0 ) |
|
211 { |
|
212 StrCopy( aLongName, mobilePhoneNetworkInfo.iShortName ); |
|
213 } |
|
214 else |
|
215 { |
|
216 StrCopy( aLongName, mobilePhoneNetworkInfo.iDisplayTag ); |
|
217 } |
207 StrCopy( aCountryCode, mobilePhoneNetworkInfo.iCountryCode ); |
218 StrCopy( aCountryCode, mobilePhoneNetworkInfo.iCountryCode ); |
208 StrCopy( aNetworkID, mobilePhoneNetworkInfo.iNetworkId ); |
219 StrCopy( aNetworkID, mobilePhoneNetworkInfo.iNetworkId ); |
209 |
220 |
210 TRACE_FUNC_EXIT; |
221 TRACE_FUNC_EXIT; |
211 } |
222 } |