convergedconnectionhandler/cchserver/src/cchuihandler.cpp
branchRCL_3
changeset 14 be41ab7b952f
parent 9 bddb6d4447db
--- a/convergedconnectionhandler/cchserver/src/cchuihandler.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchserver/src/cchuihandler.cpp	Tue May 11 16:04:22 2010 +0300
@@ -244,16 +244,8 @@
 void CCchUIHandler::CheckGprsFirstUsageL( )
     { 
     CCHLOGSTRING( "CCchUIHandler::CheckGprsFirstUsageL - IN" );
-    
-    // Check value from cenrep
-    TInt gprsRoamingCostWarningShown( 0 );
-    
-    User::LeaveIfError( iCchRepository->Get( 
-        KCCHGprsRoamingCostWarningShown, 
-        gprsRoamingCostWarningShown ) );
-    
     // Show gprs roaming cost warning note if not already shown
-    if( !gprsRoamingCostWarningShown )
+    if( !IsCostWarningSeen() )
         {
         iNoteHandler->LaunchGlobalNoteL( 
             R_QTN_SERVTAB_ALLOW_GPRS_WHEN_ROAMING_QUERY, 
@@ -265,6 +257,22 @@
     }
 
 // ---------------------------------------------------------------------------
+// CCchUIHandler::IsCostWarningSeen
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//      
+TBool CCchUIHandler::IsCostWarningSeen() const
+    {
+    TBool response( EFalse );
+    TInt costWarning( KErrNone );
+    iCchRepository->Get( KCCHGprsRoamingCostWarningShown, costWarning );
+
+    response = 1 == costWarning;
+    CCHLOGSTRING2( "CCchUIHandler::IsCostWarningSeen : %d", response );
+    return response;
+    }
+
+// ---------------------------------------------------------------------------
 // CCchUIHandler::NetworkConnectionsAllowed
 // (other items were commented in a header).
 // ---------------------------------------------------------------------------