FileDocCategorySizeDatePackage
KeyguardStateMonitor.javaAPI DocAndroid 5.1 API2923Thu Mar 12 22:22:42 GMT 2015com.android.internal.policy.impl.keyguard

KeyguardStateMonitor

public class KeyguardStateMonitor extends IKeyguardStateCallback.Stub
Maintains a cached copy of Keyguard's state.
hide

Fields Summary
private static final String
TAG
private volatile boolean
mIsShowing
private volatile boolean
mSimSecure
private volatile boolean
mInputRestricted
private final com.android.internal.widget.LockPatternUtils
mLockPatternUtils
Constructors Summary
public KeyguardStateMonitor(android.content.Context context, com.android.internal.policy.IKeyguardService service)


         
        mLockPatternUtils = new LockPatternUtils(context);
        mLockPatternUtils.setCurrentUser(ActivityManager.getCurrentUser());
        try {
            service.addStateMonitorCallback(this);
        } catch (RemoteException e) {
            Slog.w(TAG, "Remote Exception", e);
        }
    
Methods Summary
public booleanisInputRestricted()

        return mInputRestricted;
    
public booleanisSecure()

        return mLockPatternUtils.isSecure() || mSimSecure;
    
public booleanisShowing()

        return mIsShowing;
    
public voidonInputRestrictedStateChanged(boolean inputRestricted)

        mInputRestricted = inputRestricted;
    
public voidonShowingStateChanged(boolean showing)

        mIsShowing = showing;
    
public voidonSimSecureStateChanged(boolean simSecure)

        mSimSecure = simSecure;
    
public voidsetCurrentUser(int userId)

        mLockPatternUtils.setCurrentUser(userId);