Add tests for TaskbarStashController.

Test: TaskbarStashControllerTest
Bug: 346394503
Flag: TEST_ONLY
Change-Id: I930e745826f2512d04434ad689a3e42cac7e9901
This commit is contained in:
Brian Isganitis committed 2024-09-24 18:51:46 -04:00
1 parent c2c7913134
commit 3231ba01e6
4 files changed
+734 -15

No files matched your search

+11
View File
@@ -20,6 +20,8 @@ import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import androidx.annotation.VisibleForTesting;
public class Alarm implements Runnable{
// if we reach this time and the alarm hasn't been cancelled, call the listener
private long mAlarmTriggerTime;
@@ -96,4 +98,13 @@ public class Alarm implements Runnable{
public long getLastSetTimeout() {
return mLastSetTimeout;
}
/** Simulates the alarm firing for tests. */
@VisibleForTesting
public void finishAlarm() {
if (!mAlarmPending) return;
mAlarmPending = false;
mHandler.removeCallbacks(this);
mAlarmListener.onAlarm(this);
}
}