Class ShadowPowerManager.ShadowWakeLock

  • Enclosing class:
    ShadowPowerManager

    @Implements(android.os.PowerManager.WakeLock.class)
    public static class ShadowPowerManager.ShadowWakeLock
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ShadowWakeLock()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void acquire()  
      protected void acquire​(long timeout)  
      java.lang.String getTag()
      Returns the tag.
      int getTimesHeld()
      Returns how many times the wakelock was held.
      android.os.WorkSource getWorkSource()  
      protected boolean isHeld()  
      boolean isReferenceCounted()
      Retrieves if the wake lock is reference counted or not
      protected void release()  
      protected void setReferenceCounted​(boolean value)  
      protected void setWorkSource​(android.os.WorkSource ws)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShadowWakeLock

        public ShadowWakeLock()
    • Method Detail

      • acquire

        @Implementation
        protected void acquire()
      • acquire

        @Implementation
        protected void acquire​(long timeout)
      • release

        @Implementation
        protected void release()
      • isHeld

        @Implementation
        protected boolean isHeld()
      • isReferenceCounted

        public boolean isReferenceCounted()
        Retrieves if the wake lock is reference counted or not
        Returns:
        Is the wake lock reference counted?
      • setReferenceCounted

        @Implementation
        protected void setReferenceCounted​(boolean value)
      • setWorkSource

        @Implementation
        protected void setWorkSource​(android.os.WorkSource ws)
      • getWorkSource

        public android.os.WorkSource getWorkSource()
      • getTimesHeld

        public int getTimesHeld()
        Returns how many times the wakelock was held.
      • getTag

        @HiddenApi
        @Implementation(minSdk=26)
        public java.lang.String getTag()
        Returns the tag.