widgets/widgetapp/src/WidgetUiWindow.cpp
changeset 13 10e98eab6f85
parent 8 7c90e6132015
child 16 a359256acfc6
equal deleted inserted replaced
8:7c90e6132015 13:10e98eab6f85
   501 
   501 
   502         iWindowManager.View()->ShowActivatedObject(EFalse); // deactivates any open edit boxes
   502         iWindowManager.View()->ShowActivatedObject(EFalse); // deactivates any open edit boxes
   503 
   503 
   504         if (aCurrent)
   504         if (aCurrent)
   505             {
   505             {
   506             //UpdateCba();
   506             UpdateCba();
   507             Engine()->MakeVisible( iWidgetLoaded );
   507             Engine()->MakeVisible( iWidgetLoaded );
   508             // redraw incase the orientation changed while in the background
   508             // redraw incase the orientation changed while in the background
   509             Relayout();
   509             Relayout();
   510             }
   510             }
   511         else
   511         else
   669 TBool CWidgetUiWindow::HasMiniviewL()
   669 TBool CWidgetUiWindow::HasMiniviewL()
   670     {
   670     {
   671     RWidgetRegistryClientSession clientSession = iWindowManager.WidgetUIClientSession();
   671     RWidgetRegistryClientSession clientSession = iWindowManager.WidgetUIClientSession();
   672     CWidgetPropertyValue* propValue = clientSession.GetWidgetPropertyValueL( iUid, EMiniViewEnable );
   672     CWidgetPropertyValue* propValue = clientSession.GetWidgetPropertyValueL( iUid, EMiniViewEnable );
   673     TInt hasMiniview = *propValue;
   673     TInt hasMiniview = *propValue;
       
   674     delete propValue;
   674     return hasMiniview;
   675     return hasMiniview;
   675     }
   676     }
   676 
   677 
   677 // -----------------------------------------------------------------------------
   678 // -----------------------------------------------------------------------------
   678 // CWidgetUiWindow::CheckNetworkAccessL()
   679 // CWidgetUiWindow::CheckNetworkAccessL()
   684     {
   685     {
   685     // begin info.plist (declare EAllowNetworkAccess or EAllowFullAccess ?)
   686     // begin info.plist (declare EAllowNetworkAccess or EAllowFullAccess ?)
   686     RWidgetRegistryClientSession& widgetRegistry
   687     RWidgetRegistryClientSession& widgetRegistry
   687                 = iWindowManager.WidgetUIClientSession();
   688                 = iWindowManager.WidgetUIClientSession();
   688 
   689 
   689     TInt networkAccess = *(widgetRegistry.GetWidgetPropertyValueL(
   690     CWidgetPropertyValue* propValue = widgetRegistry.GetWidgetPropertyValueL( iUid, EAllowNetworkAccess );
   690                                         iUid, EAllowNetworkAccess ));
   691     TInt networkAccess = *propValue;
   691     TInt fullAccess = *(widgetRegistry.GetWidgetPropertyValueL(
   692     delete propValue;
   692                                         iUid, EAllowFullAccess ));
   693     propValue = widgetRegistry.GetWidgetPropertyValueL( iUid, EAllowFullAccess );
   693     TInt blanketPermission = *(widgetRegistry.GetWidgetPropertyValueL(
   694     TInt fullAccess = *propValue;
   694                                         iUid, EBlanketPermGranted ));
   695     delete propValue;
       
   696     propValue = widgetRegistry.GetWidgetPropertyValueL( iUid, EBlanketPermGranted );
       
   697     TInt blanketPermission = *propValue;
       
   698     delete propValue;
   695     TInt inMiniView = widgetRegistry.IsWidgetInMiniView( iUid);
   699     TInt inMiniView = widgetRegistry.IsWidgetInMiniView( iUid);
   696     if ( !( networkAccess || fullAccess )  ||
   700     if ( !( networkAccess || fullAccess )  ||
   697         ( inMiniView && !blanketPermission  ))
   701         ( inMiniView && !blanketPermission  ))
   698         {
   702         {
   699         SetNetworkAccessGrant( EDeny );
   703         SetNetworkAccessGrant( EDeny );