Merge "Fix volume CSD tests not cleanring up" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4939d78cdf
@@ -2343,6 +2343,13 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void clearInternalHandleAfterTest() {
|
||||
if (mHandler != null) {
|
||||
mHandler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
}
|
||||
|
||||
private final class CustomDialog extends Dialog implements DialogInterface {
|
||||
public CustomDialog(Context context) {
|
||||
super(context, R.style.volume_dialog_theme);
|
||||
|
||||
@@ -58,6 +58,7 @@ import com.android.systemui.util.DeviceConfigProxyFake;
|
||||
import com.android.systemui.util.concurrency.FakeExecutor;
|
||||
import com.android.systemui.util.time.FakeSystemClock;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -370,6 +371,13 @@ public class VolumeDialogImplTest extends SysuiTestCase {
|
||||
verify(mCsdWarningDialog).show();
|
||||
}
|
||||
|
||||
@After
|
||||
public void teardown() {
|
||||
if (mDialog != null) {
|
||||
mDialog.clearInternalHandleAfterTest();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Test
|
||||
public void testContentDescriptions() {
|
||||
|
||||
Reference in New Issue
Block a user