equal
deleted
inserted
replaced
56 aEnv.RegisterEventHandler(this, |
56 aEnv.RegisterEventHandler(this, |
57 this, |
57 this, |
58 TWservCrEvent::EWindowGroupChanged | |
58 TWservCrEvent::EWindowGroupChanged | |
59 TWservCrEvent::EDeviceOrientationChanged); |
59 TWservCrEvent::EDeviceOrientationChanged); |
60 iWindowGroupId = KInvalidGroupId; |
60 iWindowGroupId = KInvalidGroupId; |
61 iBlockedList = CTsIdList::NewL(); |
61 iAllowedList = CTsIdList::NewL(); |
62 } |
62 } |
63 |
63 |
64 |
64 |
65 // ----------------------------------------------------------------------------- |
65 // ----------------------------------------------------------------------------- |
66 /** |
66 /** |
67 * Destructor |
67 * Destructor |
68 */ |
68 */ |
69 CTsScreenshotPlugin::~CTsScreenshotPlugin() |
69 CTsScreenshotPlugin::~CTsScreenshotPlugin() |
70 { |
70 { |
71 delete iBlockedList; |
71 delete iAllowedList; |
72 Env().UnregisterEventHandler(this); |
72 Env().UnregisterEventHandler(this); |
73 iCache.ResetAndDestroy(); |
73 iCache.ResetAndDestroy(); |
74 } |
74 } |
75 |
75 |
76 // ----------------------------------------------------------------------------- |
76 // ----------------------------------------------------------------------------- |
116 break; |
116 break; |
117 } |
117 } |
118 } |
118 } |
119 CleanupStack::PopAndDestroy( screenshotMsg ); |
119 CleanupStack::PopAndDestroy( screenshotMsg ); |
120 } |
120 } |
121 else if( IgnoreWindowGroups == function ) |
121 else if( AllowedWindowGroups == function ) |
122 { |
122 { |
123 CTsIdList* list = CTsIdList::NewLC( msgStream ); |
123 CTsIdList* list = CTsIdList::NewLC( msgStream ); |
124 delete iBlockedList; |
124 delete iAllowedList; |
125 iBlockedList = list; |
125 iAllowedList = list; |
126 CleanupStack::Pop( list ); |
126 CleanupStack::Pop( list ); |
127 } |
127 } |
128 CleanupStack::PopAndDestroy( &msgStream ); |
128 CleanupStack::PopAndDestroy( &msgStream ); |
129 } |
129 } |
130 |
130 |
138 switch (aEvent.Type()) { |
138 switch (aEvent.Type()) { |
139 case TWservCrEvent::EWindowGroupChanged: |
139 case TWservCrEvent::EWindowGroupChanged: |
140 if( KInvalidGroupId != iWindowGroupId ) |
140 if( KInvalidGroupId != iWindowGroupId ) |
141 { |
141 { |
142 NotifyWindowGroupToBackground( iWindowGroupId ); |
142 NotifyWindowGroupToBackground( iWindowGroupId ); |
143 TakeScreenshot( iWindowGroupId ); |
143 if(iAllowedList->IsPresent(iWindowGroupId)) |
|
144 { |
|
145 TakeScreenshot( iWindowGroupId ); |
|
146 } |
144 } |
147 } |
145 iWindowGroupId = aEvent.WindowGroupIdentifier(); |
148 iWindowGroupId = aEvent.WindowGroupIdentifier(); |
146 break; |
149 break; |
147 case TWservCrEvent::EDeviceOrientationChanged: |
150 case TWservCrEvent::EDeviceOrientationChanged: |
148 if( !iBlockedList->IsPresent( iWindowGroupId ) ) |
151 if( iAllowedList->IsPresent( iWindowGroupId ) ) |
149 { |
152 { |
150 TakeScreenshot( iWindowGroupId ); |
153 TakeScreenshot( iWindowGroupId ); |
151 } |
154 } |
152 break; |
155 break; |
153 } |
156 } |