=========================
AndroidLock XT public API
=========================
(available from ver. 3.4)


[ Notifications ]

AndroidLock XT posts notifications through NSNotificationCenter to notify other tweaks about certain events.
Currently, the following events are defined:

com.zmaster.androidlock.wrong-attempt
    A wrong pattern has been drawn.

com.zmaster.androidlock.too-many-wrong-attempts
    Too many wrong patterns have been drawn.
    The maximum number of attempts is set in:
      Settings > AndroidLock XT > Change behaviour > Max attempts
    Note: if Max attempts = Disabled, this notification is never posted.


[ Objective-C ]

AndroidLock XT provides some methods to allow other tweaks to interact with it.
The methods are added to the SBLockScreenManager class:

@interface SBLockScreenManager (AndroidLock)
- (BOOL)androidlockIsEnabled;
- (BOOL)androidlockIsLocked;
- (BOOL)androidlockAttemptUnlockWithUnlockActionContext:(id)unlockActionContext;
- (BOOL)androidlockAttemptUnlockWithUnlockActionContext:(id)unlockActionContext animatingPasscode:(BOOL)animatingPasscode;
@end

Here is the description for each method:

- (BOOL)androidlockIsEnabled
    Returns YES if AndroidLock XT is enabled in Settings.
    See also androidlockIsLocked for related information.

- (BOOL)androidlockIsLocked
    Returns YES if AndroidLock XT is locking the device.
    It's important to understand that, even if AndroidLock XT is enabled
    (androidlockIsEnabled == YES), it could be not locking the device. This
    happens for example if the user enabled the "Skip On WiFi" option and the
    device is connected to a trusted WiFi network.
    If AndroidLock XT is NOT enabled, this methods always returns NO.

- (BOOL)androidlockAttemptUnlockWithUnlockActionContext:(id)unlockActionContext
    This is the same as androidlockAttemptUnlockWithUnlockActionContext:animatingPasscode: with animatingPasscode = YES

- (BOOL)androidlockAttemptUnlockWithUnlockActionContext:(id)unlockActionContext animatingPasscode:(BOOL)animatingPasscode;
    Starts an unlock sequence.
    If the device is NOT locked by AndroidLock XT:
      the device unlocks normally and the methods returns YES
    If the device is locked by AndroidLock XT:
      the pattern input page is showed to allow the user to enter the pattern and the methods returns NO.
      If animatingPasscode is set to YES, the lockscreen animates to the pattern input page.
      If animatingPasscode is set to NO, the lockscreen immediately shows the pattern input page.
    unlockActionContext specifies an optional action to run when the unlock completes and can be set to nil.


[ Hints ]

Before trying to call AndroidLock XT's methods, you must ensure that it is installed. If you don't do so, SpringBoard
will crash because you're attempting to call methods that does not exist (they are added by AndroidLock XT).
The recommended way is to check if AndroidLock XT is installed and enabled with the following code:
    BOOL isAndroidLockEnabled = NO;
    SBLockScreenManager *lockScreenManager = [SBLockScreenManager sharedInstance];
    if([lockScreenManager respondsToSelector:@selector(androidlockIsEnabled)])
        isAndroidLockEnabled = [awayController androidlockIsEnabled];
