equal
deleted
inserted
replaced
44 enum TSgcClientFlags |
44 enum TSgcClientFlags |
45 { |
45 { |
46 EHandlingChange, |
46 EHandlingChange, |
47 EInAknSrv, |
47 EInAknSrv, |
48 ESystemFaded, |
48 ESystemFaded, |
49 ENeverRelinquish, |
49 ENeverRelinquish |
50 EUseForegroundPriority |
|
51 }; |
50 }; |
52 |
51 |
53 |
52 |
54 NONSHARABLE_CLASS(CAknSgcClientImpl) : public CAknSgcImpl |
53 NONSHARABLE_CLASS(CAknSgcClientImpl) : public CAknSgcImpl |
55 { |
54 { |
617 void CAknSgcClient::DoRelinquishPriorityToForegroundAppLC(TBool aIsForeground) |
616 void CAknSgcClient::DoRelinquishPriorityToForegroundAppLC(TBool aIsForeground) |
618 { |
617 { |
619 RThread myThread; |
618 RThread myThread; |
620 TProcessPriority priority = myThread.ProcessPriority(); |
619 TProcessPriority priority = myThread.ProcessPriority(); |
621 |
620 |
622 if ( IsSystemFaded() || iFlags[EUseForegroundPriority] ) |
621 if( IsSystemFaded() ) |
623 { |
622 { |
|
623 // Solution for EKKG-7RQ9U8: |
624 // If the system is faded we have a popup on screen. |
624 // If the system is faded we have a popup on screen. |
625 // Get the process behind the foreground process, the |
625 // Get the process behind the foreground process. |
626 // EUseForegroundPriority should also affect only that process. |
|
627 TApaTask task = TApaTaskList(iEikonEnv->WsSession()).FindByPos(1); |
626 TApaTask task = TApaTaskList(iEikonEnv->WsSession()).FindByPos(1); |
628 |
627 |
629 // Check if this application is next behind the foreground app. |
628 // Check if this application is next behind the foreground app. |
630 if( task.Exists() && myThread.Id() == task.ThreadId()) |
629 if( task.Exists() && myThread.Id() == task.ThreadId()) |
631 { |
630 { |
656 // push a dummy cleanup item onto the cleanup stack |
655 // push a dummy cleanup item onto the cleanup stack |
657 CleanupStack::PushL(TCleanupItem(RestorePriority, NULL)); |
656 CleanupStack::PushL(TCleanupItem(RestorePriority, NULL)); |
658 } |
657 } |
659 } |
658 } |
660 |
659 |
661 void CAknSgcClient::UseForegroundPriorityDuringRelinquish( |
|
662 TBool aUseForeground ) |
|
663 { |
|
664 CAknSgcClient* self = Static(); |
|
665 if ( self ) |
|
666 { |
|
667 if ( aUseForeground ) |
|
668 { |
|
669 self->iFlags.Set( EUseForegroundPriority ); |
|
670 } |
|
671 else |
|
672 { |
|
673 self->iFlags.Clear( EUseForegroundPriority ); |
|
674 } |
|
675 } |
|
676 } |
|
677 |
|
678 EXPORT_C CAknLayoutConfig& CAknSgcClient::LayoutConfig() |
660 EXPORT_C CAknLayoutConfig& CAknSgcClient::LayoutConfig() |
679 { |
661 { |
680 CAknSgcClient* self = Static(); |
662 CAknSgcClient* self = Static(); |
681 __ASSERT_ALWAYS(self && self->iLayoutConfig, Panic(EAknPanicSgccLayoutConfigNull)); |
663 __ASSERT_ALWAYS(self && self->iLayoutConfig, Panic(EAknPanicSgccLayoutConfigNull)); |
682 return *self->iLayoutConfig; |
664 return *self->iLayoutConfig; |