Merge "Remove tests for impossible conditions" into main
diff --git a/core/tests/coretests/src/com/android/internal/jank/InteractionJankMonitorTest.java b/core/tests/coretests/src/com/android/internal/jank/InteractionJankMonitorTest.java
index e0823b8..d6b2a78 100644
--- a/core/tests/coretests/src/com/android/internal/jank/InteractionJankMonitorTest.java
+++ b/core/tests/coretests/src/com/android/internal/jank/InteractionJankMonitorTest.java
@@ -24,7 +24,6 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
-import static org.junit.Assert.assertThrows;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyLong;
@@ -190,25 +189,6 @@
         assertThat(generateSessionName(cujName, tooLongTag)).isEqualTo(expectedTrimmedName);
     }
 
-    @Test
-    public void validateConfiguration_surfaceOnlyAndNotDeferMonitor_throwsError() {
-        Configuration.Builder builder = Configuration.Builder.withSurface(1,
-                mActivity.getApplicationContext(), mSurfaceControl,
-                mActivity.getMainThreadHandler()).setDeferMonitorForAnimationStart(false);
-
-        assertThrows(IllegalStateException.class, builder::build);
-    }
-
-    @Test
-    public void validateConfiguration_surfaceOnlyAndDeferMonitor_doesNotThrowError() {
-        Configuration.Builder builder = Configuration.Builder.withSurface(1,
-                mActivity.getApplicationContext(),
-                mSurfaceControl, mActivity.getMainThreadHandler()).setDeferMonitorForAnimationStart(
-                true);
-
-        builder.build(); // no exception.
-    }
-
     private InteractionJankMonitor createMockedInteractionJankMonitor() {
         InteractionJankMonitor monitor = spy(new InteractionJankMonitor(mWorker));
         doReturn(true).when(monitor).shouldMonitor();