• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.xtremelabs.robolectric.shadows;
2 
3 import android.app.KeyguardManager;
4 import com.xtremelabs.robolectric.Robolectric;
5 import com.xtremelabs.robolectric.internal.Implementation;
6 import com.xtremelabs.robolectric.internal.Implements;
7 import com.xtremelabs.robolectric.internal.RealObject;
8 
9 /**
10  * Shadows the {@code android.app.KeyguardManager} class.
11  */
12 @Implements(KeyguardManager.class)
13 public 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
inKeyguardRestrictedInputMode()21     public boolean inKeyguardRestrictedInputMode() {
22         return inRestrictedInputMode;
23     }
24 
25     @Implementation
newKeyguardLock(String tag)26     public KeyguardManager.KeyguardLock newKeyguardLock(String tag) {
27         return keyguardLock;
28     }
29 
setinRestrictedInputMode(boolean restricted)30     public void setinRestrictedInputMode(boolean restricted) {
31         inRestrictedInputMode = restricted;
32     }
33 }
34