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 { |
78 EXPORT_C void MAknSgcStatusPaneRedrawCoordinator::MAknSgcStatusPaneRedrawCoordinator_Reserved_1() {} |
77 EXPORT_C void MAknSgcStatusPaneRedrawCoordinator::MAknSgcStatusPaneRedrawCoordinator_Reserved_1() {} |
79 EXPORT_C void MAknSgcStatusPaneRedrawCoordinator::MAknSgcStatusPaneRedrawCoordinator_Reserved_2() {} |
78 EXPORT_C void MAknSgcStatusPaneRedrawCoordinator::MAknSgcStatusPaneRedrawCoordinator_Reserved_2() {} |
80 |
79 |
81 |
80 |
82 inline CAknSgcClient* CAknSgcClient::Static() |
81 inline CAknSgcClient* CAknSgcClient::Static() |
83 { |
82 { return static_cast<CAknSgcClient*>(CCoeEnv::Static(KAknSgcClientStaticId)); } |
84 if (CCoeEnv::Static()) |
83 |
85 return static_cast<CAknSgcClient*>(CCoeEnv::Static(KAknSgcClientStaticId)); |
|
86 else |
|
87 return NULL; |
|
88 } |
|
89 |
84 |
90 |
85 |
91 NONSHARABLE_CLASS(TSgcClientStatusPaneRedrawCoordinator) : public MAknSgcStatusPaneRedrawCoordinator |
86 NONSHARABLE_CLASS(TSgcClientStatusPaneRedrawCoordinator) : public MAknSgcStatusPaneRedrawCoordinator |
92 { |
87 { |
93 public: |
88 public: |
621 void CAknSgcClient::DoRelinquishPriorityToForegroundAppLC(TBool aIsForeground) |
616 void CAknSgcClient::DoRelinquishPriorityToForegroundAppLC(TBool aIsForeground) |
622 { |
617 { |
623 RThread myThread; |
618 RThread myThread; |
624 TProcessPriority priority = myThread.ProcessPriority(); |
619 TProcessPriority priority = myThread.ProcessPriority(); |
625 |
620 |
626 if ( IsSystemFaded() || iFlags[EUseForegroundPriority] ) |
621 if( IsSystemFaded() ) |
627 { |
622 { |
|
623 // Solution for EKKG-7RQ9U8: |
628 // If the system is faded we have a popup on screen. |
624 // If the system is faded we have a popup on screen. |
629 // Get the process behind the foreground process, the |
625 // Get the process behind the foreground process. |
630 // EUseForegroundPriority should also affect only that process. |
|
631 TApaTask task = TApaTaskList(iEikonEnv->WsSession()).FindByPos(1); |
626 TApaTask task = TApaTaskList(iEikonEnv->WsSession()).FindByPos(1); |
632 |
627 |
633 // Check if this application is next behind the foreground app. |
628 // Check if this application is next behind the foreground app. |
634 if( task.Exists() && myThread.Id() == task.ThreadId()) |
629 if( task.Exists() && myThread.Id() == task.ThreadId()) |
635 { |
630 { |
660 // push a dummy cleanup item onto the cleanup stack |
655 // push a dummy cleanup item onto the cleanup stack |
661 CleanupStack::PushL(TCleanupItem(RestorePriority, NULL)); |
656 CleanupStack::PushL(TCleanupItem(RestorePriority, NULL)); |
662 } |
657 } |
663 } |
658 } |
664 |
659 |
665 void CAknSgcClient::UseForegroundPriorityDuringRelinquish( |
|
666 TBool aUseForeground ) |
|
667 { |
|
668 CAknSgcClient* self = Static(); |
|
669 if ( self ) |
|
670 { |
|
671 if ( aUseForeground ) |
|
672 { |
|
673 self->iFlags.Set( EUseForegroundPriority ); |
|
674 } |
|
675 else |
|
676 { |
|
677 self->iFlags.Clear( EUseForegroundPriority ); |
|
678 } |
|
679 } |
|
680 } |
|
681 |
|
682 EXPORT_C CAknLayoutConfig& CAknSgcClient::LayoutConfig() |
660 EXPORT_C CAknLayoutConfig& CAknSgcClient::LayoutConfig() |
683 { |
661 { |
684 CAknSgcClient* self = Static(); |
662 CAknSgcClient* self = Static(); |
685 __ASSERT_ALWAYS(self && self->iLayoutConfig, Panic(EAknPanicSgccLayoutConfigNull)); |
663 __ASSERT_ALWAYS(self && self->iLayoutConfig, Panic(EAknPanicSgccLayoutConfigNull)); |
686 return *self->iLayoutConfig; |
664 return *self->iLayoutConfig; |