skins/AknSkins/srvsrc/AknsSrv.cpp
branchRCL_3
changeset 24 e4e3998ddda2
parent 23 9dbe1b043bea
child 25 9f95a5546443
equal deleted inserted replaced
23:9dbe1b043bea 24:e4e3998ddda2
    98     AKNS_TRACE_INFO("CAknsSrv::New STARTED");
    98     AKNS_TRACE_INFO("CAknsSrv::New STARTED");
    99 
    99 
   100 	aStartFailed = EFalse;
   100 	aStartFailed = EFalse;
   101 	
   101 	
   102     CAknsSrv* server = new CAknsSrv();
   102     CAknsSrv* server = new CAknsSrv();
       
   103     if ( !server )
       
   104         {
       
   105         AKNS_TRACE_ERROR("CAknsSrv::New SERVER ALLOCATION FAILED!");
       
   106         return NULL;
       
   107         }
       
   108 
   103     server->iMergeType = (TAknsSkinSrvMergeType)(
   109     server->iMergeType = (TAknsSkinSrvMergeType)(
   104         EAknsSkinSrvSkin | EAknsSkinSrvIdleWp );
   110         EAknsSkinSrvSkin | EAknsSkinSrvIdleWp );
   105     server->iBootFinished = EFalse;
   111     server->iBootFinished = EFalse;
   106     if ( server )
   112     if (server->Start(KAknSkinSrvName) != KErrNone)
   107         {
   113         {
   108         if ( server->Start( KAknSkinSrvName ) != KErrNone )
   114         AKNS_TRACE_ERROR("CAknsSrv::New START FAILED!");
   109             {
   115 
   110             AKNS_TRACE_ERROR("CAknsSrv::New START FAILED!");
   116         aStartFailed = ETrue;
   111 
   117         delete server;
   112            	aStartFailed = ETrue;
       
   113             delete server;
       
   114             return NULL;
       
   115             }
       
   116         }
       
   117     else
       
   118         {
       
   119         AKNS_TRACE_ERROR("CAknsSrv::New SERVER ALLOCATION FAILED!");
       
   120         return NULL;
   118         return NULL;
   121         }
   119         }
       
   120 
   122     server->iBitmapStore = new CAknsSrvBitmapStore;
   121     server->iBitmapStore = new CAknsSrvBitmapStore;
   123     if( !server->iBitmapStore )
   122     if( !server->iBitmapStore )
   124         {
   123         {
   125         AKNS_TRACE_ERROR("CAknsSrv::New BITMAPSTORE CREATION FAILED!");
   124         AKNS_TRACE_ERROR("CAknsSrv::New BITMAPSTORE CREATION FAILED!");
   126         delete server;
   125         delete server;
   261     delete iIconConfigMap;
   260     delete iIconConfigMap;
   262     
   261     
   263     iWallpaperCache->ResetAndDestory( );
   262     iWallpaperCache->ResetAndDestory( );
   264     
   263     
   265     iSlidesetEnableAppUidArray.Close();
   264     iSlidesetEnableAppUidArray.Close();
   266 
       
   267     if ( iPackageArray )
       
   268         {
       
   269         iPackageArray->ResetAndDestroy();
       
   270         delete iPackageArray;
       
   271         iPackageArray = NULL;
       
   272         }
       
   273     }
   265     }
   274 
   266 
   275 // -----------------------------------------------------------------------------
   267 // -----------------------------------------------------------------------------
   276 // CAknsSrv::NewSessionL
   268 // CAknsSrv::NewSessionL
   277 // -----------------------------------------------------------------------------
   269 // -----------------------------------------------------------------------------
   349     // Thread/process exit
   341     // Thread/process exit
   350     return( err );
   342     return( err );
   351     }
   343     }
   352 
   344 
   353 // -----------------------------------------------------------------------------
   345 // -----------------------------------------------------------------------------
   354 // CAknsSrv::NotifyBackupOperationEndL
   346 // CAknsSrv::NotifyBackupOperationEnd
   355 // -----------------------------------------------------------------------------
   347 // -----------------------------------------------------------------------------
   356 //
   348 //
   357 void CAknsSrv::NotifyBackupOperationEndL()
   349 void CAknsSrv::NotifyBackupOperationEnd()
   358     {
   350     {
   359     RestoreOldSkinL();
   351     RestoreOldSkin();
   360     }
   352     }
   361 
   353 
   362 // -----------------------------------------------------------------------------
   354 // -----------------------------------------------------------------------------
   363 // CAknsSrv::NotifyLayoutChange
   355 // CAknsSrv::NotifyLayoutChange
   364 // -----------------------------------------------------------------------------
   356 // -----------------------------------------------------------------------------
   520                         WallpaperTimerTimeoutL( ETrue );
   512                         WallpaperTimerTimeoutL( ETrue );
   521                         }
   513                         }
   522                     }
   514                     }
   523                 else
   515                 else
   524                     {
   516                     {
   525                     iChunkMaintainer->SetWallpaper( KAknsIIDWallpaper, KNullDesC, 0);
       
   526                     RestoreDefaultIdleWP();
   517                     RestoreDefaultIdleWP();
       
   518                     // Merge and broadcast
   527                     iContentChanged = ETrue;
   519                     iContentChanged = ETrue;
   528                     BroadcastUpdate();
   520                     MergeAndBroadcast();
   529                     // Also notify potential package list update
   521                     // Also notify potential package list update
   530                     ForceNotifySessions(EAknsSCHNPackageListUpdate);
   522                     ForceNotifySessions(EAknsSCHNPackageListUpdate);
   531                     }
   523                     }
   532                 }
   524                 }
   533             }
   525             }
   585 void CAknsSrv::NotifySlideSetTypeChange()
   577 void CAknsSrv::NotifySlideSetTypeChange()
   586     {
   578     {
   587     }
   579     }
   588 
   580 
   589 // -----------------------------------------------------------------------------
   581 // -----------------------------------------------------------------------------
   590 // CAknsSrv::NotifyWallpaperTypeChangeL
   582 // CAknsSrv::NotifyWallpaperTypeChange
   591 // -----------------------------------------------------------------------------
   583 // -----------------------------------------------------------------------------
   592 //
   584 //
   593 void CAknsSrv::NotifyWallpaperTypeChangeL()
   585 void CAknsSrv::NotifyWallpaperTypeChange()
   594     {
   586     {
   595     if ( iSlideSetObserver )
   587     if ( iSlideSetObserver )
   596         {
   588         {
   597         iSlideSetObserver->Cancel();
   589         iSlideSetObserver->Cancel();
   598         }
   590         }
   604     if (newtype != iWallpaperType)
   596     if (newtype != iWallpaperType)
   605         {
   597         {
   606         // none
   598         // none
   607         if ( newtype == KAknsSkinSrvNoWallpaper )
   599         if ( newtype == KAknsSkinSrvNoWallpaper )
   608             {
   600             {
   609             WallpaperLostL();
   601             WallpaperLost();
   610             }
   602             }
   611         // normal
   603         // normal
   612         else if ( newtype == KAknsSkinSrvImageWallpaper )
   604         else if ( newtype == KAknsSkinSrvImageWallpaper )
   613             {
   605             {
   614             TFileName filename;
   606             TFileName filename;
   816             {
   808             {
   817             // Set previous skin ID as NULL
   809             // Set previous skin ID as NULL
   818             iOldSkin = KAknsNullPkgID;
   810             iOldSkin = KAknsNullPkgID;
   819             }
   811             }
   820         // Wallpaper was on removable drive and it is no longer accessible.
   812         // Wallpaper was on removable drive and it is no longer accessible.
   821         /*if ( iWPOnRemovableDrive && iWPFilename )
   813         if ( iWPOnRemovableDrive && iWPFilename )
   822             {
   814             {
   823             if ( !AknsSrvUtils::IsFile( iFsSession, *iWPFilename ) )
   815             if ( !AknsSrvUtils::IsFile( iFsSession, *iWPFilename ) )
   824                 {
   816                 {
   825                 iWPOnRemovableDrive = EFalse;
   817                 iWPOnRemovableDrive = EFalse;
   826                 WallpaperLostL();
   818                 WallpaperLost();
   827                 }
   819                 }
   828             }*/
   820             }
   829         }
   821         }
   830     }
   822     }
   831 
   823 
   832 // -----------------------------------------------------------------------------
   824 // -----------------------------------------------------------------------------
   833 // CAknsSrv::NotifyBackupOperationBegin
   825 // CAknsSrv::NotifyBackupOperationBegin
   853     
   845     
   854     BackupAndActiveDefaultSkin();
   846     BackupAndActiveDefaultSkin();
   855     }
   847     }
   856 
   848 
   857 // -----------------------------------------------------------------------------
   849 // -----------------------------------------------------------------------------
   858 // CAknsSrv::NotifyUSBRemovalL
   850 // CAknsSrv::NotifyUSBRemoval
   859 // -----------------------------------------------------------------------------
   851 // -----------------------------------------------------------------------------
   860 //
   852 //
   861 void CAknsSrv::NotifyUSBRemovalL()
   853 void CAknsSrv::NotifyUSBRemoval()
   862     {
   854     {
   863     if (!iUSBAttached)
   855     if (!iUSBAttached)
   864         {
   856         {
   865         return;
   857         return;
   866         }
   858         }
   867     iUSBAttached = EFalse;
   859     iUSBAttached = EFalse;
   868     
   860     
   869     RestoreOldSkinL();
   861     RestoreOldSkin();
   870     }
   862     }
   871 
   863 
   872 // -----------------------------------------------------------------------------
   864 // -----------------------------------------------------------------------------
   873 // CAknsSrv::MorhphingEventTimeout
   865 // CAknsSrv::MorhphingEventTimeout
   874 // -----------------------------------------------------------------------------
   866 // -----------------------------------------------------------------------------
   896 
   888 
   897     ForceNotifySessions( EAknsSCHNPackageListUpdate );
   889     ForceNotifySessions( EAknsSCHNPackageListUpdate );
   898     }
   890     }
   899 
   891 
   900 // -----------------------------------------------------------------------------
   892 // -----------------------------------------------------------------------------
   901 // CAknsSrv::WallpaperLostL
   893 // CAknsSrv::WallpaperLost
   902 // -----------------------------------------------------------------------------
   894 // -----------------------------------------------------------------------------
   903 //
   895 //
   904 void CAknsSrv::WallpaperLostL()
   896 void CAknsSrv::WallpaperLost()
   905     {
   897     {
   906     if ( iUSBAttached && iWPOnRemovableDrive )
   898     if ( iUSBAttached && iWPOnRemovableDrive )
   907         {
   899         {
   908         return;
   900         return;
   909         }
   901         }
  1375 // -----------------------------------------------------------------------------
  1367 // -----------------------------------------------------------------------------
  1376 // CAknsSrv::StartAnimBackgroundL
  1368 // CAknsSrv::StartAnimBackgroundL
  1377 // -----------------------------------------------------------------------------
  1369 // -----------------------------------------------------------------------------
  1378 void CAknsSrv::StartAnimBackgroundL()
  1370 void CAknsSrv::StartAnimBackgroundL()
  1379     {
  1371     {
       
  1372     if ( iSettings->TransitionFxState() == KMaxTInt )
       
  1373         {
       
  1374         //Stop anim effects
       
  1375         iSettings->SetAnimBackgroundState( KMaxTInt );
       
  1376         return;
       
  1377         }
       
  1378     
  1380     const TUid KCRUidThemesVariation = { 0x102818EB };
  1379     const TUid KCRUidThemesVariation = { 0x102818EB };
  1381     const TUint32 KThemesLocalVariation  = 0x00000001;
  1380     const TUint32 KThemesLocalVariation  = 0x00000001;
  1382     
  1381     
  1383     // Enable animated background setting.
  1382     // Enable animated background setting.
  1384     // Bitmask value in decimals: 2048.
  1383     // Bitmask value in decimals: 2048.
  1395 
  1394 
  1396     if ( (value & KPslnSupportAnimBackground) && 
  1395     if ( (value & KPslnSupportAnimBackground) && 
  1397          ActiveSkinAnimBgSupportL()
  1396          ActiveSkinAnimBgSupportL()
  1398          )
  1397          )
  1399         {
  1398         {
  1400         if ( iAnimBgToBeRestored )
  1399         //Start anim effects
  1401             {
  1400         iSettings->SetAnimBackgroundState( 0 );
  1402             //Restore anim effects
       
  1403             iSettings->SetAnimBackgroundState( 0 );
       
  1404             iAnimBgToBeRestored = EFalse;
       
  1405             }
       
  1406         }
  1401         }
  1407     else
  1402     else
  1408         {
  1403         {
  1409         //Stop anim effects
  1404         //Stop anim effects
  1410         if ( iSettings->AnimBackgroundState() == KErrNone )
  1405         iSettings->SetAnimBackgroundState( KMaxTInt );
  1411             {
       
  1412             iAnimBgToBeRestored = ETrue;
       
  1413             iSettings->SetAnimBackgroundState( KMaxTInt );
       
  1414             }
       
  1415         }
  1406         }
  1416     }
  1407     }
  1417 
  1408 
  1418 // -----------------------------------------------------------------------------
  1409 // -----------------------------------------------------------------------------
  1419 // CAknsSrv::SetWallpaperL
  1410 // CAknsSrv::SetWallpaperL
  1427         !aIsSlide)
  1418         !aIsSlide)
  1428         {
  1419         {
  1429         iCurrentSlide = 0;
  1420         iCurrentSlide = 0;
  1430         WallpaperTimerL()->Stop();
  1421         WallpaperTimerL()->Stop();
  1431         }
  1422         }
  1432     if (!aIsSlide && iSlideSetNameArray)
  1423    if (!aIsSlide && iSlideSetNameArray)
  1433         {
  1424         {
  1434         delete iSlideSetNameArray;
  1425         delete iSlideSetNameArray;
  1435         iSlideSetNameArray = NULL;
  1426         iSlideSetNameArray = NULL;
  1436         }
  1427         }
  1437 
  1428 
  1470             delete mask;
  1461             delete mask;
  1471             if ( err )
  1462             if ( err )
  1472                 {
  1463                 {
  1473                 User::LeaveIfError( err );
  1464                 User::LeaveIfError( err );
  1474                 }
  1465                 }
  1475             
  1466             }
  1476             if (!BaflUtils::FileExists(iFsSession, aFilename))
  1467         
  1477                 {
       
  1478                 iSettings->WriteIdleBackgroundToDefault();
       
  1479                 return;
       
  1480                 }
       
  1481             }
       
  1482 
       
  1483         isprotected = AknsSrvUtils::IsDrmProtectedL(aFilename);
  1468         isprotected = AknsSrvUtils::IsDrmProtectedL(aFilename);
  1484         }
  1469         if (!BaflUtils::FileExists(iFsSession, aFilename))
  1485 
  1470             {
       
  1471             iSettings->WriteIdleBackgroundToDefault();
       
  1472             return;
       
  1473             }
       
  1474         }
  1486     if (isprotected)
  1475     if (isprotected)
  1487         {
  1476         {
  1488         CheckAndCreateDRMHelper();
  1477         CheckAndCreateDRMHelper();
  1489 
  1478 
  1490         // Get fileInfo
  1479         // Get fileInfo
  1534         CleanupStack::PopAndDestroy(contenturi);
  1523         CleanupStack::PopAndDestroy(contenturi);
  1535         }
  1524         }
  1536 
  1525 
  1537     iChunkMaintainer->SetWallpaper( aIID, aFilename, 0);
  1526     iChunkMaintainer->SetWallpaper( aIID, aFilename, 0);
  1538 
  1527 
  1539     // Set the wallpaper type as correct.
  1528 // Set the wallpaper type as correct.
  1540     if ( !aIsSlide )
  1529     if ( aFilename != KNullDesC && !aIsSlide )
  1541         {
  1530         {
  1542         if ( aFilename != KNullDesC )
  1531         iWallpaperType = KAknsSkinSrvImageWallpaper;
  1543             {
  1532         }
  1544             iWallpaperType = KAknsSkinSrvImageWallpaper;
  1533     else if ( aFilename == KNullDesC && !aIsSlide )
  1545             }
  1534         {
  1546         else
  1535         iWallpaperType = KAknsSkinSrvNoWallpaper;
  1547             {
       
  1548             iWallpaperType = KAknsSkinSrvNoWallpaper;
       
  1549             }
       
  1550 
       
  1551         iSettings->WriteWallpaperType( iWallpaperType );
       
  1552         iSettings->WriteWallpaperPath( aFilename );
       
  1553         }
  1536         }
  1554 
  1537 
  1555     iContentChanged = ETrue;
  1538     iContentChanged = ETrue;
  1556     if ( aFilename.Length() >0 )
  1539     if ( aFilename.Length() >0 )
  1557         {
  1540         {
  1765                 ContentAccess::EView,
  1748                 ContentAccess::EView,
  1766                 CDRMHelper::EFinish );
  1749                 CDRMHelper::EFinish );
  1767             }
  1750             }
  1768         }
  1751         }
  1769     
  1752     
       
  1753     CRepository* skinsrep = CRepository::NewL(KCRUidPersonalisation);
       
  1754     CleanupStack::PushL(skinsrep);
       
  1755     
  1770     if ( slideCount > 1 )
  1756     if ( slideCount > 1 )
  1771         {
  1757         {
  1772         SetWallpaperL( iSlideSetNameArray->MdcaPoint(iCurrentSlide),KAknsIIDWallpaper, ETrue );
  1758         SetWallpaperL( iSlideSetNameArray->MdcaPoint(iCurrentSlide),KAknsIIDWallpaper, ETrue );
  1773         iSettings->WriteWallpaperPath( iSlideSetNameArray->MdcaPoint(iCurrentSlide) );
  1759         skinsrep->Set(KPslnIdleBackgroundImagePath, iSlideSetNameArray->MdcaPoint(iCurrentSlide));
  1774         iMergeType = (TAknsSkinSrvMergeType)(iMergeType | EAknsSkinSrvIdleWp);
  1760         iMergeType = (TAknsSkinSrvMergeType)(iMergeType | EAknsSkinSrvIdleWp);
  1775         iContentChanged = ETrue;
  1761         iContentChanged = ETrue;
  1776         BroadcastUpdate();
  1762         BroadcastUpdate();
  1777         iCurrentSlide++;
  1763         iCurrentSlide++;
  1778         if ( iCurrentSlide >= slideCount )
  1764         if ( iCurrentSlide >= slideCount )
  1794 
  1780 
  1795         if ( slideCount && BaflUtils::FileExists(iFsSession, fname) )
  1781         if ( slideCount && BaflUtils::FileExists(iFsSession, fname) )
  1796             {
  1782             {
  1797             SetWallpaperL( fname,KAknsIIDWallpaper );
  1783             SetWallpaperL( fname,KAknsIIDWallpaper );
  1798             iWallpaperType = KAknsSkinSrvImageWallpaper;
  1784             iWallpaperType = KAknsSkinSrvImageWallpaper;
  1799             iSettings->WriteWallpaperPath( fname );
  1785             User::LeaveIfError(skinsrep->Set(KPslnIdleBackgroundImagePath, fname));
  1800             iSettings->WriteWallpaperType( iWallpaperType );
  1786             User::LeaveIfError(skinsrep->Set(KPslnWallpaperType, iWallpaperType));
  1801             }
  1787             }
  1802         else
  1788         else
  1803             {
  1789             {
  1804             SetWallpaperL( KNullDesC,KAknsIIDWallpaper );
  1790             SetWallpaperL( KNullDesC,KAknsIIDWallpaper );
  1805             iSettings->WriteIdleBackgroundToDefault();
  1791             iSettings->WriteIdleBackgroundToDefault();
  1814 
  1800 
  1815         iMergeType = (TAknsSkinSrvMergeType)(iMergeType | EAknsSkinSrvIdleWp);
  1801         iMergeType = (TAknsSkinSrvMergeType)(iMergeType | EAknsSkinSrvIdleWp);
  1816         iContentChanged = ETrue;
  1802         iContentChanged = ETrue;
  1817         BroadcastUpdate();
  1803         BroadcastUpdate();
  1818         }
  1804         }
       
  1805     CleanupStack::PopAndDestroy( skinsrep );
  1819     }
  1806     }
  1820 
  1807 
  1821 // -----------------------------------------------------------------------------
  1808 // -----------------------------------------------------------------------------
  1822 // Sets slide set wallpaper.
  1809 // Sets slide set wallpaper.
  1823 // -----------------------------------------------------------------------------
  1810 // -----------------------------------------------------------------------------
  1825 void CAknsSrv::SetSlidesetWallpaperL( )
  1812 void CAknsSrv::SetSlidesetWallpaperL( )
  1826     {
  1813     {
  1827     ReadSlideSetImageFilesL();
  1814     ReadSlideSetImageFilesL();
  1828 
  1815 
  1829     iWallpaperType = KAknsSkinSrvSlidesetWallpaper;
  1816     iWallpaperType = KAknsSkinSrvSlidesetWallpaper;
  1830     iSettings->WriteWallpaperType( iWallpaperType );
       
  1831 
  1817 
  1832     SetSlideSetTimerActiveL();
  1818     SetSlideSetTimerActiveL();
  1833 
  1819 
  1834     StopSlidesetIniFileObserver();
  1820     StopSlidesetIniFileObserver();
  1835     TFileName fileName;
  1821     TFileName fileName;
  2289             }
  2275             }
  2290         TPtr8 pkgptr((TUint8*)( iPackageArray->At(count)),
  2276         TPtr8 pkgptr((TUint8*)( iPackageArray->At(count)),
  2291             sizeof(TAknsSrvSkinInfoPkg),sizeof(TAknsSrvSkinInfoPkg));
  2277             sizeof(TAknsSrvSkinInfoPkg),sizeof(TAknsSrvSkinInfoPkg));
  2292         aMessage.Write(1,pkgptr,count*sizeof(TAknsSrvSkinInfoPkg));
  2278         aMessage.Write(1,pkgptr,count*sizeof(TAknsSrvSkinInfoPkg));
  2293         }
  2279         }
       
  2280     if ( iPackageArray )
       
  2281         {
       
  2282         iPackageArray->ResetAndDestroy();
       
  2283         }
       
  2284     delete iPackageArray;
       
  2285     iPackageArray = NULL;
  2294     }
  2286     }
  2295 
  2287 
  2296 // -----------------------------------------------------------------------------
  2288 // -----------------------------------------------------------------------------
  2297 // CAknsSrv::DecodeWallpaperImageL
  2289 // CAknsSrv::DecodeWallpaperImageL
  2298 // -----------------------------------------------------------------------------
  2290 // -----------------------------------------------------------------------------
  2361     
  2353     
  2362     iWallpaperCache->AddL( iFsSession, filename, trgSize, iMaxWallpaperSize ); 
  2354     iWallpaperCache->AddL( iFsSession, filename, trgSize, iMaxWallpaperSize ); 
  2363     return;    
  2355     return;    
  2364     }
  2356     }
  2365 // -----------------------------------------------------------------------------
  2357 // -----------------------------------------------------------------------------
  2366 // CAknsSrv::FreeDecodedWallpaperL
  2358 // CAknsSrv::FreeDecodedWallpaper
  2367 // -----------------------------------------------------------------------------
  2359 // -----------------------------------------------------------------------------
  2368 //
  2360 //
  2369 void CAknsSrv::FreeDecodedWallpaperL( const RMessage2 aMessage )
  2361 void CAknsSrv::FreeDecodedWallpaper( const RMessage2 aMessage )
  2370     {
  2362     {
  2371     TFileName filename;
  2363     TFileName filename;
  2372     aMessage.ReadL( 0, filename );
  2364     aMessage.ReadL( 0, filename );
  2373     if ( filename.Length() )
  2365     if ( filename.Length() )
  2374         {
  2366         {
  2778 
  2770 
  2779 // -----------------------------------------------------------------------------
  2771 // -----------------------------------------------------------------------------
  2780 // Reactive backup skin.
  2772 // Reactive backup skin.
  2781 // -----------------------------------------------------------------------------
  2773 // -----------------------------------------------------------------------------
  2782 //
  2774 //
  2783 void CAknsSrv::RestoreOldSkinL()
  2775 void CAknsSrv::RestoreOldSkin()
  2784     {
  2776     {
  2785     if (iOldSkin != KAknsNullPkgID)
  2777     if (iOldSkin != KAknsNullPkgID)
  2786         {
  2778         {
  2787            
  2779            
  2788         if ( iSettings->CachedSkinPID() != iSettings->DefaultSkinPID() )
  2780         if ( iSettings->CachedSkinPID() != iSettings->DefaultSkinPID() )
  2791             iOldSkin = KAknsNullPkgID;
  2783             iOldSkin = KAknsNullPkgID;
  2792             return;
  2784             return;
  2793             }
  2785             }
  2794             
  2786             
  2795         SetActiveSkinContent( iOldSkin  );
  2787         SetActiveSkinContent( iOldSkin  );
  2796         if ( MergeAndBroadcast() == KErrNone )
  2788         iSettings->WriteSkinSettings(iOldSkin, ETrue);
  2797             {
       
  2798             iSettings->WriteSkinSettings(iOldSkin, ETrue);
       
  2799             }
       
  2800         iOldSkin = KAknsNullPkgID;
  2789         iOldSkin = KAknsNullPkgID;
       
  2790         MergeAndBroadcast();
  2801         return; // if skin was on mmc, the wallpaper is handled aswell
  2791         return; // if skin was on mmc, the wallpaper is handled aswell
  2802         }
  2792         }
  2803     // skin was not on mmc, but wp was
  2793     // skin was not on mmc, but wp was
  2804     if ( iWPOnRemovableDrive && iWPFilename )
  2794     if ( iWPOnRemovableDrive && iWPFilename )
  2805         {
  2795         {
  2813                 }
  2803                 }
  2814             }
  2804             }
  2815         else
  2805         else
  2816             {
  2806             {
  2817             iWPOnRemovableDrive = EFalse;
  2807             iWPOnRemovableDrive = EFalse;
  2818             WallpaperLostL();
  2808             WallpaperLost();
  2819             }
  2809             }
  2820         }
  2810         }
  2821     }
  2811     }
  2822 
  2812 
  2823 // ========================== OTHER EXPORTED FUNCTIONS =========================
  2813 // ========================== OTHER EXPORTED FUNCTIONS =========================