startupservices/Startup/src/StartupAppUi.cpp
branchRCL_3
changeset 70 739cef680932
parent 63 c2c61fdca848
child 82 4610cd70c542
equal deleted inserted replaced
66:9af619316cbf 70:739cef680932
     1 /*
     1 /*
     2 * Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
  1588 // ----------------------------------------------------------------------------
  1588 // ----------------------------------------------------------------------------
  1589 
  1589 
  1590 TBool CStartupAppUi::DosInOfflineModeL()
  1590 TBool CStartupAppUi::DosInOfflineModeL()
  1591     {
  1591     {
  1592     TRACES("CStartupAppUi::DosInOfflineModeL()");
  1592     TRACES("CStartupAppUi::DosInOfflineModeL()");
  1593     if ( iOfflineModeSupported )
  1593 	
       
  1594 	// Do not display the Offline mode query if the AT cmd  cenrep key (KStartupATcmdCFUNProfileChange) value set to 1 or 2, iAtcmdCfunProfileChange member holds the key  value
       
  1595 	
       
  1596     if ( iOfflineModeSupported && (iAtcmdCfunProfileChange == 0) )
  1594         {
  1597         {
  1595         TRACES1("CStartupAppUi::DosInOfflineModeL(): iOfflineModeSupported == %d", iOfflineModeSupported );
  1598         TRACES1("CStartupAppUi::DosInOfflineModeL(): iOfflineModeSupported == %d", iOfflineModeSupported );
  1596         return UiInOfflineMode();
  1599         return UiInOfflineMode();
  1597         }
  1600         }
  1598     else
  1601     else
  1651 
  1654 
  1652     TInt status( EStartupSimInitWait );
  1655     TInt status( EStartupSimInitWait );
  1653     RProperty::Get(KPSUidStartup, KPSSimStatus, status);
  1656     RProperty::Get(KPSUidStartup, KPSSimStatus, status);
  1654 
  1657 
  1655     TInt reply ( 0 );
  1658     TInt reply ( 0 );
       
  1659 	// AT Command   CFUN specifc code
       
  1660 	CRepository* repository( NULL );
       
  1661 	TInt errVal;
       
  1662 	TRAP( errVal, repository = CRepository::NewL(KCRUidStartupConf) );
       
  1663 	if(errVal == KErrNone)
       
  1664 		{
       
  1665 		errVal = repository->Get(KStartupATcmdCFUNProfileChange, iAtcmdCfunProfileChange);
       
  1666 		if(!errVal && iAtcmdCfunProfileChange >0)
       
  1667 			{
       
  1668 			errVal = repository->Set(KStartupATcmdCFUNProfileChange, 0);
       
  1669 			}        
       
  1670 		}
       
  1671 	delete repository;
  1656     if (status == ESimUsable || status == ESimReadable || status == ESimNotReady || !iSimSupported)
  1672     if (status == ESimUsable || status == ESimReadable || status == ESimNotReady || !iSimSupported)
  1657         {
  1673         {
  1658         TRACES("CStartupAppUi::ShowOfflineModeQueryL(): Show offline mode query if needed");
  1674         TRACES("CStartupAppUi::ShowOfflineModeQueryL(): Show offline mode query if needed");
  1659 
  1675 
  1660         if ( HiddenReset() && DosInOfflineModeL() && !SimStatusChangedReset() )
  1676         if ( HiddenReset() && DosInOfflineModeL() && !SimStatusChangedReset() )
  1701         {
  1717         {
  1702         TRACES("CStartupAppUi::ShowOfflineModeQueryL(): SIM card removed. No offline mode query.");
  1718         TRACES("CStartupAppUi::ShowOfflineModeQueryL(): SIM card removed. No offline mode query.");
  1703         }
  1719         }
  1704 #endif
  1720 #endif
  1705 
  1721 
       
  1722 	// AT Command CFUN  specifc code
       
  1723 	// AT command CFUN implementation  plugin sets  the  key  KStartupATcmdCFUNProfileChange to 1 in the case of Offline to Online profile change
       
  1724 	// AT command CFUN implementation  plugin sets  the  key  KStartupATcmdCFUNProfileChange to 2 in the case of Online  to Offline profile change	
       
  1725 	if(iAtcmdCfunProfileChange == 1)
       
  1726 		{
       
  1727 		reply = 0;
       
  1728 		}
       
  1729 	else if(iAtcmdCfunProfileChange == 2)
       
  1730 		{
       
  1731 		reply = 1;
       
  1732 		}
       
  1733 	// End AT Command  CFUN specifc code	
  1706     TRACES1("CStartupAppUi::ShowOfflineModeQueryL(): BootIntoOffline=%d.", reply);
  1734     TRACES1("CStartupAppUi::ShowOfflineModeQueryL(): BootIntoOffline=%d.", reply);
  1707     TInt err = RProperty::Set( KPSUidStartup,
  1735     TInt err = RProperty::Set( KPSUidStartup,
  1708                                KStartupBootIntoOffline,
  1736                                KStartupBootIntoOffline,
  1709                                reply ? EBootIntoOfflineMode : EBootIntoOnlineMode );
  1737                                reply ? EBootIntoOfflineMode : EBootIntoOnlineMode );
  1710 
  1738