Query the navigator to determine the lock state.
#include <bps/navigator.h>
BPS_API int navigator_get_device_lock_state(void)
BlackBerry 10.0.0
An application can call this function to determine if the device is currently NAVIGATOR_DEVICE_LOCK_STATE_UNLOCKED, NAVIGATOR_DEVICE_LOCK_STATE_SCREEN_LOCKED, or NAVIGATOR_DEVICE_LOCK_STATE_PASSWORD_LOCKED. An application can also monitor NAVIGATOR_DEVICE_LOCK_STATE events.
On success, one of NAVIGATOR_DEVICE_LOCK_STATE_UNLOCKED, NAVIGATOR_DEVICE_LOCK_STATE_SCREEN_LOCKED, or NAVIGATOR_DEVICE_LOCK_STATE_PASSWORD_LOCKED. Otherwise, return BPS_FAILURE with errno set.