uifw/AvKon/src/AknDef.cpp
changeset 26 62ef28f7b435
parent 0 2f259fa3e83a
child 56 d48ab3b357f1
equal deleted inserted replaced
22:75713bee6484 26:62ef28f7b435
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include "AknDef.h"
    21 #include "AknDef.h"
    22 #include <vwsdef.h> // TVwsViewId
    22 #include <vwsdef.h> // TVwsViewId
    23 
    23 
    24 #ifdef RD_IDLE_SEPARATION
    24 const TUid KPhoneUid = { 0x100058B3 };
    25 #include <e32property.h>
    25 const TUid KPhoneViewUid = { 0x10282D81 };
    26 #include <activeidle2domainpskeys.h>
       
    27 #endif
       
    28 
       
    29 const TInt KPhoneUid( 0x100058B3 );
       
    30 const TInt KActiveIdle2Uid( 0x102750F0 );
       
    31 
    26 
    32 // -----------------------------------------------------------------------------
    27 // -----------------------------------------------------------------------------
    33 // AknDef::GetPhoneIdleViewId()
    28 // AknDef::GetPhoneIdleViewId()
    34 //
    29 //
    35 // Constructs and returns the view id either from publish subscribe or from a 
    30 // Constructs and returns the view id either from publish subscribe or from a 
    36 // hardcoded value. This method replaces a constant definition in akndef.h.
    31 // hardcoded value. This method replaces a constant definition in akndef.h.
    37 // -----------------------------------------------------------------------------
    32 // -----------------------------------------------------------------------------
    38 //
    33 //
    39 EXPORT_C TInt AknDef::GetPhoneIdleViewId(TVwsViewId& aViewId)
    34 EXPORT_C TInt AknDef::GetPhoneIdleViewId(TVwsViewId& aViewId)
    40     {
    35     {
    41     TInt uidValue = NULL;
    36     aViewId.iAppUid = KPhoneUid;
    42     TInt retVal = KErrNone;
    37     aViewId.iViewUid = KPhoneViewUid;
    43 
    38     return KErrNone;
    44 #ifdef RD_IDLE_SEPARATION
       
    45     retVal = RProperty::Get( KPSUidAiInformation, KActiveIdleUid, uidValue );
       
    46     if(retVal == KErrNotFound)
       
    47         {
       
    48         retVal = KErrNone;
       
    49         uidValue = KPhoneUid;
       
    50         }
       
    51 #else
       
    52     uidValue = KPhoneUid;  // Was defined as KAknPhoneIdleViewId in akndef.h.
       
    53 #endif // RD_IDLE_SEPARATION
       
    54 
       
    55     if(retVal == KErrNone)
       
    56         {
       
    57         aViewId = TVwsViewId(TUid::Uid(uidValue), TUid::Uid(uidValue));
       
    58         }
       
    59         
       
    60 #ifdef RD_BOOT_CUSTOMIZABLE_AI
       
    61 
       
    62     // ActiveIdle2 is view-based, so this is a temporary fix
       
    63     // in order to be able to activate idle from app shell with menu-key,
       
    64     // until a proper way for view uid acquisition is made.
       
    65     
       
    66     TInt pluginRangeStart;
       
    67     TInt pluginRangeEnd;
       
    68     
       
    69     RProperty::Get( KPSUidAiInformation, KAIActivePluginRangeStart, pluginRangeStart );
       
    70     RProperty::Get( KPSUidAiInformation, KAIActivePluginRangeEnd, pluginRangeEnd );
       
    71     
       
    72     if ( uidValue >= pluginRangeStart && uidValue <= pluginRangeEnd && pluginRangeEnd )
       
    73         {
       
    74         uidValue = KActiveIdle2Uid;
       
    75         aViewId.iAppUid = TUid::Uid( uidValue );
       
    76         }
       
    77     else if ( uidValue >= pluginRangeStart ) // end UID may not be defined
       
    78         {
       
    79         uidValue = KActiveIdle2Uid;
       
    80         aViewId.iAppUid = TUid::Uid( uidValue );
       
    81         }
       
    82     
       
    83     if ( uidValue == KActiveIdle2Uid )
       
    84         {
       
    85         aViewId.iViewUid = TUid::Uid(1);
       
    86         }
       
    87         
       
    88 #endif // RD_BOOT_CUSTOMIZABLE_AI
       
    89 
       
    90     return retVal; 
       
    91     }
    39     }
    92 
    40 
    93 //  End of File  
    41 //  End of File