diff -r 66ecddbca914 -r 4a5c47a50617 psmservices/psmserver/src/server/psmsrvsession.cpp --- a/psmservices/psmserver/src/server/psmsrvsession.cpp Tue May 11 17:23:24 2010 +0300 +++ b/psmservices/psmserver/src/server/psmsrvsession.cpp Tue May 25 14:04:18 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -15,7 +15,8 @@ * */ - +#include +#include #include #include "psmmanager.h" #include "psmsrvserver.h" @@ -167,7 +168,18 @@ { User::Leave( KErrArgument ); } - + + TInt keyVal = -1; + User::LeaveIfError( RProperty::Get( KUidSystemCategory, conn::KUidBackupRestoreKey, keyVal ) ); + //if backup or restore is in progress, change in power save mode + //is not allowed as it will not be possible to do write + //operation in cenrep and it would leave the device in unstable power saving mode state + if( (( keyVal & conn::KBURPartTypeMask ) != conn::EBURNormal ) + && (( keyVal & conn::KBURPartTypeMask ) != conn::EBURUnset )) + { + User::Leave( KErrNotSupported ); + } + iNotifyModeMessage->Initialize( aMessage ); iPsmManager.NotifyPowerSaveModeChangeL( mode ); break;