| ID | KIS000831 | Creation date | February 22, 2008 |
| Platform | S60 2nd Edition, S60 3rd Edition, and S60 3rd Edition, FP1 | Devices | All S60 2nd Edition, S60 3rd Edition, and S60 3rd Edition, FP1 devices |
| Category | Symbian C++ | Subcategory | Customization, Screensavers |
| Keywords (APIs, classes, methods, functions): |
MScreensaverPluginHost::GetIndicatorPayload(TScreensaverIndicatorIndex aIndex, TIndicatorPayload & aResult); with EScreensaverIndicatorIndexKeyGuardState as the first parameter always returns a non-zero value irrespective of the keypad status.
To create a customized screensaver, MScreensaverPluginHost::GetIndicatorPayload() needs to be used to query the status of Keypad, missed calls, new messages, active profile, etc. Using this API for querying the keypad status does not work in any of the S60 2nd Edition, S60 3rd Edition, and S60 3rd Edition, FP1 devices.
TIndicatorPayload result;
TInt status = MScreensaverPluginHost::GetIndicatorPayload (
EScreensaverIndicatorIndexKeyGuardState, result );
// If result is other than '0', keylock is activated
if (status == KErrNone && result.iInteger != 0)
{
// Draw key symbol
}
A workaround is to query the keylock status with the RAknKeyLock method.
RAknKeyLock keyLock;
if (keyLock.Connect() == KErrNone)
{
TBool locked = keyLock.IsKeyLockEnabled();
if (locked)
{
// Draw key symbol
}
keyLock.Close();
}
No related wiki articles found