equal
deleted
inserted
replaced
38 const TInt KContentRefreshDelay = 50000; // 0.05 sec |
38 const TInt KContentRefreshDelay = 50000; // 0.05 sec |
39 |
39 |
40 // for screenshots, they are scaled down to (screensize/this_factor). |
40 // for screenshots, they are scaled down to (screensize/this_factor). |
41 const TInt KScreenSizeFactor = 2; |
41 const TInt KScreenSizeFactor = 2; |
42 |
42 |
43 // format to get a lowercase hex string prefixed with 0x |
|
44 _LIT( KHexFmt, "0x%x" ); |
|
45 |
|
46 const TUid KTsCameraUid = { 0x101F857a }; |
43 const TUid KTsCameraUid = { 0x101F857a }; |
47 |
44 |
48 //close command for widget |
45 //close command for widget |
49 const TInt KCloseWidgetCmd(9); |
46 const TInt KCloseWidgetCmd(9); |
50 //handle close cmd for s60 widgets |
47 //handle close cmd for s60 widgets |
316 TUid newUid = ForegroundAppUidL( CTsFswClient::EUseEmbeddedUid ); |
313 TUid newUid = ForegroundAppUidL( CTsFswClient::EUseEmbeddedUid ); |
317 TSLOG2( TSLOG_INFO, "ws says: %x we have: %x", newUid.iUid, iFgAppUid.iUid ); |
314 TSLOG2( TSLOG_INFO, "ws says: %x we have: %x", newUid.iUid, iFgAppUid.iUid ); |
318 if ( iFgAppUid != newUid && newUid.iUid ) |
315 if ( iFgAppUid != newUid && newUid.iUid ) |
319 { |
316 { |
320 iFgAppUid = newUid; |
317 iFgAppUid = newUid; |
321 iFgAppUidStr.Format( KHexFmt, iFgAppUid.iUid ); |
318 iDataList->MoveEntryAtStart(newUid.iUid, EFalse); |
322 } |
319 } |
323 |
320 |
324 TSLOG_OUT(); |
321 TSLOG_OUT(); |
325 } |
322 } |
326 |
323 |
480 { |
477 { |
481 TSLOG_CONTEXT( HandleFswPpApplicationChange, TSLOG_LOCAL ); |
478 TSLOG_CONTEXT( HandleFswPpApplicationChange, TSLOG_LOCAL ); |
482 TSLOG2_IN( "aWgId = %d aFbsHandle = %d", aWgId, aFbsHandle ); |
479 TSLOG2_IN( "aWgId = %d aFbsHandle = %d", aWgId, aFbsHandle ); |
483 |
480 |
484 TUid appUid; |
481 TUid appUid; |
485 TInt err = iDataList->AppUidForWgId( aWgId, appUid ); |
482 TInt wgId = iDataList->FindMostTopParentWgId(aWgId); |
|
483 if ( wgId == KErrNotFound ) |
|
484 { |
|
485 wgId = aWgId; |
|
486 } |
|
487 TInt err = iDataList->AppUidForWgId( wgId, appUid ); |
486 if ( err || appUid == KTsCameraUid ) |
488 if ( err || appUid == KTsCameraUid ) |
487 { |
489 { |
488 // Dont't assign screenshot to camera app |
490 // Dont't assign screenshot to camera app |
489 TSLOG0( TSLOG_LOCAL, "Screenshot for camera - ignore" ); |
491 TSLOG0( TSLOG_LOCAL, "Screenshot for camera - ignore" ); |
490 iPreviewProvider->AckPreview(aFbsHandle); |
492 iPreviewProvider->AckPreview(aFbsHandle); |
495 CFbsBitmap* bmp = 0; |
497 CFbsBitmap* bmp = 0; |
496 TRAP( err, bmp = CopyBitmapL( aFbsHandle, EFalse ) ); |
498 TRAP( err, bmp = CopyBitmapL( aFbsHandle, EFalse ) ); |
497 iPreviewProvider->AckPreview(aFbsHandle); |
499 iPreviewProvider->AckPreview(aFbsHandle); |
498 if ( err == KErrNone ) |
500 if ( err == KErrNone ) |
499 { |
501 { |
500 iDataList->MoveEntryAtStart(appUid.iUid, EFalse); |
|
501 StoreScreenshot(aWgId, bmp); |
502 StoreScreenshot(aWgId, bmp); |
502 } |
503 } |
503 |
504 |
504 TSLOG_OUT(); |
505 TSLOG_OUT(); |
505 } |
506 } |