--- a/webengine/device/src/DeviceLiwBinding.cpp Thu Aug 19 10:58:56 2010 +0300
+++ b/webengine/device/src/DeviceLiwBinding.cpp Tue Aug 31 16:17:46 2010 +0300
@@ -21,12 +21,12 @@
#include <interpreter.h>
#include <date_object.h>
#include <operations.h>
-#include <liwServiceHandler.h>
-#include <RTSecManager.h>
-#include <RTSecMgrUtility.h>
-#include <RTSecMgrScriptSession.h>
-#include <RTSecMgrCommonDef.h>
-#include <widgetregistryclient.h>
+#include <liwservicehandler.h>
+#include <rtsecmanager.h>
+#include <rtsecmgrutility.h>
+#include <rtsecmgrscriptsession.h>
+#include <rtsecmgrcommondef.h>
+#include <WidgetRegistryClient.h>
#include <PropertyNameArray.h>
#include <internal.h>
#include <liwvariant.h>
@@ -42,8 +42,6 @@
#include "DeviceLiwIterable.h"
#include "DeviceLiwResult.h"
-
-
using namespace KJS;
using namespace LIW;
@@ -127,7 +125,7 @@
}
#ifdef BRDO_SEC_MGR_PROMPT_ENHANCEMENT_FF
m_scriptSession->SetPromptOption(RTPROMPTUI_PROVIDER); // This is for setting the new prompting method
-#endif
+#endif
CleanupStack::PopAndDestroy( trust );
}
@@ -166,7 +164,6 @@
if ( argcount > 0 && args[0]->type() == StringType &&
args[0]->toString( exec ).size() > 0 )
{
-
TRAP( error,
{
// Get service name
@@ -214,7 +211,7 @@
switch ( widgetregistry.WidgetSapiAccessState(m_Uid))
{
case SAPISECURITYPROMPTNEEDED :
- load_err = sapiPromptNeededL(crit_arr);
+ load_err = m_serviceHandler->AttachL( crit_arr, *m_scriptSession );
break;
case SAPIPROMPTLESS :
load_err = m_serviceHandler->AttachL( crit_arr );
@@ -257,21 +254,7 @@
return error;
}
-
-// ---------------------------------------------------------------------------
-// attachL called if sapi prompt is needed
-// return TInt - load error
-// ---------------------------------------------------------------------------
-//
-TInt CDeviceLiwBinding::sapiPromptNeededL(RCriteriaArray aCrit_arr)
- {
-#ifdef BRDO_SAPINTFN_ENABLED_FF
- return m_serviceHandler->AttachL( aCrit_arr, *m_scriptSession, m_Uid.iUid );
-#else
- return m_serviceHandler->AttachL( aCrit_arr, *m_scriptSession );
-#endif
- }
-
+
// ---------------------------------------------------------------------------
// Convert Unload service provider
// return JSValue - javascript list
@@ -1166,16 +1149,13 @@
}
CWidgetPropertyValue* displayname = widgetregistry.GetWidgetPropertyValueL(m_Uid, EBundleDisplayName );
- if(displayname)
+ User::LeaveIfError(widgetregistry.Disconnect());
+ CleanupStack::PopAndDestroy(); //widgetregistry
+
+ if ( displayname && displayname->iType == EWidgetPropTypeString )
{
- CleanupStack::PushL(displayname);
- if(displayname->iType == EWidgetPropTypeString)
- m_scriptSession->SetApplicationNameL(*displayname);
- CleanupStack::PopAndDestroy(); // displayname
+ m_scriptSession->SetApplicationNameL(*displayname);
}
-
- User::LeaveIfError(widgetregistry.Disconnect());
- CleanupStack::PopAndDestroy(); // widgetregistry
);
}
#endif