375 CApaWindowGroupName::NewLC( iWsSession, aWgId ); |
375 CApaWindowGroupName::NewLC( iWsSession, aWgId ); |
376 TUid appUid = windowName->AppUid(); |
376 TUid appUid = windowName->AppUid(); |
377 CleanupStack::PopAndDestroy( windowName ); |
377 CleanupStack::PopAndDestroy( windowName ); |
378 return appUid; |
378 return appUid; |
379 |
379 |
380 } |
|
381 |
|
382 // -------------------------------------------------------------------------- |
|
383 // CTsFswEngine::FindAppNameLC |
|
384 // -------------------------------------------------------------------------- |
|
385 // |
|
386 HBufC* CTsFswEngine::FindAppNameLC( CApaWindowGroupName* aWindowName, |
|
387 const TUid& aAppUid, |
|
388 TInt aWgId ) |
|
389 { |
|
390 //Retrieve the app name |
|
391 TApaAppInfo info; |
|
392 iAppArcSession.GetAppInfo( info, aAppUid ); |
|
393 TPtrC caption = info.iShortCaption; |
|
394 |
|
395 HBufC* tempName = 0; |
|
396 if ( !caption.Length() && aWindowName ) // if not set - use thread name instead |
|
397 { |
|
398 if ( aWindowName->Caption().Length() ) |
|
399 { |
|
400 tempName = aWindowName->Caption().AllocL(); |
|
401 //put on cleanupstack after the if |
|
402 } |
|
403 else |
|
404 { |
|
405 TThreadId threadId; |
|
406 TInt err = iWsSession.GetWindowGroupClientThreadId( |
|
407 aWgId, threadId ); |
|
408 if ( err == KErrNone ) |
|
409 { |
|
410 RThread thread; |
|
411 CleanupClosePushL( thread ); |
|
412 err = thread.Open ( threadId ); |
|
413 if ( err==KErrNone ) |
|
414 { |
|
415 tempName = thread.Name().AllocL(); // codescanner::forgottoputptroncleanupstack |
|
416 // tempName put on cleanupstack after the if |
|
417 } |
|
418 CleanupStack::PopAndDestroy( &thread ); |
|
419 } |
|
420 } |
|
421 } |
|
422 else |
|
423 { |
|
424 tempName = caption.AllocL(); |
|
425 //put on cleanupstack after the if |
|
426 } |
|
427 CleanupStack::PushL( tempName ); |
|
428 return tempName; |
|
429 } |
380 } |
430 |
381 |
431 // -------------------------------------------------------------------------- |
382 // -------------------------------------------------------------------------- |
432 // CTsFswEngine::CopyBitmapL |
383 // CTsFswEngine::CopyBitmapL |
433 // -------------------------------------------------------------------------- |
384 // -------------------------------------------------------------------------- |