1 package com.android.tv.mdnsoffloadmanager.util; 2 3 import android.os.PowerManager; 4 5 /** 6 * Wrapper around {@link android.os.PowerManager.WakeLock} for testing purposes. 7 */ 8 public class WakeLockWrapper { 9 private final PowerManager.WakeLock mLock; 10 WakeLockWrapper(PowerManager.WakeLock lock)11 public WakeLockWrapper(PowerManager.WakeLock lock) { 12 this.mLock = lock; 13 } 14 15 /** 16 * @see PowerManager.WakeLock#acquire() 17 */ acquire(long timeout)18 public void acquire(long timeout) { 19 mLock.acquire(timeout); 20 } 21 22 /** 23 * @see PowerManager.WakeLock#release() 24 */ release()25 public void release() { 26 mLock.release(); 27 } 28 } 29