833 aError ) |
833 aError ) |
834 |
834 |
835 ChooseIapComplete( aError, NULL ); |
835 ChooseIapComplete( aError, NULL ); |
836 delete iDialog; |
836 delete iDialog; |
837 iDialog = NULL; |
837 iDialog = NULL; |
|
838 // Start ConnSelectionDlgTimer if user has cancelled the connection |
|
839 // selection dialog. During the timer interval dialog is not shown. |
|
840 // |
|
841 if( aError == KErrCancel ) |
|
842 { |
|
843 iSession->MyServer().StartConnSelectionDlgTimer(); |
|
844 } |
838 } |
845 } |
839 |
846 |
840 |
847 |
841 // ----------------------------------------------------------------------------- |
848 // ----------------------------------------------------------------------------- |
842 // CMPMIapSelection::HandleUserIapSelectionL |
849 // CMPMIapSelection::HandleUserIapSelectionL |
1020 void CMPMIapSelection::ImplicitConnectionIapSelectionL() |
1027 void CMPMIapSelection::ImplicitConnectionIapSelectionL() |
1021 { |
1028 { |
1022 MPMLOGSTRING( "CMPMIapSelection::ImplicitConnectionIapSelectionL" ) |
1029 MPMLOGSTRING( "CMPMIapSelection::ImplicitConnectionIapSelectionL" ) |
1023 iSession->AvailableUnblacklistedIapsL( iStoredAvailableIaps, iSession->ConnectionId() ); |
1030 iSession->AvailableUnblacklistedIapsL( iStoredAvailableIaps, iSession->ConnectionId() ); |
1024 |
1031 |
1025 // Create and initiate user dialog |
1032 // Create and initiate user dialog only if it hasnot |
|
1033 // been cancelled in last 10s(KTimeout) |
1026 // |
1034 // |
1027 iDialog = CMPMDialog::NewL( *this, |
1035 if ( !iSession->MyServer().IsConnSelectionDlgTimerOn() ) |
|
1036 { |
|
1037 iDialog = CMPMDialog::NewL( *this, |
1028 iStoredAvailableIaps, |
1038 iStoredAvailableIaps, |
1029 iChooseIapPref.BearerSet(), |
1039 iChooseIapPref.BearerSet(), |
1030 *iSession->MyServer().ConnectDialogQueue(), |
1040 *iSession->MyServer().ConnectDialogQueue(), |
1031 iSession->MyServer() ); |
1041 iSession->MyServer() ); |
|
1042 } |
|
1043 else |
|
1044 { |
|
1045 MPMLOGSTRING( "CMPMIapSelection::ImplicitConnectionIapSelectionL, iConnSelectionDlgTimer running" ) |
|
1046 ChooseIapComplete( KErrCancel, NULL ); |
|
1047 } |
1032 } |
1048 } |
1033 |
1049 |
1034 // ----------------------------------------------------------------------------- |
1050 // ----------------------------------------------------------------------------- |
1035 // CMPMIapSelection::ImplicitConnectionL |
1051 // CMPMIapSelection::ImplicitConnectionL |
1036 // ----------------------------------------------------------------------------- |
1052 // ----------------------------------------------------------------------------- |
1134 for ( TInt k = destCount; k >= 0; k-- ) |
1150 for ( TInt k = destCount; k >= 0; k-- ) |
1135 { |
1151 { |
1136 ret = aAvailableIAPs.Find( destNetIaps[k].iIapId ); |
1152 ret = aAvailableIAPs.Find( destNetIaps[k].iIapId ); |
1137 if ( ret == KErrNotFound ) |
1153 if ( ret == KErrNotFound ) |
1138 { |
1154 { |
1139 MPMLOGSTRING2( "CMPMIapSelection::ChooseBestIAPL: \ |
1155 TBool isTunDriver = iCommsDatAccess->IsTunDriverIap( |
1140 Remove unavailable IAP = %i", destNetIaps[k].iIapId ) |
1156 destNetIaps[k].iIapId ); |
1141 destNetIaps.Remove( k ); |
1157 if ( !isTunDriver ) |
|
1158 { |
|
1159 MPMLOGSTRING2( "CMPMIapSelection::ChooseBestIAPL: \ |
|
1160 Remove unavailable IAP = %i", destNetIaps[k].iIapId ) |
|
1161 destNetIaps.Remove( k ); |
|
1162 } |
1142 } |
1163 } |
1143 } |
1164 } |
1144 |
1165 |
1145 // Remove any unavailable IAP from embeddedIaps |
1166 // Remove any unavailable IAP from embeddedIaps |
1146 // |
1167 // |
1152 for ( TInt m = embedCount; m >= 0; m-- ) |
1173 for ( TInt m = embedCount; m >= 0; m-- ) |
1153 { |
1174 { |
1154 ret = aAvailableIAPs.Find( embeddedIaps[m].iIapId ); |
1175 ret = aAvailableIAPs.Find( embeddedIaps[m].iIapId ); |
1155 if ( ret == KErrNotFound ) |
1176 if ( ret == KErrNotFound ) |
1156 { |
1177 { |
1157 // Remove IapId because it's not available |
1178 TBool isTunDriver = iCommsDatAccess->IsTunDriverIap( embeddedIaps[m].iIapId ); |
1158 // |
1179 if ( !isTunDriver ) |
1159 MPMLOGSTRING2( "CMPMIapSelection::ChooseBestIAPL: \ |
1180 { |
|
1181 // Remove IapId because it's not available |
|
1182 MPMLOGSTRING2( "CMPMIapSelection::ChooseBestIAPL: \ |
1160 Remove unavailable IAP = %i", embeddedIaps[m].iIapId ) |
1183 Remove unavailable IAP = %i", embeddedIaps[m].iIapId ) |
1161 embeddedIaps.Remove( m ); |
1184 embeddedIaps.Remove( m ); |
|
1185 } |
1162 } |
1186 } |
1163 } |
1187 } |
1164 } |
1188 } |
1165 |
1189 |
1166 // Determine the actual priorities for virtual IAPs and embedded Snaps |
1190 // Determine the actual priorities for virtual IAPs and embedded Snaps |