--- a/contentpublishingsrv/contentpublishingutils/contentpublishingdebug/src/cpdebug.cpp Tue Sep 14 21:55:16 2010 +0300
+++ b/contentpublishingsrv/contentpublishingutils/contentpublishingdebug/src/cpdebug.cpp Wed Sep 15 12:32:36 2010 +0300
@@ -167,12 +167,15 @@
RDebug::Printf( "CPS Client::Request %s Parameters: \n", aStringParam );
for ( TInt i = 0; i < aInParamList.Count( ); i++ )
{
- TLiwGenericParam tempParam;
- tempParam.PushL();
- TRAP_IGNORE( aInParamList.AtL(i ,tempParam) );
- Dump( tempParam.Value() );
- CleanupStack::Pop(&tempParam);
- tempParam.Reset();
+ TRAP_IGNORE(
+ {
+ TLiwGenericParam tempParam;
+ tempParam.PushL();
+ aInParamList.AtL(i ,tempParam);
+ Dump( tempParam.Value() );
+ CleanupStack::Pop(&tempParam);
+ tempParam.Reset();
+ } );
}
}
--- a/idlefw/hslaunch/src/hslaunch.cpp Tue Sep 14 21:55:16 2010 +0300
+++ b/idlefw/hslaunch/src/hslaunch.cpp Wed Sep 15 12:32:36 2010 +0300
@@ -21,7 +21,6 @@
// ========================= DECLARATIONS ==================================
_LIT( KHsExeName, "homescreen.exe" );
-_LIT( KHsProcessName, "Home screen" );
const TInt KSleepOnRetry = 250000; // 250ms
const TUid KPSCategoryUid = TUid::Uid( 0x200286E3 );
const TInt KPSCrashCountKey = 1;
@@ -186,17 +185,11 @@
// -----------------------------------------------------------------------------
//
void CHsLaunch::RunL()
- {
- // Create app or connect to existing.
- TInt processExisted = EFalse;
-
+ {
+ // Create process
RProcess process;
- TInt processError = process.Create( KHsExeName, KNullDesC );
- if( processError == KErrAlreadyExists )
- {
- processError = process.Open( KHsProcessName, EOwnerProcess );
- processExisted = ETrue;
- }
+ TInt processError = KErrNone;
+ processError = process.Create( KHsExeName, KNullDesC );
TInt monitorError = KErrNone;
if( processError == KErrNone )
@@ -204,8 +197,7 @@
TRAP( monitorError, InitProcessMonitorL( process.Id() ) );
}
- if( processError == KErrNone &&
- !processExisted )
+ if( processError == KErrNone )
{
// Make sure process is started even if monitor startup
// fails. This will assure that process is not left in
--- a/idlefw/plugins/mcsplugin/handler/src/mcspluginhandler.cpp Tue Sep 14 21:55:16 2010 +0300
+++ b/idlefw/plugins/mcsplugin/handler/src/mcspluginhandler.cpp Wed Sep 15 12:32:36 2010 +0300
@@ -30,7 +30,7 @@
#include <mcsmenuitem.h>
#include <mcspluginparamval.h>
#include <LogsUiCmdStarter.h>
-#include <APGCLI.H>
+#include <apgcli.h>
// User includes
#include "mcsplugincompletedoperation.h"
--- a/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp Tue Sep 14 21:55:16 2010 +0300
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp Wed Sep 15 12:32:36 2010 +0300
@@ -50,8 +50,7 @@
_LIT( KResourceFile, "mcspluginres.rsc" );
_LIT( KResPath, "\\resource\\" );
_LIT( KMMApplication, "mm://" );
-_LIT( KSetFocusString, "!setfocus?applicationgroup_name=" );
-_LIT( KApplicationGroupName, "applicationgroup_name" );
+_LIT( KSetOpenItemString, "!openitem?id=" );
_LIT( KIcon, "icon" );
_LIT( KMenuAttrUndefUid, "0x99999991" );
_LIT( KMenuIconFile, "aimcsplugin.mif" );
@@ -73,6 +72,9 @@
const TInt KMaxCustomMsg = 256;
const TInt KUndefinedIndex = -1;
+// maximun integer character length
+const TInt KMaxLength = 12;
+
// ======== LOCAL FUNCTIONS ========
// ----------------------------------------------------------------------------
// NextIdToken
@@ -592,24 +594,15 @@
HBufC8* message;
// prepare message for launching folder
- TBool hasApplicationGroupName( EFalse );
+ TBuf<KMaxLength> itemId;
+ itemId.Num( item->Id() );
- TPtrC applicationGroupName( item->GetAttributeL(
- KApplicationGroupName, hasApplicationGroupName ) );
-
- if ( !hasApplicationGroupName )
- {
- CleanupStack::PopAndDestroy( item );
- return;
- }
-
- message = HBufC8::NewLC( KMMApplication().Length() +
- KSetFocusString().Length() +
- applicationGroupName.Length() );
-
+ message = HBufC8::NewLC( KMMApplication().Length()
+ + KSetOpenItemString().Length()
+ + itemId.Length() );
message->Des().Copy( KMMApplication );
- message->Des().Append( KSetFocusString );
- message->Des().Append( applicationGroupName );
+ message->Des().Append( KSetOpenItemString );
+ message->Des().Append( itemId );
// find MM application
TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
--- a/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsbkmlist.h Tue Sep 14 21:55:16 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsbkmlist.h Wed Sep 15 12:32:36 2010 +0300
@@ -109,6 +109,13 @@
TSettingItem FindItemL(
RPointerArray<HSPluginSettingsIf::CPropertyMap>& aProperties );
+ /**
+ * Checks with a given index if bookmark has been hidden from menulist
+ *
+ * @param aIndex Index of the bookmark in the list
+ * @return ETrue if the bookmark is hidden, EFalse otherwise
+ */
+ TBool ItemHidden( TInt aIndex );
protected:
@@ -236,6 +243,11 @@
* Target bookmark parameters
*/
HBufC* iUrl;
+
+ /**
+ * Target bookmark hidden
+ */
+ TBool iHidden;
private:
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsapplist.cpp Tue Sep 14 21:55:16 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsapplist.cpp Wed Sep 15 12:32:36 2010 +0300
@@ -215,7 +215,7 @@
// otherwise, compare attributes from HSPS and from menuitem
// if there is no match, move to the next item in the list
- if ( attr != *attrValue )
+ if ( attr.CompareF( *attrValue ) != 0 )
{
match = EFalse;
}
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsbkmlist.cpp Tue Sep 14 21:55:16 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsbkmlist.cpp Wed Sep 15 12:32:36 2010 +0300
@@ -28,6 +28,7 @@
_LIT( KUrl, "url" );
_LIT8( KUid, "uid" );
_LIT( KMenuAttrParameter, "param" );
+_LIT8( KMenuAttrParameter8, "param" );
// ======== MEMBER FUNCTIONS ========
@@ -85,7 +86,13 @@
//
TInt CMCSPluginSettingsBkmList::MdcaCount() const
{
- return iListItems.Count();
+ TInt listItemsCount( 0 );
+ for( TInt i = 0; i< iListItems.Count(); i++ )
+ {
+ if( !iListItems[i]->iHidden )
+ listItemsCount++;
+ }
+ return listItemsCount;
}
// ---------------------------------------------------------------------------
@@ -104,38 +111,79 @@
}
// ---------------------------------------------------------------------------
+// Checks with a given index if bookmark has been hidden from menulist.
+// ---------------------------------------------------------------------------
+//
+TBool CMCSPluginSettingsBkmList::ItemHidden( TInt aIndex )
+ {
+ if ( aIndex < 0 || aIndex >= iListItems.Count( ))
+ {
+ return EFalse;
+ }
+ return iListItems[aIndex]->iHidden;
+ }
+
+// ---------------------------------------------------------------------------
// Iterates thru the bookmark list and tries to find a menuitem which
// matches given property map from HSPS
// ---------------------------------------------------------------------------
//
-TSettingItem CMCSPluginSettingsBkmList::FindItemL( RPointerArray<HSPluginSettingsIf::CPropertyMap>& aProperties )
+TSettingItem CMCSPluginSettingsBkmList::FindItemL(
+ RPointerArray<HSPluginSettingsIf::CPropertyMap>& aProperties )
{
+ HBufC* uid( NULL );
+ HBufC* param( NULL );
TInt index( KErrNotFound );
TSettingItem settingItem = { KErrNotFound, EBookmark, EFalse, EFalse };
+
+ // read property values
for( TInt i= 0; i < aProperties.Count(); i++ )
{
if( aProperties[i]->Name() == KUid )
{
- HBufC* value( NULL );
- value = AiUtility::CopyToBufferL( value, aProperties[i]->Value());
- for( TInt j = 0; j < iListItems.Count(); j++ )
- {
- TPtrC uid = *iListItems[j]->iUid;
- if( uid.Compare( *value ) == 0 )
- {
- index = j;
- break;
- }
- }
- delete value;
+ uid = AiUtility::CopyToBufferL(
+ uid, aProperties[i]->Value() );
+ CleanupStack::PushL( uid );
+ }
+ else if( aProperties[i]->Name() == KMenuAttrParameter8 )
+ {
+ param = AiUtility::CopyToBufferL(
+ param, aProperties[i]->Value() );
+ CleanupStack::PushL( param );
}
- if( index != KErrNotFound )
+ }
+
+ // try to find a match
+ for( TInt j = 0; j < iListItems.Count(); j++ )
+ {
+ TPtrC value = *iListItems[j]->iUid;
+ if( value.Compare( *uid ) == 0 )
{
- settingItem.id = index;
- settingItem.type = EBookmark;
+ index = j;
break;
}
}
+
+ // menuitem not found, add a new one
+ if( index == KErrNotFound && uid && param )
+ {
+ CBkmListItem* listItem = CBkmListItem::NewLC( *uid, *param );
+ listItem->iType = EFavBookmark;
+ listItem->iUrl = KNullDesC().AllocL();
+ listItem->iHidden = ETrue;
+ iListItems.Append( listItem );
+ CleanupStack::Pop( listItem );
+
+ TInt listItemsCount = iListItems.Count();
+ TPtrC value = *iListItems[--listItemsCount]->iUid;
+ if( value.Compare( *uid ) == 0 )
+ index = listItemsCount;
+ }
+
+ if( param ) CleanupStack::PopAndDestroy( param );
+ if( uid ) CleanupStack::PopAndDestroy( uid );
+
+ settingItem.id = index;
return settingItem;
}
@@ -319,7 +367,7 @@
//Nested class to store individual bookmark list items
// ---------------------------------------------------------------------------
//
-CMCSPluginSettingsBkmList::CBkmListItem::CBkmListItem()
+CMCSPluginSettingsBkmList::CBkmListItem::CBkmListItem() : iHidden( EFalse )
{
}
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp Tue Sep 14 21:55:16 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp Wed Sep 15 12:32:36 2010 +0300
@@ -186,7 +186,14 @@
{
appListIndex = -1;
}
-
+
+ // if the selected item is hidden, set selected item to -1
+ TBool itemHidden = iModel->BkmList()->ItemHidden( appListIndex );
+ if ( itemHidden )
+ {
+ appListIndex = -1;
+ }
+
changed = HandleBookmarkChangeCommandL( appListIndex, current );
}
--- a/idlefw/plugins/profileplugin/src/caiprofileplugin.cpp Tue Sep 14 21:55:16 2010 +0300
+++ b/idlefw/plugins/profileplugin/src/caiprofileplugin.cpp Wed Sep 15 12:32:36 2010 +0300
@@ -263,18 +263,6 @@
}
}
- // in case of Offline profile profile indicator is not shown
- if ( observer->CanPublish( *this, EAiProfileContentActiveProfileName, EAiProfileContentActiveProfileName ) &&
- iEngine->IsOffline() )
- {
- observer->Clean( *this, EAiProfileActiveProfileSilentChar, EAiProfileActiveProfileSilentChar );
- observer->Clean( *this, EAiProfileActiveProfileIcon, 1 );
- observer->Clean( *this, EAiProfileActiveProfileIcon, 2 );
-
- // uncomment also this and respective policy lines in profiles.xml if whole widget needs to be hidden in AI3
- //observer->Clean( *this, EAiProfileContentActiveProfileName, EAiProfileContentActiveProfileName );
- }
-
if ( err == KErrNone )
{
err = observer->Commit( transactionId );
--- a/idlefw/tsrc/framework/ut_aifw/ut_aipluginfactory/src/ut_aipluginfactory.cpp Tue Sep 14 21:55:16 2010 +0300
+++ b/idlefw/tsrc/framework/ut_aifw/ut_aipluginfactory/src/ut_aipluginfactory.cpp Wed Sep 15 12:32:36 2010 +0300
@@ -177,32 +177,29 @@
THsPublisherInfo unknown(
TUid::Uid( KUnknownUid ), KUnknown, KNs1 );
- // create 2 same without waiting first to finnish. Second should return
- // KErrAlreadyExists
+ // create 2 same without waiting first to finnish.
+ // Second won't be appended to load queue.
TAiFwPublisherInfo info( data, TAiFwCallback( CallBack, this ), EAiFwSystemStartup );
iFactory->LoadPlugin( info );
iFactory->LoadPlugin( info );
iWait->Start();
- EUNIT_ASSERT_EQUALS( iResult, KErrAlreadyExists );
EUNIT_ASSERT_EQUALS( iFactory->PluginByInfo( data ) != NULL, ETrue );
-
+
// wait for destroy to finnish
iFactory->DestroyPlugin( info );
iPeriodic->Start( KDestroyDelay, KDestroyDelay, TCallBack( TimerCallBack, this ) );
iWait->Start();
EUNIT_ASSERT_EQUALS( iFactory->PluginByInfo( data ) == NULL, ETrue );
EUNIT_ASSERT_EQUALS( iFactory->Publishers().Count(), 0 );
-
- // create 2 same and wait first to finnish. Second should return
- // KErrAlreadyExists
+
+ // create 2 same and wait first to finnish.
+ // Second won't be appended to load queue.
iFactory->LoadPlugin( info );
iWait->Start();
EUNIT_ASSERT_EQUALS( iResult, KErrNone );
EUNIT_ASSERT_EQUALS( iFactory->PluginByInfo( data ) != NULL, ETrue );
iFactory->LoadPlugin( info );
- iWait->Start();
- EUNIT_ASSERT_EQUALS( iResult, KErrAlreadyExists );
EUNIT_ASSERT_EQUALS( iFactory->PluginByInfo( data ) != NULL, ETrue );
// Test missing namespace
--- a/menucontentsrv/srvinc/menusrvappscanner.h Tue Sep 14 21:55:16 2010 +0300
+++ b/menucontentsrv/srvinc/menusrvappscanner.h Wed Sep 15 12:32:36 2010 +0300
@@ -177,7 +177,7 @@
* @param aOperation operation type.
*/
void HandleInstallNotifyL( TUid aUid,
- CMcsInstallNotifier::TNotificationType aNotificationType );
+ CMcsInstallNotifier::TNotificationType aNotificationType );
private: // new methods
@@ -255,7 +255,7 @@
/**
*/
- void SetHidden( const TDesC& aHiddenAppUid,
+ void SetHiddenL( const TDesC& aHiddenAppUid,
RPointerArray<CMenuSrvAppAttributes>& aArray );
/**
@@ -389,7 +389,7 @@
* @return ETrue if drive is in use.
*/
TBool IsDriveInUse(
- const DriveInfo::TDefaultDrives& aDefaultDrive );
+ const DriveInfo::TDefaultDrives& aDefaultDrive );
/**
TODO
@@ -430,7 +430,7 @@
TODO
*/
void UpdateApplicationItemL(
- RArray<TMenuItem>& aMcsItems,
+ RArray<TMenuItem>& aMcsItems,
const CMenuSrvAppAttributes& aApaItem,
TUint aMmcId,
TBool isLegacy );
--- a/menucontentsrv/srvsrc/mcsdrmhandler.cpp Tue Sep 14 21:55:16 2010 +0300
+++ b/menucontentsrv/srvsrc/mcsdrmhandler.cpp Wed Sep 15 12:32:36 2010 +0300
@@ -87,8 +87,8 @@
void CMcsDrmHandler::ConstructL()
{
iScanner = CMcsDrmScanner::NewL( *this, iSrvEng, iUtils );
- iInstallNotifier = CMcsInstallNotifier::NewL(
- *this, CMcsInstallNotifier::EJavaInstallNotification );
+ iInstallNotifier = CMcsInstallNotifier::NewL(
+ *this, CMcsInstallNotifier::EJavaInstallNotification );
}
@@ -128,10 +128,10 @@
void CMcsDrmHandler::HandleDrmEvent( TUid aUid )
{
TRAP_IGNORE(
- iSrvEng.Engine().AppendNotifyL( AppFolderIdL( aUid ),
- RMenuNotifier::EItemAttributeChanged );
- iScanner->RemoveObserverAndScanL( aUid );
- );
+ iSrvEng.Engine().AppendNotifyL( AppFolderIdL( aUid ),
+ RMenuNotifier::EItemAttributeChanged );
+ iScanner->RemoveObserverAndScanL( aUid );
+ );
}
// -----------------------------------------------------------------------------
@@ -147,7 +147,7 @@
// -----------------------------------------------------------------------------
//
void CMcsDrmHandler::AddRemoveObserversL(
- const RArray<TUid>& aDrmProtectedArray )
+ const RArray<TUid>& aDrmProtectedArray )
{
iObserversManager.RemoveMissingObservers( aDrmProtectedArray );
iObserversManager.CreateObserversL( aDrmProtectedArray, *this );
@@ -169,11 +169,11 @@
// ---------------------------------------------------------
//
void CMcsDrmHandler::HandleInstallNotifyL( TUid aPackageUid,
- CMcsInstallNotifier::TNotificationType aNotificationType )
- {
+ CMcsInstallNotifier::TNotificationType /*aNotificationType*/ )
+ {
if( aPackageUid != TUid::Null() )
{
- if ( ( iScanner->DrmExpiredAppArray()).Find( aPackageUid )
+ if( ( iScanner->DrmExpiredAppArray() ).Find( aPackageUid )
!= KErrNotFound )
{
HandleDrmEvent( aPackageUid );
@@ -183,21 +183,20 @@
iObserversManager.RefreshObserverL(
iScanner->DrmProtectedAppArray(), aPackageUid, *this );
}
- }
- else
- {
- for ( TInt i = 0; i< iScanner->DrmProtectedAppArray().Count(); i++ )
- {
+ }
+ else
+ {
+ for( TInt i = 0; i < iScanner->DrmProtectedAppArray().Count(); i++ )
+ {
iObserversManager.RefreshObserverL(
iScanner->DrmProtectedAppArray(),
- iScanner->DrmProtectedAppArray()[i],
- *this );
- }
- for ( TInt i = 0; i< iScanner->DrmExpiredAppArray().Count(); i++ )
- {
- HandleDrmEvent( iScanner->DrmExpiredAppArray()[i] );
- }
- }
+ iScanner->DrmProtectedAppArray()[i], *this );
+ }
+ for( TInt i = 0; i < iScanner->DrmExpiredAppArray().Count(); i++ )
+ {
+ HandleDrmEvent( iScanner->DrmExpiredAppArray()[i] );
+ }
+ }
}
--- a/menucontentsrv/srvsrc/menusrvappscanner.cpp Tue Sep 14 21:55:16 2010 +0300
+++ b/menucontentsrv/srvsrc/menusrvappscanner.cpp Wed Sep 15 12:32:36 2010 +0300
@@ -97,8 +97,8 @@
iCenRepNotifyHandlerCPHiddenFolders->StopListening();
}
delete iCenRepNotifyHandlerCPHiddenFolders;
- delete iCenRepSession;
- delete iFreeSpaceObserver;
+ delete iCenRepSession;
+ delete iFreeSpaceObserver;
iInstalledPackages.Close();
}
@@ -126,13 +126,13 @@
User::LeaveIfError( iFs.PrivatePath( path ) );
TUint attribute;
if( iFs.Att( path, attribute) == KErrNotFound )
- {
+ {
TInt mdRes = iFs.MkDirAll( path );
if ( mdRes != KErrNone )
- {
- User::Leave( mdRes );
- }
- }
+ {
+ User::Leave( mdRes );
+ }
+ }
iMmcHistory = new (ELeave) CMenuSrvMmcHistory();
iMmcHistory->LoadL( iFs, KMenuMmcHistoryFname() );
@@ -140,34 +140,34 @@
// it as argument... :(
iNotifier = CApaAppListNotifier::NewL( this, CActive::EPriorityStandard );
- iCenRepSession = CRepository::NewL( KCRUidMenu );
+ iCenRepSession = CRepository::NewL( KCRUidMenu );
- iCenRepNotifyHandlerHiddenApps = CCenRepNotifyHandler::NewL(
- *this, *iCenRepSession,
- CCenRepNotifyHandler::EStringKey, KMenuHideApplication );
- iCenRepNotifyHandlerCPHiddenApps = CCenRepNotifyHandler::NewL(
- *this, *iCenRepSession,
- CCenRepNotifyHandler::EStringKey, KMenuHideCPApplication );
+ iCenRepNotifyHandlerHiddenApps = CCenRepNotifyHandler::NewL(
+ *this, *iCenRepSession,
+ CCenRepNotifyHandler::EStringKey, KMenuHideApplication );
+ iCenRepNotifyHandlerCPHiddenApps = CCenRepNotifyHandler::NewL(
+ *this, *iCenRepSession,
+ CCenRepNotifyHandler::EStringKey, KMenuHideCPApplication );
- iCenRepNotifyHandlerCPHiddenFolders = CCenRepNotifyHandler::NewL(
- *this, *iCenRepSession,
- CCenRepNotifyHandler::EStringKey, KMenuHideCPFolder );
+ iCenRepNotifyHandlerCPHiddenFolders = CCenRepNotifyHandler::NewL(
+ *this, *iCenRepSession,
+ CCenRepNotifyHandler::EStringKey, KMenuHideCPFolder );
- iCenRepNotifyHandlerHiddenApps->StartListeningL();
- iCenRepNotifyHandlerCPHiddenApps->StartListeningL();
- iCenRepNotifyHandlerCPHiddenFolders->StartListeningL();
+ iCenRepNotifyHandlerHiddenApps->StartListeningL();
+ iCenRepNotifyHandlerCPHiddenApps->StartListeningL();
+ iCenRepNotifyHandlerCPHiddenFolders->StartListeningL();
- iMcsSatNotifier = CMcsSatNotifier::NewL(
- this, KCRUidMenu, KMenuShowSatUI );
+ iMcsSatNotifier = CMcsSatNotifier::NewL(
+ this, KCRUidMenu, KMenuShowSatUI );
- iFreeSpaceObserver = CMcsFreeSpaceObserver::NewL( *this );
+ iFreeSpaceObserver = CMcsFreeSpaceObserver::NewL( *this );
- iSisInstallNotifier = CMcsInstallNotifier::NewL(
+ iSisInstallNotifier = CMcsInstallNotifier::NewL(
*this, CMcsInstallNotifier::ESisInstallNotification );
- iJavaInstallNotifier = CMcsInstallNotifier::NewL(
+ iJavaInstallNotifier = CMcsInstallNotifier::NewL(
*this, CMcsInstallNotifier::EJavaInstallNotification );
- ScheduleScan();
+ ScheduleScan();
//iOpStatus = ETrue;
}
@@ -268,7 +268,7 @@
for( TInt i=0; i < appItems.Count(); i++ )
{
if( appItems[i].Type() != KMenuTypeLink() )
- {
+ {
const TMenuItem& item = appItems[i];
TBool itemHidden = (0 != ( item.Flags() & TMenuItem::EHidden ) );
@@ -277,7 +277,7 @@
{
hideItem = ETrue;
}
- }
+ }
}
SetHiddenFlagL( aId, aWasHidden, hideItem );
@@ -316,7 +316,7 @@
for (TInt i=0; i < appItems.Count(); i++)
{
if(appItems[i].Id() != aId)
- {
+ {
exists = ETrue;
const TMenuItem& item = appItems[i];
@@ -326,7 +326,7 @@
{
showItem = ETrue;
}
- }
+ }
}
UpdateLinkL( aId, exists, showItem, itemMissing );
@@ -525,16 +525,16 @@
// ---------------------------------------------------------
//
void CMenuSrvAppScanner::HandleInstallNotifyL( TUid aUid,
- CMcsInstallNotifier::TNotificationType aNotificationType )
+ CMcsInstallNotifier::TNotificationType aNotificationType )
{
iInstalledPackages.AppendL( aUid );
// when installing java, appscanner first gets notification from appArc,
// and then it is notified with instal notifier(RProperty)
// so we need another scan for java apps
if( aNotificationType == CMcsInstallNotifier::EJavaInstallNotification )
- {
- ScheduleScan();
- }
+ {
+ ScheduleScan();
+ }
}
// ---------------------------------------------------------
@@ -555,8 +555,8 @@
// ---------------------------------------------------------
//
void CMenuSrvAppScanner::UpdateApplicationItemL(
- RArray<TMenuItem>& aMcsItems, const CMenuSrvAppAttributes& aApaItem,
- TUint aMmcId, TBool isLegacy)
+ RArray<TMenuItem>& aMcsItems, const CMenuSrvAppAttributes& aApaItem,
+ TUint aMmcId, TBool isLegacy)
{
RArray<TMenuItem> mcsUidItems;
CleanupClosePushL( mcsUidItems );
@@ -568,22 +568,22 @@
// We don't add hidden items, there are too many of them!
// do not display Menu app
if ( !mcsUidItems.Count()
- && !isApaItemHidden
- && appUid != KMmUid3 )
+ && !isApaItemHidden
+ && appUid != KMmUid3 )
{
if( appUid == KSatUid )
{
if( CMcsSatHandler::CheckVisibility() )
- {
- AddAppItemL( aApaItem, aMmcId );
- }
+ {
+ AddAppItemL( aApaItem, aMmcId );
+ }
}
else
- {
- AddAppItemL( aApaItem, aMmcId );
+ {
+ AddAppItemL( aApaItem, aMmcId );
GetMcsAppItemsL( isLegacy, appUid.iUid, mcsUidItems );
RemoveFromInstalledPackages( appUid );
- }
+ }
}//if
// if there are any items with legacy UID format
@@ -592,12 +592,12 @@
{
//for every item with matching UID
for (TInt j=0; j < mcsUidItems.Count(); j++)
- {
+ {
TBuf<KUidChars> uidString;
MenuSrvUtil::UidToStringL( appUid.iUid, uidString, EFalse, EHex );
ModifiableObjectL( appUid, mcsUidItems[j].Id() ).SetAttributeL(
KMenuAttrUid(), uidString, EFalse );
- }//for
+ }//for
}//else if
// "hidden", "missing" and "lock_delete" flags update
for ( TInt j = 0; j < mcsUidItems.Count(); j++ )
@@ -607,8 +607,8 @@
//we need to handle first run of appscanner,
//there might be some incorrect data in content xml file
//if this will have impact on performance we may run this methods only at start up
- HandleMmcAttrUpdateL( item, aApaItem, aMmcId );
- HandleNativeAttrUpdateL( item, aApaItem );
+ HandleMmcAttrUpdateL( item, aApaItem, aMmcId );
+ HandleNativeAttrUpdateL( item, aApaItem );
// "hidden" flag handling.
HandleHiddenFlagUpdateL( item, aApaItem );
@@ -622,9 +622,9 @@
// so we cannot remove it
TInt index = aMcsItems.Find( item, TIdentityRelation<TMenuItem>( IdMatch ) );
if ( index != KErrNotFound )
- {
- aMcsItems.Remove( index );
- }
+ {
+ aMcsItems.Remove( index );
+ }
}//for
CleanupStack::PopAndDestroy( &mcsUidItems );
}
@@ -635,40 +635,40 @@
//
void CMenuSrvAppScanner::HandleHiddenFlagUpdateL( const TMenuItem & aItem,
const CMenuSrvAppAttributes& aApaItem )
- {
- TBool itemHidden = ( 0 != ( aItem.Flags() & TMenuItem::EHidden ) );
- if( aApaItem.GetUid() == KSatUid )
- {
- if( itemHidden == CMcsSatHandler::CheckVisibility() )
- {
- ModifiableObjectL( aApaItem.GetUid(), aItem.Id(),
- RMenuNotifier::EItemsAddedRemoved ).SetFlags(
- TMenuItem::EHidden,
- !CMcsSatHandler::CheckVisibility() );
- }
- }
- else if( itemHidden != aApaItem.IsHidden() )
- {
- ModifiableObjectL( aApaItem.GetUid(), aItem.Id(),
- RMenuNotifier::EItemsAddedRemoved ).SetFlags(
- TMenuItem::EHidden, aApaItem.IsHidden() );
- }
- }
+ {
+ TBool itemHidden = ( 0 != ( aItem.Flags() & TMenuItem::EHidden ) );
+ if( aApaItem.GetUid() == KSatUid )
+ {
+ if( itemHidden == CMcsSatHandler::CheckVisibility() )
+ {
+ ModifiableObjectL( aApaItem.GetUid(), aItem.Id(),
+ RMenuNotifier::EItemsAddedRemoved ).SetFlags(
+ TMenuItem::EHidden,
+ !CMcsSatHandler::CheckVisibility() );
+ }
+ }
+ else if( itemHidden != aApaItem.IsHidden() )
+ {
+ ModifiableObjectL( aApaItem.GetUid(), aItem.Id(),
+ RMenuNotifier::EItemsAddedRemoved ).SetFlags(
+ TMenuItem::EHidden, aApaItem.IsHidden() );
+ }
+ }
// ---------------------------------------------------------
// CMenuSrvAppScanner::HandleNativeAttrUpdateL
// ---------------------------------------------------------
//
void CMenuSrvAppScanner::HandleNativeAttrUpdateL(
- const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem )
- {
+ const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem )
+ {
//we need this to delete uninstalled java app item
if( aApaItem.GetAppType() != iEng.ObjectL( aItem.Id() ).GetAppType() )
- {
- ModifiableObjectL( aApaItem.GetUid(), aItem.Id(),
- RMenuNotifier::EItemsNone ).SetAppType( aApaItem.GetAppType() );
- }
- }
+ {
+ ModifiableObjectL( aApaItem.GetUid(), aItem.Id(),
+ RMenuNotifier::EItemsNone ).SetAppType( aApaItem.GetAppType() );
+ }
+ }
// ---------------------------------------------------------
@@ -676,41 +676,41 @@
// ---------------------------------------------------------
//
void CMenuSrvAppScanner::HandleMmcAttrUpdateL(
- const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem, TUint aMmcId )
- {
+ const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem, TUint aMmcId )
+ {
TPtrC val;
TBool dummy;
TBool attributeExists = iEng.ObjectL( aItem.Id() ).FindAttribute(
KMenuAttrMmcId(), val, dummy );
if( IsInMmc( aApaItem ) )
- {
- //app is instaled on mmc - KMenuAttrMmcId attribute update
- TBuf<KUidChars> uidString;
+ {
+ //app is instaled on mmc - KMenuAttrMmcId attribute update
+ TBuf<KUidChars> uidString;
uidString.Format( KHexFormat, aMmcId );
if( uidString.Compare( val ) )
{
ModifiableObjectL( aApaItem.GetUid(), aItem.Id() ).SetAttributeL(
KMenuAttrMmcId, uidString, EFalse );
}
- }
+ }
else if( IsInMassStorage( aApaItem )
- && aApaItem.GetAppType() == CMenuEngObject::EWidgetApp )
- {
- //its java app installed on mass storage, we need to leave it in xml
- //in case of connecting usb in mass storage mode
+ && aApaItem.GetAppType() == CMenuEngObject::EWidgetApp )
+ {
+ //its java app installed on mass storage, we need to leave it in xml
+ //in case of connecting usb in mass storage mode
if( KMenuMassStorage().Compare( val ) )
{
ModifiableObjectL( aApaItem.GetUid(), aItem.Id() ).SetAttributeL(
KMenuAttrMmcId, KMenuMassStorage, EFalse );
}
- }
+ }
else if( attributeExists )
- {
- //its installed on c: drive - remove attribute
+ {
+ //its installed on c: drive - remove attribute
ModifiableObjectL( aApaItem.GetUid(), aItem.Id() ).RemoveAttribute(
KMenuAttrMmcId );
- }
- }
+ }
+ }
// ---------------------------------------------------------
// CMenuSrvAppScanner::UpdateApplicationItemsL
// ---------------------------------------------------------
@@ -744,27 +744,27 @@
// ---------------------------------------------------------
//
void CMenuSrvAppScanner::HandleLockDeleteFlagUpdateL(
- const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem )
- {
- TBool isHidden = ( ( iEng.ObjectL( aItem.Id() )
- .Flags() & TMenuItem::EHidden ) != 0 );
- if ( !isHidden && IsInRomL( aApaItem ) )
- {
- if ( ( aItem.Flags() & TMenuItem::ELockDelete ) == 0 )
- {
+ const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem )
+ {
+ TBool isHidden = ( ( iEng.ObjectL( aItem.Id() )
+ .Flags() & TMenuItem::EHidden ) != 0 );
+ if ( !isHidden && IsInRomL( aApaItem ) )
+ {
+ if ( ( aItem.Flags() & TMenuItem::ELockDelete ) == 0 )
+ {
ModifiableObjectL( aApaItem.GetUid(), aItem.Id()).SetFlags(
TMenuItem::ELockDelete, ETrue );
- }
- }
- else
- {
- if ( ( aItem.Flags() & TMenuItem::ELockDelete ) != 0 )
- {
+ }
+ }
+ else
+ {
+ if ( ( aItem.Flags() & TMenuItem::ELockDelete ) != 0 )
+ {
ModifiableObjectL( aApaItem.GetUid(), aItem.Id() ).SetFlags(
TMenuItem::ELockDelete, EFalse );
- }
- }
- }
+ }
+ }
+ }
// ---------------------------------------------------------
// CMenuSrvAppScanner::HandleMissingFlagUpdateL
@@ -772,8 +772,8 @@
//
void CMenuSrvAppScanner::HandleMissingFlagUpdateL(
const TMenuItem& aItem, const CMenuSrvAppAttributes& aApaItem )
- {
- if ( aItem.Flags() & TMenuItem::EMissing )
+ {
+ if ( aItem.Flags() & TMenuItem::EMissing )
{
CLOG_WRITE_FORMAT8( "Unsetting flag EMissing on %d", item.Id() );
//application found so we unset "missing" flag
@@ -781,7 +781,7 @@
RMenuNotifier::EItemsAddedRemoved ).SetFlags(
TMenuItem::EMissing, EFalse );
}
- }
+ }
// ---------------------------------------------------------
// CMenuSrvAppScanner::GetCrItemsL
@@ -789,11 +789,11 @@
//
void CMenuSrvAppScanner::GetCrItemsL( RPointerArray<CMenuSrvAppAttributes>& aArray )
{
- TBuf<KCenRepBufferSize> buf;
- iCenRepSession->Get( KMenuHideCPApplication, buf );
- ParseUidsL( buf, aArray );// parses UIDs from buf and appends them to array
- iCenRepSession->Get( KMenuHideApplication, buf );
- ParseUidsL( buf, aArray );// parses UIDs from buf and appends them to array
+ TBuf<KCenRepBufferSize> buf;
+ iCenRepSession->Get( KMenuHideCPApplication, buf );
+ ParseUidsL( buf, aArray );// parses UIDs from buf and appends them to array
+ iCenRepSession->Get( KMenuHideApplication, buf );
+ ParseUidsL( buf, aArray );// parses UIDs from buf and appends them to array
}
// ---------------------------------------------------------
@@ -811,26 +811,24 @@
{
if( input.Peek() == ',')
{
- SetHidden(input.MarkedToken( startMark ), aArray);
+ SetHiddenL(input.MarkedToken( startMark ), aArray);
input.Inc();
input.Mark( startMark );
}
input.Inc();
notEmpty = ETrue;
}
- if ( notEmpty )
- {
- SetHidden(input.MarkedToken( startMark ), aArray);
- }
-
-
+ if ( notEmpty )
+ {
+ SetHiddenL( input.MarkedToken( startMark ), aArray );
+ }
}
// ---------------------------------------------------------
// CMenuSrvAppScanner::SetHidden
// ---------------------------------------------------------
//
-void CMenuSrvAppScanner::SetHidden(
+void CMenuSrvAppScanner::SetHiddenL(
const TDesC& aHiddenAppUid, RPointerArray<CMenuSrvAppAttributes>& aArray )
{
TLex appUidDescriptor(aHiddenAppUid);
@@ -952,23 +950,23 @@
// ---------------------------------------------------------
//
void CMenuSrvAppScanner::ScheduleScan()
- {
- if ( !IsActive() && !iOpStatus )
- {
- iOpStatus = ETrue;
- TRequestStatus* ownStatus = &iStatus;
- *ownStatus = KRequestPending;
- SetActive();
- User::RequestComplete( ownStatus, KErrNone );
- }
- }
+ {
+ if ( !IsActive() && !iOpStatus )
+ {
+ iOpStatus = ETrue;
+ TRequestStatus* ownStatus = &iStatus;
+ *ownStatus = KRequestPending;
+ SetActive();
+ User::RequestComplete( ownStatus, KErrNone );
+ }
+ }
// ---------------------------------------------------------
// CMenuSrvAppScanner::CreateInstallFolderL
// ---------------------------------------------------------
//
TInt CMenuSrvAppScanner::CreateInstallFolderL( const CMenuSrvAppAttributes& aApaItem )
- {
+ {
// Find a folder for this app.
TInt folder(0);
if ( aApaItem.GetGroupName().Length() )
@@ -987,7 +985,7 @@
iEng.RootFolderL( folder );
}
return folder;
- }
+ }
// ---------------------------------------------------------
// CMenuSrvAppScanner::AddAppItemL
@@ -1013,14 +1011,14 @@
object->SetAttributeL( KMenuAttrMmcId, uidString, EFalse );
}
if( aApaItem.GetAppType() == CMenuEngObject::EWidgetApp )
- {
- //we need this to delete uninstalled java or wrt widget app item
- if ( !IsInMmc( aApaItem )
- && IsInMassStorage( aApaItem ) )
- {
- object->SetAttributeL( KMenuAttrMmcId, KMenuMassStorage, EFalse );
- }
- }
+ {
+ //we need this to delete uninstalled java or wrt widget app item
+ if ( !IsInMmc( aApaItem )
+ && IsInMassStorage( aApaItem ) )
+ {
+ object->SetAttributeL( KMenuAttrMmcId, KMenuMassStorage, EFalse );
+ }
+ }
object->SetAppType( aApaItem.GetAppType() );
EnsureFolderWritableL( folder );
iEng.AddL( *object, folder, 0 );
@@ -1043,12 +1041,12 @@
TBool localized;
if ( rootObject.FindAttribute( KMenuAttrAppGroupName, groupName, localized ) &&
- groupName.Compare( aAppGroupName )==0 )
+ groupName.Compare( aAppGroupName )==0 )
{
folder = defaultFolderId;
}
else
- {
+ {
TMenuSrvTypeAttrFilter filter;
filter.SetType( KMenuTypeFolder() );
filter.SetAttr( KMenuAttrAppGroupName(), aAppGroupName );
@@ -1061,7 +1059,7 @@
folder = items[0].Id();
}
CleanupStack::PopAndDestroy( &items );
- }
+ }
if ( !folder )
{
// No such folder, create it now.
@@ -1151,7 +1149,7 @@
else if( iEng.ObjectL( aItem.Id() ).GetAppType()
!= CMenuEngObject::EWidgetApp
|| iEng.ObjectL( aItem.Id() ).FindAttribute(
- KMenuAttrPredefined(), val, dummy ) )
+ KMenuAttrPredefined(), val, dummy ) )
{
flags = TMenuItem::EHidden;
}
@@ -1185,15 +1183,15 @@
// ---------------------------------------------------------
//
void CMenuSrvAppScanner::SetObjectFlagsL( TBool aFlagValue, const TMenuItem& aItem,
- const TMenuItem::TFlags& aFlag, const RMenuNotifier::TEvent& aEvent )
- {
- TBool itemFlagPresent = (0 != (aItem.Flags() & aFlag));
- if( aFlagValue != itemFlagPresent )
- {
+ const TMenuItem::TFlags& aFlag, const RMenuNotifier::TEvent& aEvent )
+ {
+ TBool itemFlagPresent = (0 != (aItem.Flags() & aFlag));
+ if( aFlagValue != itemFlagPresent )
+ {
iEng.ModifiableObjectL( aItem.Id(), aEvent ).
SetFlags( aFlag, aFlagValue );
- }
- }
+ }
+ }
// ---------------------------------------------------------
// CMenuSrvAppScanner::UpdateMmcHistoryL
@@ -1203,10 +1201,10 @@
{
TUint mmcId = CurrentMmcId();
if( mmcId )
- {
- iMmcHistory->InsertL( mmcId );
- iMmcHistory->SaveL( iFs, KMenuMmcHistoryFname() );
- }
+ {
+ iMmcHistory->InsertL( mmcId );
+ iMmcHistory->SaveL( iFs, KMenuMmcHistoryFname() );
+ }
return mmcId;
}
@@ -1221,7 +1219,7 @@
TInt mmcDrive;
TInt err;
err = DriveInfo::GetDefaultDrive(
- DriveInfo::EDefaultRemovableMassStorage, mmcDrive );
+ DriveInfo::EDefaultRemovableMassStorage, mmcDrive );
if ( !err )
{
TVolumeInfo volumeInfo;
@@ -1239,14 +1237,14 @@
// ---------------------------------------------------------
//
TBool CMenuSrvAppScanner::IsFileInDrive(
- const TDesC& aFileName,
- const DriveInfo::TDefaultDrives& aDefaultDrive ) const
+ const TDesC& aFileName,
+ const DriveInfo::TDefaultDrives& aDefaultDrive ) const
{
if ( aFileName.Length() )
{
TInt mmcDrive;
TInt err = DriveInfo::GetDefaultDrive(
- aDefaultDrive, mmcDrive );
+ aDefaultDrive, mmcDrive );
if ( !err )
{
TInt fileDrive;
@@ -1266,13 +1264,13 @@
//
TBool CMenuSrvAppScanner::IsAppInDrive(
const CMenuSrvAppAttributes& aApaItem,
- const DriveInfo::TDefaultDrives& aDefaultDrive ) const
+ const DriveInfo::TDefaultDrives& aDefaultDrive ) const
{
TBool ret( EFalse );
if ( IsFileInDrive( aApaItem.GetFullName(), aDefaultDrive ) )
- {
- ret = ETrue;
- }
+ {
+ ret = ETrue;
+ }
return ret;
}
@@ -1308,24 +1306,24 @@
// ---------------------------------------------------------
//
TBool CMenuSrvAppScanner::IsDriveInUse(
- const DriveInfo::TDefaultDrives& aDefaultDrive )
+ const DriveInfo::TDefaultDrives& aDefaultDrive )
{
TBool inUse( EFalse );
TInt drive;
TInt err = DriveInfo::GetDefaultDrive( aDefaultDrive, drive );
if( err == KErrNone )
- {
- TUint status;
- err = DriveInfo::GetDriveStatus( iFs, drive, status );
- if( err == KErrNone
- && ( status & DriveInfo::EDriveInUse ) )
- {
- inUse = ETrue;
- }
- }
+ {
+ TUint status;
+ err = DriveInfo::GetDriveStatus( iFs, drive, status );
+ if( err == KErrNone
+ && ( status & DriveInfo::EDriveInUse ) )
+ {
+ inUse = ETrue;
+ }
+ }
- return inUse;
+ return inUse;
}
// End of File