Loading packages/SystemUI/tests/src/com/android/systemui/qs/customize/TileQueryHelperTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,6 @@ public class TileQueryHelperTest extends SysuiTestCase { ).when(mQSTileHost).createTile(anyString()); FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); mMainExecutor = new FakeExecutor(clock); mBgExecutor = new FakeExecutor(clock); mTileQueryHelper = new TileQueryHelper(mContext, mMainExecutor, mBgExecutor); Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifListBuilderImplTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -690,7 +690,6 @@ public class NotifListBuilderImplTest extends SysuiTestCase { mListBuilder.addFilter(filter3); // GIVEN the SystemClock is set to a particular time: mSystemClock.setAutoIncrement(true); mSystemClock.setUptimeMillis(47); // WHEN the pipeline is kicked off on a list of notifs Loading packages/SystemUI/tests/src/com/android/systemui/util/concurrency/FakeExecutorTest.java +0 −6 Original line number Diff line number Diff line Loading @@ -49,7 +49,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testNoDelay() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); RunnableImpl runnable = new RunnableImpl(); Loading Loading @@ -99,7 +98,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testDelayed() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); RunnableImpl runnable = new RunnableImpl(); Loading Loading @@ -134,7 +132,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testDelayed_AdvanceAndRun() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); RunnableImpl runnable = new RunnableImpl(); Loading Loading @@ -181,7 +178,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testExecutionOrder() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); RunnableImpl runnableA = new RunnableImpl(); RunnableImpl runnableB = new RunnableImpl(); Loading Loading @@ -251,7 +247,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testRemoval_single() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); RunnableImpl runnable = new RunnableImpl(); Runnable removeFunction; Loading Loading @@ -291,7 +286,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testRemoval_multi() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); List<Runnable> removeFunctions = new ArrayList<>(); RunnableImpl runnable = new RunnableImpl(); Loading packages/SystemUI/tests/src/com/android/systemui/util/time/FakeSystemClock.java +0 −25 Original line number Diff line number Diff line Loading @@ -20,8 +20,6 @@ import java.util.ArrayList; import java.util.List; public class FakeSystemClock implements SystemClock { private boolean mAutoIncrement = true; private long mUptimeMillis; private long mElapsedRealtime; private long mElapsedRealtimeNanos; Loading @@ -34,54 +32,36 @@ public class FakeSystemClock implements SystemClock { @Override public long uptimeMillis() { long value = mUptimeMillis; if (mAutoIncrement) { setUptimeMillis(mUptimeMillis + 1); } return value; } @Override public long elapsedRealtime() { long value = mElapsedRealtime; if (mAutoIncrement) { setElapsedRealtime(mElapsedRealtime + 1); } return value; } @Override public long elapsedRealtimeNanos() { long value = mElapsedRealtimeNanos; if (mAutoIncrement) { setElapsedRealtimeNanos(mElapsedRealtimeNanos + 1); } return value; } @Override public long currentThreadTimeMillis() { long value = mCurrentThreadTimeMillis; if (mAutoIncrement) { setCurrentThreadTimeMillis(mCurrentThreadTimeMillis + 1); } return value; } @Override public long currentThreadTimeMicro() { long value = mCurrentThreadTimeMicro; if (mAutoIncrement) { setCurrentThreadTimeMicro(mCurrentThreadTimeMicro + 1); } return value; } @Override public long currentTimeMicro() { long value = mCurrentTimeMicro; if (mAutoIncrement) { setCurrentTimeMicro(mCurrentTimeMicro + 1); } return value; } Loading Loading @@ -127,11 +107,6 @@ public class FakeSystemClock implements SystemClock { } } /** If true, each call to get____ will be one higher than the previous call to that method. */ public void setAutoIncrement(boolean autoIncrement) { mAutoIncrement = autoIncrement; } public void addListener(ClockTickListener listener) { mListeners.add(listener); } Loading Loading
packages/SystemUI/tests/src/com/android/systemui/qs/customize/TileQueryHelperTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,6 @@ public class TileQueryHelperTest extends SysuiTestCase { ).when(mQSTileHost).createTile(anyString()); FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); mMainExecutor = new FakeExecutor(clock); mBgExecutor = new FakeExecutor(clock); mTileQueryHelper = new TileQueryHelper(mContext, mMainExecutor, mBgExecutor); Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifListBuilderImplTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -690,7 +690,6 @@ public class NotifListBuilderImplTest extends SysuiTestCase { mListBuilder.addFilter(filter3); // GIVEN the SystemClock is set to a particular time: mSystemClock.setAutoIncrement(true); mSystemClock.setUptimeMillis(47); // WHEN the pipeline is kicked off on a list of notifs Loading
packages/SystemUI/tests/src/com/android/systemui/util/concurrency/FakeExecutorTest.java +0 −6 Original line number Diff line number Diff line Loading @@ -49,7 +49,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testNoDelay() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); RunnableImpl runnable = new RunnableImpl(); Loading Loading @@ -99,7 +98,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testDelayed() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); RunnableImpl runnable = new RunnableImpl(); Loading Loading @@ -134,7 +132,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testDelayed_AdvanceAndRun() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); RunnableImpl runnable = new RunnableImpl(); Loading Loading @@ -181,7 +178,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testExecutionOrder() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); RunnableImpl runnableA = new RunnableImpl(); RunnableImpl runnableB = new RunnableImpl(); Loading Loading @@ -251,7 +247,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testRemoval_single() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); RunnableImpl runnable = new RunnableImpl(); Runnable removeFunction; Loading Loading @@ -291,7 +286,6 @@ public class FakeExecutorTest extends SysuiTestCase { @Test public void testRemoval_multi() { FakeSystemClock clock = new FakeSystemClock(); clock.setAutoIncrement(false); FakeExecutor fakeExecutor = new FakeExecutor(clock); List<Runnable> removeFunctions = new ArrayList<>(); RunnableImpl runnable = new RunnableImpl(); Loading
packages/SystemUI/tests/src/com/android/systemui/util/time/FakeSystemClock.java +0 −25 Original line number Diff line number Diff line Loading @@ -20,8 +20,6 @@ import java.util.ArrayList; import java.util.List; public class FakeSystemClock implements SystemClock { private boolean mAutoIncrement = true; private long mUptimeMillis; private long mElapsedRealtime; private long mElapsedRealtimeNanos; Loading @@ -34,54 +32,36 @@ public class FakeSystemClock implements SystemClock { @Override public long uptimeMillis() { long value = mUptimeMillis; if (mAutoIncrement) { setUptimeMillis(mUptimeMillis + 1); } return value; } @Override public long elapsedRealtime() { long value = mElapsedRealtime; if (mAutoIncrement) { setElapsedRealtime(mElapsedRealtime + 1); } return value; } @Override public long elapsedRealtimeNanos() { long value = mElapsedRealtimeNanos; if (mAutoIncrement) { setElapsedRealtimeNanos(mElapsedRealtimeNanos + 1); } return value; } @Override public long currentThreadTimeMillis() { long value = mCurrentThreadTimeMillis; if (mAutoIncrement) { setCurrentThreadTimeMillis(mCurrentThreadTimeMillis + 1); } return value; } @Override public long currentThreadTimeMicro() { long value = mCurrentThreadTimeMicro; if (mAutoIncrement) { setCurrentThreadTimeMicro(mCurrentThreadTimeMicro + 1); } return value; } @Override public long currentTimeMicro() { long value = mCurrentTimeMicro; if (mAutoIncrement) { setCurrentTimeMicro(mCurrentTimeMicro + 1); } return value; } Loading Loading @@ -127,11 +107,6 @@ public class FakeSystemClock implements SystemClock { } } /** If true, each call to get____ will be one higher than the previous call to that method. */ public void setAutoIncrement(boolean autoIncrement) { mAutoIncrement = autoIncrement; } public void addListener(ClockTickListener listener) { mListeners.add(listener); } Loading