1package com.xtremelabs.robolectric.shadows;
2
3import android.app.KeyguardManager;
4import com.xtremelabs.robolectric.Robolectric;
5import com.xtremelabs.robolectric.internal.Implementation;
6import com.xtremelabs.robolectric.internal.Implements;
7import com.xtremelabs.robolectric.internal.RealObject;
8
9/**
10 * Shadows the {@code android.app.KeyguardManager} class.
11 */
12@Implements(KeyguardManager.class)
13public class ShadowKeyguardManager {
14    @RealObject private KeyguardManager realKeyguardManager;
15
16    private KeyguardManager.KeyguardLock keyguardLock = Robolectric.newInstanceOf(KeyguardManager.KeyguardLock.class);
17
18    private boolean inRestrictedInputMode = false;
19
20    @Implementation
21    public boolean inKeyguardRestrictedInputMode() {
22        return inRestrictedInputMode;
23    }
24
25    @Implementation
26    public KeyguardManager.KeyguardLock newKeyguardLock(String tag) {
27        return keyguardLock;
28    }
29
30    public void setinRestrictedInputMode(boolean restricted) {
31        inRestrictedInputMode = restricted;
32    }
33}
34