Home | History | Annotate | Download | only in shadows
      1 package com.xtremelabs.robolectric.shadows;
      2 
      3 import android.app.KeyguardManager;
      4 import com.xtremelabs.robolectric.internal.Implementation;
      5 import com.xtremelabs.robolectric.internal.Implements;
      6 
      7 @Implements(KeyguardManager.KeyguardLock.class)
      8 public class ShadowKeyGuardLock {
      9     private boolean keyguardEnabled = true;
     10 
     11     @Implementation
     12     public void disableKeyguard() {
     13         keyguardEnabled = false;
     14     }
     15 
     16     @Implementation
     17     public void reenableKeyguard() {
     18         keyguardEnabled = true;
     19     }
     20 
     21     public boolean isEnabled() {
     22         return keyguardEnabled;
     23     }
     24 }
     25