236 void CTsFswEngine::UpdateTaskList() |
236 void CTsFswEngine::UpdateTaskList() |
237 { |
237 { |
238 TSLOG_CONTEXT( UpdateTaskList, TSLOG_LOCAL ); |
238 TSLOG_CONTEXT( UpdateTaskList, TSLOG_LOCAL ); |
239 TSLOG_IN(); |
239 TSLOG_IN(); |
240 |
240 |
|
241 // screenshot taking support - call Register and Unregister when needed |
|
242 UpdatePreviewContent(); |
|
243 |
|
244 // get the foreground app uid and publish it to CFW if different than before |
|
245 TRAP_IGNORE( PublishFgAppUidL() ); |
|
246 |
241 // There can be many calls in a row, use a timer to prevent degrading |
247 // There can be many calls in a row, use a timer to prevent degrading |
242 // device performance. |
248 // device performance. |
243 iDataList->SetDirty(); |
|
244 if ( !iUpdateStarter->IsActive() ) |
249 if ( !iUpdateStarter->IsActive() ) |
245 { |
250 { |
246 iUpdateStarter->Start( KContentRefreshDelay, 0, |
251 iUpdateStarter->Start( KContentRefreshDelay, 0, |
247 TCallBack( UpdateStarterCallback, this ) ); |
252 TCallBack( UpdateStarterCallback, this ) ); |
248 } |
253 } |
249 |
|
250 // screenshot taking support - call Register and Unregister when needed |
|
251 UpdatePreviewContent(); |
|
252 |
|
253 // get the foreground app uid and publish it to CFW if different than before |
|
254 TRAP_IGNORE( PublishFgAppUidL() ); |
|
255 |
254 |
256 TSLOG_OUT(); |
255 TSLOG_OUT(); |
257 } |
256 } |
258 |
257 |
259 // -------------------------------------------------------------------------- |
258 // -------------------------------------------------------------------------- |
314 TSLOG2( TSLOG_INFO, "ws says: %x we have: %x", newUid.iUid, iFgAppUid.iUid ); |
313 TSLOG2( TSLOG_INFO, "ws says: %x we have: %x", newUid.iUid, iFgAppUid.iUid ); |
315 if ( iFgAppUid != newUid && newUid.iUid ) |
314 if ( iFgAppUid != newUid && newUid.iUid ) |
316 { |
315 { |
317 iFgAppUid = newUid; |
316 iFgAppUid = newUid; |
318 iDataList->MoveEntryAtStart(newUid.iUid, EFalse); |
317 iDataList->MoveEntryAtStart(newUid.iUid, EFalse); |
|
318 TBool change( iDataList->MoveEntryAtStart(newUid.iUid, EFalse) ); |
|
319 if( change ) |
|
320 { |
|
321 iObserver.FswDataChanged(); |
|
322 } |
319 } |
323 } |
320 |
324 |
321 TSLOG_OUT(); |
325 TSLOG_OUT(); |
322 } |
326 } |
323 |
327 |
753 // |
757 // |
754 void CTsFswEngine::HandleWidgetUpdateL(TInt aWidgetId, TInt aBitmapHandle) |
758 void CTsFswEngine::HandleWidgetUpdateL(TInt aWidgetId, TInt aBitmapHandle) |
755 { |
759 { |
756 TSLOG_CONTEXT( HandleWidgetUpdateL, TSLOG_LOCAL ); |
760 TSLOG_CONTEXT( HandleWidgetUpdateL, TSLOG_LOCAL ); |
757 |
761 |
758 iDataList->MoveEntryAtStart(aWidgetId, ETrue); |
762 TBool contentChanged( iDataList->MoveEntryAtStart(aWidgetId, ETrue) ); |
759 |
763 |
760 CFbsBitmap* bmp = 0; |
764 CFbsBitmap* bmp = 0; |
761 TBool contentChanged(EFalse); |
|
762 if( aBitmapHandle ) |
765 if( aBitmapHandle ) |
763 { |
766 { |
764 TRAPD( err, bmp = CopyBitmapL( aBitmapHandle, EFalse ) ); |
767 TRAPD( err, bmp = CopyBitmapL( aBitmapHandle, EFalse ) ); |
765 if ( err == KErrNone ) |
768 if ( err == KErrNone ) |
766 { |
769 { |