30 #ifdef RD_INTELLIGENT_TEXT_INPUT |
30 #ifdef RD_INTELLIGENT_TEXT_INPUT |
31 #include <AknFepInternalPSKeys.h> // KAknFepFnKeyState |
31 #include <AknFepInternalPSKeys.h> // KAknFepFnKeyState |
32 #endif |
32 #endif |
33 #include "avkoninternalpskeys.h" // KAknIdleAppWindowGroupId |
33 #include "avkoninternalpskeys.h" // KAknIdleAppWindowGroupId |
34 #include <AknCapServerDefs.h> |
34 #include <AknCapServerDefs.h> |
35 #include <activeidle2domainpskeys.h> |
|
36 #include <eikpriv.rsg> |
35 #include <eikpriv.rsg> |
37 #include <coedef.h> |
36 #include <coedef.h> |
38 #include <eiksvdef.h> |
37 #include <eiksvdef.h> |
39 #include <aknconsts.h> |
38 #include <aknconsts.h> |
40 #include <AknsConstants.h> |
39 #include <AknsConstants.h> |
72 #ifdef RD_UI_TRANSITION_EFFECTS_LAYOUT_SWITCH |
71 #ifdef RD_UI_TRANSITION_EFFECTS_LAYOUT_SWITCH |
73 #include <gfxtranseffect/gfxtranseffect.h> |
72 #include <gfxtranseffect/gfxtranseffect.h> |
74 #include <akntranseffect.h> // for Transition effect enumerations |
73 #include <akntranseffect.h> // for Transition effect enumerations |
75 #endif |
74 #endif |
76 |
75 |
77 #ifdef SYMBIAN_BUILD_GCE |
|
78 #include <alf/alfclientbase.h> |
|
79 #endif |
|
80 |
|
81 #ifdef RD_INTELLIGENT_TEXT_INPUT |
76 #ifdef RD_INTELLIGENT_TEXT_INPUT |
82 #include <AvkonInternalCRKeys.h> |
77 #include <AvkonInternalCRKeys.h> |
83 |
78 |
84 #include "akncapserverdiscreetpopuphandler.h" |
79 #include "akncapserverdiscreetpopuphandler.h" |
85 |
80 |
86 const TUid KPtiEnginePSUid = {0x101F8610}; // Same as PtiEngine dll |
81 const TUid KPtiEnginePSUid = {0x101F8610}; // Same as PtiEngine dll |
87 |
82 const TUid KPhoneUid = { 0x100058B3 }; |
88 enum TPtiEnginePSKeys |
83 enum TPtiEnginePSKeys |
89 { |
84 { |
90 EKeyMapPropertyCount, |
85 EKeyMapPropertyCount, |
91 EKeyMapPropertyData, |
86 EKeyMapPropertyData, |
92 EKeyMapPropertyCount2, |
87 EKeyMapPropertyCount2, |
105 |
100 |
106 const TInt KWgPriorityCoverEverything = 10000; |
101 const TInt KWgPriorityCoverEverything = 10000; |
107 const TInt KKeyEventICodeThreshold = 0x001f; |
102 const TInt KKeyEventICodeThreshold = 0x001f; |
108 const TInt KMaxLanguageCodeLength = 6; // 5 digits + separator |
103 const TInt KMaxLanguageCodeLength = 6; // 5 digits + separator |
109 |
104 |
110 const TInt KRemoveBlankDelay = 200000; // 0.2s |
105 |
111 |
106 |
112 _LIT(KEikSrvUIResFileName, "z:\\resource\\eiksrvui.rsc"); |
107 _LIT(KEikSrvUIResFileName, "z:\\resource\\eiksrvui.rsc"); |
113 _LIT_SECURITY_POLICY_PASS(KPassReadPolicy); |
108 _LIT_SECURITY_POLICY_PASS(KPassReadPolicy); |
114 _LIT_SECURITY_POLICY_C1(KWriteDDPolicy, ECapabilityWriteDeviceData); |
109 _LIT_SECURITY_POLICY_C1(KWriteDDPolicy, ECapabilityWriteDeviceData); |
115 _LIT_SECURITY_POLICY_C1(KReadPolicy, ECapability_None); |
110 _LIT_SECURITY_POLICY_C1(KReadPolicy, ECapability_None); |
229 // we panic here if something goes wrong as startup will fail anyway. |
222 // we panic here if something goes wrong as startup will fail anyway. |
230 __ASSERT_ALWAYS(err==KErrNone, User::Invariant()); |
223 __ASSERT_ALWAYS(err==KErrNone, User::Invariant()); |
231 |
224 |
232 me->iEikSrv.AllowNotifierAppServersToLoad(); |
225 me->iEikSrv.AllowNotifierAppServersToLoad(); |
233 me->iEikSrv.Close(); // currently there is no use to keep this session alive. |
226 me->iEikSrv.Close(); // currently there is no use to keep this session alive. |
234 |
227 |
235 #ifdef SYMBIAN_BUILD_GCE |
|
236 TRAP(err, CAlfAsynchStartup::StartL()); |
|
237 #endif |
|
238 |
|
239 return err; |
228 return err; |
240 } |
229 } |
241 |
230 |
242 void CAknCapAppServerAppUi::LoadAlternateFsPlugin() |
231 void CAknCapAppServerAppUi::LoadAlternateFsPlugin() |
243 { |
232 { |
275 void CAknCapAppServerAppUi::ConstructL() |
264 void CAknCapAppServerAppUi::ConstructL() |
276 { |
265 { |
277 User::SetCritical(User::ESystemCritical); |
266 User::SetCritical(User::ESystemCritical); |
278 |
267 |
279 InitiateOFNStatus(); |
268 InitiateOFNStatus(); |
280 |
|
281 iEikonEnv->SetSystem( ETrue ); |
|
282 |
269 |
283 // install default FEP if none set before |
270 // install default FEP if none set before |
284 if (iEikonEnv->FepUid() == KNullUid) |
271 if (iEikonEnv->FepUid() == KNullUid) |
285 { |
272 { |
286 iEikonEnv->InstallFepL(TUid::Uid(0x101FD65A)); |
273 iEikonEnv->InstallFepL(TUid::Uid(0x101FD65A)); |
369 iKeyCaptureControl->ConstructL(*this); |
356 iKeyCaptureControl->ConstructL(*this); |
370 |
357 |
371 TFileName fileName(KEikSrvUIResFileName); |
358 TFileName fileName(KEikSrvUIResFileName); |
372 BaflUtils::NearestLanguageFile(iEikonEnv->FsSession(),fileName); |
359 BaflUtils::NearestLanguageFile(iEikonEnv->FsSession(),fileName); |
373 iResourceFileOffset=iCoeEnv->AddResourceFileL(fileName); |
360 iResourceFileOffset=iCoeEnv->AddResourceFileL(fileName); |
|
361 |
|
362 // Create FSW |
|
363 iFSControl= new (ELeave) CAknFastSwapWindowControl(*this); |
|
364 iFSControl->ConstructL(); |
374 |
365 |
375 // MMC unlocker |
366 // MMC unlocker |
376 iMMCUnlock = CAknMMCPasswordRequester::NewL(); |
367 iMMCUnlock = CAknMMCPasswordRequester::NewL(); |
377 |
368 |
378 // Boost our priority similar to eikon server. |
369 // Boost our priority similar to eikon server. |
439 TCallBack(GlobalNotesAllowedCallBack, this), |
430 TCallBack(GlobalNotesAllowedCallBack, this), |
440 iGlobalNotesAllowedProperty); |
431 iGlobalNotesAllowedProperty); |
441 |
432 |
442 iGlobalNotesAllowedSubscriber->Subscribe(); |
433 iGlobalNotesAllowedSubscriber->Subscribe(); |
443 |
434 |
444 // Start listening "telephony idle uid" property. |
|
445 User::LeaveIfError(iTelephonyIdleUidProperty.Attach( |
|
446 KPSUidAiInformation, |
|
447 KActiveIdleUid)); |
|
448 |
|
449 iTelephonyIdleUidSubscriber = new (ELeave) CPropertySubscriber( |
|
450 TCallBack(TelephonyIdleUidCallBack, this), |
|
451 iTelephonyIdleUidProperty); |
|
452 |
|
453 iTelephonyIdleUidSubscriber->Subscribe(); |
|
454 #ifdef RD_INTELLIGENT_TEXT_INPUT |
435 #ifdef RD_INTELLIGENT_TEXT_INPUT |
455 |
436 |
456 TInt err1 = 0; |
437 TInt err1 = 0; |
457 |
438 |
458 err1 = RProperty::Define(KPtiEnginePSUid, EKeyMapPropertyCount, RProperty::EInt, |
439 err1 = RProperty::Define(KPtiEnginePSUid, EKeyMapPropertyCount, RProperty::EInt, |
483 } |
464 } |
484 #endif |
465 #endif |
485 |
466 |
486 // Create capserver discreetpopuphandler |
467 // Create capserver discreetpopuphandler |
487 CAknCapServerDiscreetPopupHandler::CreateDiscreetPopupHandlerL(); |
468 CAknCapServerDiscreetPopupHandler::CreateDiscreetPopupHandlerL(); |
488 |
469 LoadAlternateFsPlugin(); |
489 LoadAlternateFsPlugin(); |
470 |
490 // Create FSW |
|
491 if ( iAlternateFS == NULL ) |
|
492 { |
|
493 iFSControl= new (ELeave) CAknFastSwapWindowControl(*this); |
|
494 iFSControl->ConstructL(); |
|
495 } |
|
496 ProcessInitFlipStatus(); |
471 ProcessInitFlipStatus(); |
497 } |
472 } |
498 |
473 |
499 TKeyResponse CAknCapAppServerAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) |
474 TKeyResponse CAknCapAppServerAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) |
500 { |
475 { |
584 iAlternateFS->Dismiss(); |
559 iAlternateFS->Dismiss(); |
585 } |
560 } |
586 } |
561 } |
587 else |
562 else |
588 { |
563 { |
589 if ( iFSControl ) |
564 if ( aMessage.Int0() ) |
590 { |
565 { |
591 if ( aMessage.Int0() ) |
566 TInt err = KErrNone; |
592 { |
567 TRAP( err, iFSControl->InitializeWindowGroupListL( EFalse )); |
593 TInt err = KErrNone; |
568 if ( !err ) |
594 TRAP( err, iFSControl->InitializeWindowGroupListL( EFalse )); |
569 { |
595 if ( !err ) |
570 iFSControl->RunFastSwapL(); |
596 { |
|
597 iFSControl->RunFastSwapL(); |
|
598 } |
|
599 } |
571 } |
600 else |
572 } |
601 { |
573 else |
602 iFSControl->CloseFastSwap(); |
574 { |
603 } |
575 iFSControl->CloseFastSwap(); |
604 } |
576 } |
605 } |
577 } |
606 } |
578 } |
607 aMessage.Complete(KErrNone); |
579 aMessage.Complete(KErrNone); |
608 break; |
580 break; |
609 } |
581 } |
610 case EAknSRefreshTaskList: |
582 case EAknSRefreshTaskList: |
611 { |
583 { |
612 TInt err = UpdateTaskListL( ETrue ); |
584 TInt err = UpdateTaskListL( ETrue ); |
613 if ( err != KErrNone ) |
585 if ( err != KErrNone ) |
614 { |
586 { |
615 if ( iFSControl ) |
587 iFSControl->CloseFastSwap(); |
616 { |
|
617 iFSControl->CloseFastSwap(); |
|
618 } |
|
619 } |
588 } |
620 aMessage.Complete(err); |
589 aMessage.Complete(err); |
621 break; |
590 break; |
622 } |
591 } |
623 default: |
592 default: |
808 if(iAlternateFS && iAlternateFS->IsReady() && iAlternateFS->IsVisible()) |
777 if(iAlternateFS && iAlternateFS->IsReady() && iAlternateFS->IsVisible()) |
809 { |
778 { |
810 iAlternateFS->HandleShortAppKeyPress(); |
779 iAlternateFS->HandleShortAppKeyPress(); |
811 return ETrue; |
780 return ETrue; |
812 } |
781 } |
813 if ( iFSControl ) |
782 if (iFSControl->IsVisible()) |
814 { |
783 { |
815 if (iFSControl->IsVisible()) |
784 iFSControl->HandleShortAppsKeyPressL(); |
816 { |
785 return ETrue; |
817 iFSControl->HandleShortAppsKeyPressL(); |
786 } |
818 return ETrue; |
|
819 } |
|
820 } |
|
821 |
|
822 |
787 |
823 return EFalse; |
788 return EFalse; |
824 } |
789 } |
825 |
790 |
826 TBool CAknCapAppServerAppUi::HandleLongAppsKeyPressL() |
791 TBool CAknCapAppServerAppUi::HandleLongAppsKeyPressL() |
871 { |
832 { |
872 iStatusPane->SwitchLayoutL(aLayoutResId); |
833 iStatusPane->SwitchLayoutL(aLayoutResId); |
873 } |
834 } |
874 } |
835 } |
875 |
836 |
876 TInt CAknCapAppServerAppUi::RemoveBlankCallBack( TAny* aThis ) |
837 void CAknCapAppServerAppUi::BlankScreenL(TBool aBlank, TBool aToForeground) |
877 { |
|
878 static_cast<CAknCapAppServerAppUi*>( aThis )->DoRemoveBlank(); |
|
879 return EFalse; |
|
880 } |
|
881 |
|
882 void CAknCapAppServerAppUi::BlankScreenL(TBool aBlank, TBool /* aToForeground */) |
|
883 { |
838 { |
884 if (aBlank) |
839 if (aBlank) |
885 { |
840 { |
886 if (++iBlankWinRefCount == 1) |
841 if (++iBlankWinRefCount == 1) |
887 { |
842 { |
888 delete iRemoveBlankCallBack; |
|
889 iRemoveBlankCallBack = NULL; |
|
890 |
|
891 // We are ignoring the foreground parameter because we only have one |
|
892 // type of blanking behaviour in AlfClient. Act as if ETrue |
|
893 iAlfClient.BlankScreen(ETrue); |
|
894 iForegroundBlankScreen = ETrue; // always as if foreground blanking |
|
895 /* |
|
896 ASSERT(!iBlankWin); |
843 ASSERT(!iBlankWin); |
897 if (aToForeground) |
844 if (aToForeground) |
898 { |
845 { |
899 iBackdropWindowGroup.SetOrdinalPosition(0, KWgPriorityCoverEverything); |
846 iBackdropWindowGroup.SetOrdinalPosition(0, KWgPriorityCoverEverything); |
900 } |
847 } |
902 { |
849 { |
903 iBackdropWindowGroup.SetOrdinalPosition(1, ECoeWinPriorityNormal); |
850 iBackdropWindowGroup.SetOrdinalPosition(1, ECoeWinPriorityNormal); |
904 } |
851 } |
905 iBlankWin = CAknServBlankWin::NewL(iBackdropWindowGroup, iStatusPane); |
852 iBlankWin = CAknServBlankWin::NewL(iBackdropWindowGroup, iStatusPane); |
906 iForegroundBlankScreen = aToForeground; |
853 iForegroundBlankScreen = aToForeground; |
907 */ |
|
908 } |
854 } |
909 } |
855 } |
910 else if (--iBlankWinRefCount <= 0) |
856 else if (--iBlankWinRefCount <= 0) |
911 { |
857 { |
912 iBlankWinRefCount = 0; |
858 iBlankWinRefCount = 0; |
913 |
859 if (iForegroundBlankScreen) |
914 // Blanking IPC is delayed or restarted |
860 { |
915 delete iRemoveBlankCallBack; |
|
916 iRemoveBlankCallBack = NULL; |
|
917 iRemoveBlankCallBack = CPeriodic::NewL(CActive::EPriorityLow); |
|
918 |
|
919 iRemoveBlankCallBack->Start( |
|
920 KRemoveBlankDelay, |
|
921 KRemoveBlankDelay, |
|
922 TCallBack(RemoveBlankCallBack, this)); |
|
923 |
|
924 |
|
925 /* if (iForegroundBlankScreen) |
|
926 { |
|
927 */ |
|
928 #ifdef RD_UI_TRANSITION_EFFECTS_LAYOUT_SWITCH |
861 #ifdef RD_UI_TRANSITION_EFFECTS_LAYOUT_SWITCH |
|
862 CWsScreenDevice* screen = iEikonEnv->ScreenDevice(); |
929 /* |
863 /* |
930 CWsScreenDevice* screen = iEikonEnv->ScreenDevice(); |
|
931 RWsSession& ws = iEikonEnv->WsSession(); |
864 RWsSession& ws = iEikonEnv->WsSession(); |
932 TInt wgId = ws.GetFocusWindowGroup(); |
865 TInt wgId = ws.GetFocusWindowGroup(); |
933 CApaWindowGroupName* wgName = CApaWindowGroupName::NewL(ws, wgId); |
866 CApaWindowGroupName* wgName = CApaWindowGroupName::NewL(ws, wgId); |
934 CleanupStack::PushL( wgName ); |
867 CleanupStack::PushL( wgName ); |
935 TUid appUid = wgName->AppUid(); |
868 TUid appUid = wgName->AppUid(); |
939 // TRect( screen->SizeInPixels() ), |
872 // TRect( screen->SizeInPixels() ), |
940 // AknTransEffect::EParameterType, |
873 // AknTransEffect::EParameterType, |
941 // AknTransEffect::GfxTransParam( KTfxServerUid ) |
874 // AknTransEffect::GfxTransParam( KTfxServerUid ) |
942 // ); |
875 // ); |
943 |
876 |
944 // GfxTransEffect::EndFullScreen(); |
877 GfxTransEffect::EndFullScreen(); |
945 #endif |
878 #endif |
946 /* iBackdropWindowGroup.SetOrdinalPosition(1, ECoeWinPriorityNormal); |
879 iBackdropWindowGroup.SetOrdinalPosition(1, ECoeWinPriorityNormal); |
947 } |
880 } |
948 delete iBlankWin; |
881 delete iBlankWin; |
949 iBlankWin = 0; |
882 iBlankWin = 0; |
950 */ |
|
951 iForegroundBlankScreen = EFalse; |
883 iForegroundBlankScreen = EFalse; |
952 } |
884 } |
953 } |
885 } |
954 |
886 |
955 void CAknCapAppServerAppUi::DoRemoveBlank() |
|
956 { |
|
957 RDebug::Print( _L("CAknCapAppServerAppUi::DoRemoveBlank")); |
|
958 iAlfClient.BlankScreen(EFalse); |
|
959 delete iRemoveBlankCallBack; |
|
960 iRemoveBlankCallBack = NULL; |
|
961 } |
|
962 |
|
963 void CAknCapAppServerAppUi::SwapLayoutSwitchBlankScreenL() |
887 void CAknCapAppServerAppUi::SwapLayoutSwitchBlankScreenL() |
964 { |
888 { |
965 /* |
|
966 if (iBlankWin) |
889 if (iBlankWin) |
967 { |
890 { |
968 if (!iForegroundBlankScreen) |
891 if (!iForegroundBlankScreen) |
969 { |
892 { |
970 iBackdropWindowGroup.SetOrdinalPosition(0, KWgPriorityCoverEverything); |
893 iBackdropWindowGroup.SetOrdinalPosition(0, KWgPriorityCoverEverything); |
973 CAknServBlankWin* newBlankWin = CAknServBlankWin::NewL(iBackdropWindowGroup, iStatusPane); |
896 CAknServBlankWin* newBlankWin = CAknServBlankWin::NewL(iBackdropWindowGroup, iStatusPane); |
974 newBlankWin->SetLayoutBlank(ETrue); |
897 newBlankWin->SetLayoutBlank(ETrue); |
975 delete iBlankWin; |
898 delete iBlankWin; |
976 iBlankWin = newBlankWin; |
899 iBlankWin = newBlankWin; |
977 } |
900 } |
978 */ |
|
979 } |
901 } |
980 |
902 |
981 TBool CAknCapAppServerAppUi::IsDisplayingForegroundBlankScreen() const |
903 TBool CAknCapAppServerAppUi::IsDisplayingForegroundBlankScreen() const |
982 { |
904 { |
983 return iForegroundBlankScreen; |
905 return iForegroundBlankScreen; |
1021 } |
943 } |
1022 } |
944 } |
1023 |
945 |
1024 void CAknCapAppServerAppUi::HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination) |
946 void CAknCapAppServerAppUi::HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination) |
1025 { |
947 { |
1026 if ( iMessageReaderLongPressDetector && |
948 if ( iMessageReaderLongPressDetector && !IsAppsKeySuppressed() && !iFSControl->IsDisplayed() ) |
1027 !IsAppsKeySuppressed() && |
|
1028 ( iFSControl == NULL || !iFSControl->IsDisplayed() ) ) |
|
1029 { |
949 { |
1030 // Message Reader can be launched by long pressing left soft key |
950 // Message Reader can be launched by long pressing left soft key |
1031 // events need to be intercepted/consumed before they are forwarded to cba |
951 // events need to be intercepted/consumed before they are forwarded to cba |
1032 if ( iMessageReaderLongPressDetector->HandleWsEventL( aEvent, aDestination ) ) |
952 if ( iMessageReaderLongPressDetector->HandleWsEventL( aEvent, aDestination ) ) |
1033 { |
953 { |
1083 // --------------------------------------------------------- |
1003 // --------------------------------------------------------- |
1084 // |
1004 // |
1085 TInt CAknCapAppServerAppUi::UpdateTaskListL( TBool aTaskListRefreshNeeded ) |
1005 TInt CAknCapAppServerAppUi::UpdateTaskListL( TBool aTaskListRefreshNeeded ) |
1086 { |
1006 { |
1087 TInt err = KErrNone; |
1007 TInt err = KErrNone; |
1088 if ( iFSControl && iFSControl->IsDisplayed() ) |
1008 if ( iFSControl->IsDisplayed() ) |
1089 { |
1009 { |
1090 // update window group list (task list) |
1010 // update window group list (task list) |
1091 TInt windowGroupListChanged = ETrue; |
1011 TInt windowGroupListChanged = ETrue; |
1092 |
1012 |
1093 TRAP( err, windowGroupListChanged = iFSControl->InitializeWindowGroupListL( |
1013 TRAP( err, windowGroupListChanged = iFSControl->InitializeWindowGroupListL( |
1129 { |
1049 { |
1130 TChar::TBdCategory numCategory; |
1050 TChar::TBdCategory numCategory; |
1131 TBool isNumber = EFalse; |
1051 TBool isNumber = EFalse; |
1132 numCategory = (TChar(aChar)).GetBdCategory(); |
1052 numCategory = (TChar(aChar)).GetBdCategory(); |
1133 isNumber = ((numCategory == TChar::EEuropeanNumber) || (numCategory == TChar::EArabicNumber) || |
1053 isNumber = ((numCategory == TChar::EEuropeanNumber) || (numCategory == TChar::EArabicNumber) || |
1134 (numCategory == TChar::EEuropeanNumberTerminator) || |
1054 (numCategory == TChar::EEuropeanNumberTerminator) || (aChar == 0x2E) || |
1135 ( numCategory == TChar::EEuropeanNumberSeparator ) || |
|
1136 (aChar == 0x2E) || |
|
1137 (aChar == 0x2A) || (aChar == 0x3D) || (aChar == 0x2F)); |
1055 (aChar == 0x2A) || (aChar == 0x3D) || (aChar == 0x2F)); |
1138 return isNumber; |
1056 return isNumber; |
1139 } |
1057 } |
1140 #endif |
1058 #endif |
1141 |
1059 |
1419 self->HandlePropertyChange(KUikGlobalNotesAllowed); |
1337 self->HandlePropertyChange(KUikGlobalNotesAllowed); |
1420 } |
1338 } |
1421 return KErrNone; |
1339 return KErrNone; |
1422 } |
1340 } |
1423 |
1341 |
1424 TInt CAknCapAppServerAppUi::TelephonyIdleUidCallBack(TAny* aPtr) |
|
1425 { |
|
1426 CAknCapAppServerAppUi* self = static_cast<CAknCapAppServerAppUi*>(aPtr); |
|
1427 if (self) |
|
1428 { |
|
1429 self->HandlePropertyChange(KActiveIdleUid); |
|
1430 } |
|
1431 return KErrNone; |
|
1432 } |
|
1433 |
1342 |
1434 void CAknCapAppServerAppUi::HandlePropertyChange(const TInt aProperty) |
1343 void CAknCapAppServerAppUi::HandlePropertyChange(const TInt aProperty) |
1435 { |
1344 { |
1436 switch(aProperty) |
1345 switch(aProperty) |
1437 { |
1346 { |
1438 case KUikGlobalNotesAllowed: |
1347 case KUikGlobalNotesAllowed: |
1439 { |
1348 { |
1440 TInt globalNotesAllowed = 0; |
1349 TUid uid = KPhoneUid; |
1441 TInt err = iTelephonyIdleUidProperty.Get(globalNotesAllowed); |
1350 TApaTaskList taskList ( CEikonEnv::Static ()->WsSession () ); |
1442 if(!err && globalNotesAllowed) |
1351 TApaTask task = taskList.FindApp ( uid ); |
|
1352 if ( task.Exists() ) |
1443 { |
1353 { |
1444 // Global notes allowed, so the boot is finished. Now the idle app uid and its |
1354 TInt wgId = task.WgId (); |
1445 // window group id can be fetched. |
|
1446 HandlePropertyChange(KActiveIdleUid); |
|
1447 } |
|
1448 } |
|
1449 break; |
|
1450 case KActiveIdleUid: |
|
1451 { |
|
1452 TInt idleAppUid = 0; |
|
1453 TInt err = iTelephonyIdleUidProperty.Get(idleAppUid); |
|
1454 if(!err) |
|
1455 { |
|
1456 // Fetch the Idle application window group id. |
|
1457 TApaTaskList taskList(CEikonEnv::Static()->WsSession()); |
|
1458 TApaTask task = taskList.FindApp(TUid::Uid(idleAppUid)); |
|
1459 TInt wgId = task.WgId(); |
|
1460 |
|
1461 // Save the window group id to PubSub. |
1355 // Save the window group id to PubSub. |
1462 RProperty::Set(KPSUidAvkonInternal, KAknIdleAppWindowGroupId, wgId); |
1356 RProperty::Set ( KPSUidAvkonInternal, KAknIdleAppWindowGroupId, |
|
1357 wgId ); |
1463 } |
1358 } |
1464 } |
1359 } |
1465 break; |
1360 break; |
1466 default: |
1361 default: |
1467 break; |
1362 break; |