Code example for KeyguardManager

Methods: isKeyguardLocked

0
    } 
 
    private boolean isKeyguardShowing() { 
        if (km == null)
            return false; 
        return km.isKeyguardLocked();
    } 
 
    private boolean isCurrentHomeActivity(ComponentName component, ActivityInfo homeInfo) {
        if (homeInfo == null) {
            homeInfo = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME)
                    .resolveActivityInfo(mContext.getPackageManager(), 0);
        } 
        return homeInfo != null
                && homeInfo.packageName.equals(component.getPackageName())
                && homeInfo.name.equals(component.getClassName());
    } 
 
    class SettingsObserver extends ContentObserver {
        SettingsObserver(Handler handler) {
            super(handler);