uifw/AknGlobalUI/AknCapServer/src/AknEikSgcs.cpp
branchRCL_3
changeset 15 08e69e956a8c
parent 9 aabf2c525e0f
child 16 71dd06cfe933
equal deleted inserted replaced
10:9f56a4e1b8ab 15:08e69e956a8c
  1023         topState.IsOrientationLandscape(), 
  1023         topState.IsOrientationLandscape(), 
  1024         topState.AppScreenMode());
  1024         topState.AppScreenMode());
  1025         
  1025         
  1026     TInt modeIndex = mode.ModeNumber();
  1026     TInt modeIndex = mode.ModeNumber();
  1027     TBool blank = iLastScreenModeSet != -1;
  1027     TBool blank = iLastScreenModeSet != -1;
  1028     if (modeIndex != iLastScreenModeSet)
  1028     
  1029         {
  1029     // We need to force a screen mode change if the new topState is not for a specified orientation
  1030 
  1030     // and we have been doing any deferring of the state change
       
  1031     TBool forceScreenModeChange = (!topState.IsOrientationSpecified()) && BackgroundAppsStateChangeDeferred();
       
  1032             
       
  1033     if (modeIndex != iLastScreenModeSet  || forceScreenModeChange )
       
  1034         {
       
  1035         SetBackgroundAppsStateChangeDeferred( EFalse );
       
  1036         
  1031         // Touch compatibility mode. Disable transition effects if compa-mode
  1037         // Touch compatibility mode. Disable transition effects if compa-mode
  1032         // application becomes foreground. Restore back in opposite case.
  1038         // application becomes foreground. Restore back in opposite case.
  1033         if (iTouchCompaModeIf)
  1039         if (iTouchCompaModeIf)
  1034             {
  1040             {
  1035             // Disable or restore transition
  1041             // Disable or restore transition
  1049 	   	    {
  1055 	   	    {
  1050 	  		iSetLayoutBlankStep = ESetLayoutBlankBeforeLayoutLoad;
  1056 	  		iSetLayoutBlankStep = ESetLayoutBlankBeforeLayoutLoad;
  1051 	   	    }
  1057 	   	    }
  1052 #endif
  1058 #endif
  1053 
  1059 
  1054 		if (!tfxOn)
  1060 	//	if (!tfxOn)
  1055 	    	eikEnv->WsSession().ClearAllRedrawStores();
  1061 	    //	eikEnv->WsSession().ClearAllRedrawStores();
  1056 		
  1062 		
  1057         // If AknNfySrv or EikSrv is displaying a global note,
  1063         // If AknNfySrv or EikSrv is displaying a global note,
  1058         // the screen blanker is allowed to stay on until it times
  1064         // the screen blanker is allowed to stay on until it times
  1059         // out (like when AknCapSrv is displaying a note).
  1065         // out (like when AknCapSrv is displaying a note).
  1060         TInt blankCnt = 1;
  1066         TInt blankCnt = 1;
  1073 
  1079 
  1074 		FadeBitmapGenerationL();
  1080 		FadeBitmapGenerationL();
  1075 		FadeColorGenerationL();
  1081 		FadeColorGenerationL();
  1076         SetLayoutBlankScreenL(blank, ESetLayoutBlankBetweenLayoutLoadAndScreenRotate);
  1082         SetLayoutBlankScreenL(blank, ESetLayoutBlankBetweenLayoutLoadAndScreenRotate);
  1077 
  1083 
  1078  		if (tfxOn)
  1084  		//if (tfxOn)
  1079 	    	eikEnv->WsSession().ClearAllRedrawStores();
  1085 	    //	eikEnv->WsSession().ClearAllRedrawStores();
  1080    	
  1086    	
  1081 		// if layout change is preemptive for app change, move the app here
  1087 		// if layout change is preemptive for app change, move the app here
  1082         DoMoveApp();
  1088         DoMoveApp();
  1083         	
  1089         	
  1084         // Set wserv screen mode
  1090         // Set wserv screen mode
  1090 
  1096 
  1091         // Set legacy mode in eiksrv app UI
  1097         // Set legacy mode in eiksrv app UI
  1092         iAvkonAppUiBase->SetLayoutAwareApp(!topState.IsLegacyLayout());
  1098         iAvkonAppUiBase->SetLayoutAwareApp(!topState.IsLegacyLayout());
  1093 
  1099 
  1094         // Start callback for handling new layout
  1100         // Start callback for handling new layout
  1095         if (newLayoutLoaded)
  1101         // Need to execute even if the layout is not new, but apps need to catch up
       
  1102         // to it because of deferred layout switches
       
  1103         if (newLayoutLoaded || forceScreenModeChange)
  1096             {
  1104             {
  1097             // Swap the screen blanker to update the foreground app's layout
  1105             // Swap the screen blanker to update the foreground app's layout
  1098             if (blank && iSetLayoutBlankStep < ESetLayoutBlankAfterScreenRotate) 
  1106             if (blank && iSetLayoutBlankStep < ESetLayoutBlankAfterScreenRotate) 
  1099                 {
  1107                 {
  1100                 iAknCapAppServerAppUi->SwapLayoutSwitchBlankScreenL();
  1108                 iAknCapAppServerAppUi->SwapLayoutSwitchBlankScreenL();
  1130             if (!iLayoutChangeCallBack && blank)
  1138             if (!iLayoutChangeCallBack && blank)
  1131                 {
  1139                 {
  1132                 // The callback will not remove the screen blanker,
  1140                 // The callback will not remove the screen blanker,
  1133                 // so remove it now.
  1141                 // so remove it now.
  1134                 iBlankCount--;
  1142                 iBlankCount--;
       
  1143 
       
  1144 #ifndef RD_NO_SYSTEM_SCREEN_BLANKING
  1135                 iAknCapAppServerAppUi->BlankScreenL(EFalse);
  1145                 iAknCapAppServerAppUi->BlankScreenL(EFalse);
       
  1146 #endif
  1136                 }
  1147                 }
  1137             }
  1148             }
  1138         }
  1149         }
  1139     }
  1150     }
  1140 
  1151 
  1143     // Use a screen blanker to hide the screen change
  1154     // Use a screen blanker to hide the screen change
  1144     if (aBlank && aStep == iSetLayoutBlankStep)
  1155     if (aBlank && aStep == iSetLayoutBlankStep)
  1145         {
  1156         {
  1146         // blank the screen and keep track of how many times it's been blanked
  1157         // blank the screen and keep track of how many times it's been blanked
  1147         iBlankCount++;
  1158         iBlankCount++;
       
  1159 #ifndef RD_NO_SYSTEM_SCREEN_BLANKING
  1148         iAknCapAppServerAppUi->BlankScreenL(ETrue, ETrue);
  1160         iAknCapAppServerAppUi->BlankScreenL(ETrue, ETrue);
       
  1161 #endif
  1149         }
  1162         }
  1150 	}
  1163 	}
  1151 
  1164 
  1152 void CEikSgcServer::HandleLayoutChangeCallBackL()
  1165 void CEikSgcServer::HandleLayoutChangeCallBackL()
  1153     {
  1166     {
  1384 void CEikSgcServer::DoRemoveBlank()
  1397 void CEikSgcServer::DoRemoveBlank()
  1385     {
  1398     {
  1386     // remove any remaining screen blanker
  1399     // remove any remaining screen blanker
  1387     for (; iRemoveBlankCount>0; iRemoveBlankCount--)
  1400     for (; iRemoveBlankCount>0; iRemoveBlankCount--)
  1388         {
  1401         {
       
  1402 #ifndef RD_NO_SYSTEM_SCREEN_BLANKING
  1389         TRAP_IGNORE( iAknCapAppServerAppUi->BlankScreenL( EFalse ) );
  1403         TRAP_IGNORE( iAknCapAppServerAppUi->BlankScreenL( EFalse ) );
       
  1404 #endif
  1390         }
  1405         }
  1391         
  1406         
  1392     iRemoveBlankCount = 0;
  1407     iRemoveBlankCount = 0;
  1393     
  1408     
  1394     // readjust the status pane wg since we pushed it forward with the screen blanker
  1409     // readjust the status pane wg since we pushed it forward with the screen blanker
  1520     {
  1535     {
  1521     static_cast<CEikSgcServer*>(aThis)->DoChangeIdleState();
  1536     static_cast<CEikSgcServer*>(aThis)->DoChangeIdleState();
  1522     return EFalse;
  1537     return EFalse;
  1523     }
  1538     }
  1524 
  1539 
       
  1540 void CEikSgcServer::SetBackgroundAppsStateChangeDeferred(TBool aDeferred)
       
  1541     {
       
  1542     iBackgroundLayoutDeferred = aDeferred;
       
  1543     }
       
  1544 
       
  1545 TBool CEikSgcServer::BackgroundAppsStateChangeDeferred() const
       
  1546     {
       
  1547     return iBackgroundLayoutDeferred;
       
  1548     }
  1525 //
  1549 //
  1526 // CAknSgcServerImpl
  1550 // CAknSgcServerImpl
  1527 //
  1551 //
  1528 CAknSgcServerImpl::CAknSgcServerImpl(CEikSgcServer* aServer)
  1552 CAknSgcServerImpl::CAknSgcServerImpl(CEikSgcServer* aServer)
  1529 : iServer(aServer)
  1553 : iServer(aServer)