Merge "Remove wake lock checks from TimeDetectorStrategy"
am: dc20cafcc1
Change-Id: Ib5cb91dcec59ecf65e980afb6788692e9293bd9b
This commit is contained in:
@@ -61,10 +61,10 @@ public interface TimeDetectorStrategy {
|
|||||||
/** Acquire a suitable wake lock. Must be followed by {@link #releaseWakeLock()} */
|
/** Acquire a suitable wake lock. Must be followed by {@link #releaseWakeLock()} */
|
||||||
void acquireWakeLock();
|
void acquireWakeLock();
|
||||||
|
|
||||||
/** Returns the elapsedRealtimeMillis clock value. The WakeLock must be held. */
|
/** Returns the elapsedRealtimeMillis clock value. */
|
||||||
long elapsedRealtimeMillis();
|
long elapsedRealtimeMillis();
|
||||||
|
|
||||||
/** Returns the system clock value. The WakeLock must be held. */
|
/** Returns the system clock value. */
|
||||||
long systemClockMillis();
|
long systemClockMillis();
|
||||||
|
|
||||||
/** Sets the device system clock. The WakeLock must be held. */
|
/** Sets the device system clock. The WakeLock must be held. */
|
||||||
|
|||||||
@@ -88,13 +88,11 @@ public final class TimeDetectorStrategyCallbackImpl implements TimeDetectorStrat
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long elapsedRealtimeMillis() {
|
public long elapsedRealtimeMillis() {
|
||||||
checkWakeLockHeld();
|
|
||||||
return SystemClock.elapsedRealtime();
|
return SystemClock.elapsedRealtime();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long systemClockMillis() {
|
public long systemClockMillis() {
|
||||||
checkWakeLockHeld();
|
|
||||||
return System.currentTimeMillis();
|
return System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -651,7 +651,6 @@ public class TimeDetectorStrategyImplTest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long systemClockMillis() {
|
public long systemClockMillis() {
|
||||||
assertWakeLockAcquired();
|
|
||||||
return mSystemClockMillis;
|
return mSystemClockMillis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user