summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/FlickerTests/IME/src/com/android/server/wm/flicker/ime/ShowImeWhileEnteringOverviewTest.kt18
-rw-r--r--tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt4
-rw-r--r--tests/Input/src/android/hardware/input/KeyGestureEventListenerTest.kt (renamed from tests/Input/src/android/hardware/input/KeyboardSystemShortcutListenerTest.kt)94
-rw-r--r--tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt (renamed from tests/Input/src/com/android/server/input/KeyboardShortcutCallbackHandlerTests.kt)54
-rw-r--r--tests/Internal/AndroidTest.xml8
-rw-r--r--tests/Internal/src/com/android/internal/protolog/LegacyProtoLogImplTest.java7
-rw-r--r--tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java14
-rw-r--r--tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceControlViewHostSyncTest.java1
-rw-r--r--tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceControlViewHostTest.java1
-rw-r--r--tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceInputTestActivity.java1
10 files changed, 112 insertions, 90 deletions
diff --git a/tests/FlickerTests/IME/src/com/android/server/wm/flicker/ime/ShowImeWhileEnteringOverviewTest.kt b/tests/FlickerTests/IME/src/com/android/server/wm/flicker/ime/ShowImeWhileEnteringOverviewTest.kt
index 638d594b0a48..eb63e4985a9f 100644
--- a/tests/FlickerTests/IME/src/com/android/server/wm/flicker/ime/ShowImeWhileEnteringOverviewTest.kt
+++ b/tests/FlickerTests/IME/src/com/android/server/wm/flicker/ime/ShowImeWhileEnteringOverviewTest.kt
@@ -28,6 +28,7 @@ import com.android.server.wm.flicker.BaseTest
import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper
import com.android.server.wm.flicker.navBarLayerIsVisibleAtStartAndEnd
import com.android.server.wm.flicker.statusBarLayerIsVisibleAtStartAndEnd
+import com.android.server.wm.flicker.taskBarLayerIsVisibleAtStartAndEnd
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.Ignore
@@ -114,28 +115,28 @@ class ShowImeWhileEnteringOverviewTest(flicker: LegacyFlickerTest) : BaseTest(fl
/**
* In the legacy transitions, the nav bar is not marked as invisible. In the new transitions
- * this is fixed and the nav bar shows as invisible
+ * this is fixed and the status bar shows as invisible
*/
@Presubmit
@Test
fun statusBarLayerIsInvisibleInLandscapePhone() {
Assume.assumeTrue(flicker.scenario.isLandscapeOrSeascapeAtStart)
Assume.assumeTrue(flicker.scenario.isGesturalNavigation)
- Assume.assumeFalse(usesTaskbar)
+ Assume.assumeFalse(flicker.scenario.isTablet)
flicker.assertLayersStart { this.isVisible(ComponentNameMatcher.STATUS_BAR) }
flicker.assertLayersEnd { this.isInvisible(ComponentNameMatcher.STATUS_BAR) }
}
/**
* In the legacy transitions, the nav bar is not marked as invisible. In the new transitions
- * this is fixed and the nav bar shows as invisible
+ * this is fixed and the status bar shows as invisible
*/
@Presubmit
@Test
fun statusBarLayerIsInvisibleInLandscapeTablet() {
Assume.assumeTrue(flicker.scenario.isLandscapeOrSeascapeAtStart)
Assume.assumeTrue(flicker.scenario.isGesturalNavigation)
- Assume.assumeTrue(usesTaskbar)
+ Assume.assumeTrue(flicker.scenario.isTablet)
flicker.statusBarLayerIsVisibleAtStartAndEnd()
}
@@ -149,6 +150,10 @@ class ShowImeWhileEnteringOverviewTest(flicker: LegacyFlickerTest) : BaseTest(fl
@Ignore("Visibility changes depending on orientation and navigation mode")
override fun navBarLayerPositionAtStartAndEnd() {}
+ @Test
+ @Ignore("Visibility changes depending on orientation and navigation mode")
+ override fun taskBarLayerIsVisibleAtStartAndEnd() {}
+
/** {@inheritDoc} */
@Test
@Ignore("Visibility changes depending on orientation and navigation mode")
@@ -161,7 +166,10 @@ class ShowImeWhileEnteringOverviewTest(flicker: LegacyFlickerTest) : BaseTest(fl
@Presubmit
@Test
- override fun taskBarLayerIsVisibleAtStartAndEnd() = super.taskBarLayerIsVisibleAtStartAndEnd()
+ fun taskBarLayerIsVisibleAtStartAndEndForTablets() {
+ Assume.assumeTrue(flicker.scenario.isTablet)
+ flicker.taskBarLayerIsVisibleAtStartAndEnd()
+ }
@Presubmit
@Test
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt
index 70d762e02af5..851ce022bd81 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt
@@ -137,8 +137,6 @@ constructor(
/**
* Checks that the [ComponentNameMatcher.TASK_BAR] window is visible at the start and end of the
* transition
- *
- * Note: Large screen only
*/
@Presubmit
@Test
@@ -149,8 +147,6 @@ constructor(
/**
* Checks that the [ComponentNameMatcher.TASK_BAR] window is visible during the whole transition
- *
- * Note: Large screen only
*/
@Presubmit
@Test
diff --git a/tests/Input/src/android/hardware/input/KeyboardSystemShortcutListenerTest.kt b/tests/Input/src/android/hardware/input/KeyGestureEventListenerTest.kt
index 24d7291bec87..14aac6637d4f 100644
--- a/tests/Input/src/android/hardware/input/KeyboardSystemShortcutListenerTest.kt
+++ b/tests/Input/src/android/hardware/input/KeyGestureEventListenerTest.kt
@@ -42,21 +42,22 @@ import kotlin.test.assertNull
import kotlin.test.fail
/**
- * Tests for [InputManager.KeyboardSystemShortcutListener].
+ * Tests for [InputManager.KeyGestureEventListener].
*
* Build/Install/Run:
- * atest InputTests:KeyboardSystemShortcutListenerTest
+ * atest InputTests:KeyGestureEventListenerTest
*/
@Presubmit
@RunWith(MockitoJUnitRunner::class)
-class KeyboardSystemShortcutListenerTest {
+class KeyGestureEventListenerTest {
companion object {
const val DEVICE_ID = 1
- val HOME_SHORTCUT = KeyboardSystemShortcut(
+ val HOME_GESTURE_EVENT = KeyGestureEvent(
+ DEVICE_ID,
intArrayOf(KeyEvent.KEYCODE_H),
KeyEvent.META_META_ON or KeyEvent.META_META_LEFT_ON,
- KeyboardSystemShortcut.SYSTEM_SHORTCUT_HOME
+ KeyGestureEvent.KEY_GESTURE_TYPE_HOME
)
}
@@ -65,7 +66,7 @@ class KeyboardSystemShortcutListenerTest {
private val testLooper = TestLooper()
private val executor = HandlerExecutor(Handler(testLooper.looper))
- private var registeredListener: IKeyboardSystemShortcutListener? = null
+ private var registeredListener: IKeyGestureEventListener? = null
private lateinit var context: Context
private lateinit var inputManager: InputManager
private lateinit var inputManagerGlobalSession: InputManagerGlobal.TestSession
@@ -81,28 +82,28 @@ class KeyboardSystemShortcutListenerTest {
`when`(context.getSystemService(Mockito.eq(Context.INPUT_SERVICE)))
.thenReturn(inputManager)
- // Handle keyboard system shortcut listener registration.
+ // Handle key gesture event listener registration.
doAnswer {
- val listener = it.getArgument(0) as IKeyboardSystemShortcutListener
+ val listener = it.getArgument(0) as IKeyGestureEventListener
if (registeredListener != null &&
registeredListener!!.asBinder() != listener.asBinder()) {
- // There can only be one registered keyboard system shortcut listener per process.
+ // There can only be one registered key gesture event listener per process.
fail("Trying to register a new listener when one already exists")
}
registeredListener = listener
null
- }.`when`(iInputManagerMock).registerKeyboardSystemShortcutListener(any())
+ }.`when`(iInputManagerMock).registerKeyGestureEventListener(any())
- // Handle keyboard system shortcut listener being unregistered.
+ // Handle key gesture event listener being unregistered.
doAnswer {
- val listener = it.getArgument(0) as IKeyboardSystemShortcutListener
+ val listener = it.getArgument(0) as IKeyGestureEventListener
if (registeredListener == null ||
registeredListener!!.asBinder() != listener.asBinder()) {
fail("Trying to unregister a listener that is not registered")
}
registeredListener = null
null
- }.`when`(iInputManagerMock).unregisterKeyboardSystemShortcutListener(any())
+ }.`when`(iInputManagerMock).unregisterKeyGestureEventListener(any())
}
@After
@@ -112,29 +113,28 @@ class KeyboardSystemShortcutListenerTest {
}
}
- private fun notifyKeyboardSystemShortcutTriggered(id: Int, shortcut: KeyboardSystemShortcut) {
- registeredListener!!.onKeyboardSystemShortcutTriggered(
- id,
- shortcut.keycodes,
- shortcut.modifierState,
- shortcut.systemShortcut
+ private fun notifyKeyGestureEvent(event: KeyGestureEvent) {
+ registeredListener!!.onKeyGestureEvent(
+ event.deviceId,
+ event.keycodes,
+ event.modifierState,
+ event.keyGestureType
)
}
@Test
- fun testListenerHasCorrectSystemShortcutNotified() {
+ fun testListenerHasCorrectGestureNotified() {
var callbackCount = 0
- // Add a keyboard system shortcut listener
- inputManager.registerKeyboardSystemShortcutListener(executor) {
- deviceId: Int, systemShortcut: KeyboardSystemShortcut ->
- assertEquals(DEVICE_ID, deviceId)
- assertEquals(HOME_SHORTCUT, systemShortcut)
+ // Add a key gesture event listener
+ inputManager.registerKeyGestureEventListener(executor) {
+ event: KeyGestureEvent ->
+ assertEquals(HOME_GESTURE_EVENT, event)
callbackCount++
}
- // Notifying keyboard system shortcut triggered will notify the listener.
- notifyKeyboardSystemShortcutTriggered(DEVICE_ID, HOME_SHORTCUT)
+ // Notifying key gesture event will notify the listener.
+ notifyKeyGestureEvent(HOME_GESTURE_EVENT)
testLooper.dispatchNext()
assertEquals(1, callbackCount)
}
@@ -142,34 +142,34 @@ class KeyboardSystemShortcutListenerTest {
@Test
fun testAddingListenersRegistersInternalCallbackListener() {
// Set up two callbacks.
- val callback1 = InputManager.KeyboardSystemShortcutListener {_, _ -> }
- val callback2 = InputManager.KeyboardSystemShortcutListener {_, _ -> }
+ val callback1 = InputManager.KeyGestureEventListener { _ -> }
+ val callback2 = InputManager.KeyGestureEventListener { _ -> }
assertNull(registeredListener)
// Adding the listener should register the callback with InputManagerService.
- inputManager.registerKeyboardSystemShortcutListener(executor, callback1)
+ inputManager.registerKeyGestureEventListener(executor, callback1)
assertNotNull(registeredListener)
// Adding another listener should not register new internal listener.
val currListener = registeredListener
- inputManager.registerKeyboardSystemShortcutListener(executor, callback2)
+ inputManager.registerKeyGestureEventListener(executor, callback2)
assertEquals(currListener, registeredListener)
}
@Test
fun testRemovingListenersUnregistersInternalCallbackListener() {
// Set up two callbacks.
- val callback1 = InputManager.KeyboardSystemShortcutListener {_, _ -> }
- val callback2 = InputManager.KeyboardSystemShortcutListener {_, _ -> }
+ val callback1 = InputManager.KeyGestureEventListener { _ -> }
+ val callback2 = InputManager.KeyGestureEventListener { _ -> }
- inputManager.registerKeyboardSystemShortcutListener(executor, callback1)
- inputManager.registerKeyboardSystemShortcutListener(executor, callback2)
+ inputManager.registerKeyGestureEventListener(executor, callback1)
+ inputManager.registerKeyGestureEventListener(executor, callback2)
// Only removing all listeners should remove the internal callback
- inputManager.unregisterKeyboardSystemShortcutListener(callback1)
+ inputManager.unregisterKeyGestureEventListener(callback1)
assertNotNull(registeredListener)
- inputManager.unregisterKeyboardSystemShortcutListener(callback2)
+ inputManager.unregisterKeyGestureEventListener(callback2)
assertNull(registeredListener)
}
@@ -178,23 +178,23 @@ class KeyboardSystemShortcutListenerTest {
// Set up two callbacks.
var callbackCount1 = 0
var callbackCount2 = 0
- val callback1 = InputManager.KeyboardSystemShortcutListener { _, _ -> callbackCount1++ }
- val callback2 = InputManager.KeyboardSystemShortcutListener { _, _ -> callbackCount2++ }
+ val callback1 = InputManager.KeyGestureEventListener { _ -> callbackCount1++ }
+ val callback2 = InputManager.KeyGestureEventListener { _ -> callbackCount2++ }
- // Add both keyboard system shortcut listeners
- inputManager.registerKeyboardSystemShortcutListener(executor, callback1)
- inputManager.registerKeyboardSystemShortcutListener(executor, callback2)
+ // Add both key gesture event listeners
+ inputManager.registerKeyGestureEventListener(executor, callback1)
+ inputManager.registerKeyGestureEventListener(executor, callback2)
- // Notifying keyboard system shortcut triggered, should notify both the callbacks.
- notifyKeyboardSystemShortcutTriggered(DEVICE_ID, HOME_SHORTCUT)
+ // Notifying key gesture event, should notify both the callbacks.
+ notifyKeyGestureEvent(HOME_GESTURE_EVENT)
testLooper.dispatchAll()
assertEquals(1, callbackCount1)
assertEquals(1, callbackCount2)
- inputManager.unregisterKeyboardSystemShortcutListener(callback2)
- // Notifying keyboard system shortcut triggered, should still trigger callback1 but not
+ inputManager.unregisterKeyGestureEventListener(callback2)
+ // Notifying key gesture event, should still trigger callback1 but not
// callback2.
- notifyKeyboardSystemShortcutTriggered(DEVICE_ID, HOME_SHORTCUT)
+ notifyKeyGestureEvent(HOME_GESTURE_EVENT)
testLooper.dispatchAll()
assertEquals(2, callbackCount1)
assertEquals(1, callbackCount2)
diff --git a/tests/Input/src/com/android/server/input/KeyboardShortcutCallbackHandlerTests.kt b/tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt
index 5a40a1c8201e..3f611e0ead53 100644
--- a/tests/Input/src/com/android/server/input/KeyboardShortcutCallbackHandlerTests.kt
+++ b/tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt
@@ -18,8 +18,8 @@ package com.android.server.input
import android.content.Context
import android.content.ContextWrapper
-import android.hardware.input.IKeyboardSystemShortcutListener
-import android.hardware.input.KeyboardSystemShortcut
+import android.hardware.input.IKeyGestureEventListener
+import android.hardware.input.KeyGestureEvent
import android.platform.test.annotations.Presubmit
import android.view.KeyEvent
import androidx.test.core.app.ApplicationProvider
@@ -32,65 +32,65 @@ import org.mockito.Mockito
import org.mockito.junit.MockitoJUnit
/**
- * Tests for {@link KeyboardShortcutCallbackHandler}.
+ * Tests for {@link KeyGestureController}.
*
* Build/Install/Run:
- * atest InputTests:KeyboardShortcutCallbackHandlerTests
+ * atest InputTests:KeyGestureControllerTests
*/
@Presubmit
-class KeyboardShortcutCallbackHandlerTests {
+class KeyGestureControllerTests {
companion object {
val DEVICE_ID = 1
- val HOME_SHORTCUT = KeyboardSystemShortcut(
+ val HOME_GESTURE_EVENT = KeyGestureEvent(
+ DEVICE_ID,
intArrayOf(KeyEvent.KEYCODE_H),
KeyEvent.META_META_ON or KeyEvent.META_META_LEFT_ON,
- KeyboardSystemShortcut.SYSTEM_SHORTCUT_HOME
+ KeyGestureEvent.KEY_GESTURE_TYPE_HOME
)
}
@get:Rule
val rule = MockitoJUnit.rule()!!
- private lateinit var keyboardShortcutCallbackHandler: KeyboardShortcutCallbackHandler
+ private lateinit var keyGestureController: KeyGestureController
private lateinit var context: Context
- private var lastShortcut: KeyboardSystemShortcut? = null
+ private var lastEvent: KeyGestureEvent? = null
@Before
fun setup() {
context = Mockito.spy(ContextWrapper(ApplicationProvider.getApplicationContext()))
- keyboardShortcutCallbackHandler = KeyboardShortcutCallbackHandler()
+ keyGestureController = KeyGestureController()
}
@Test
- fun testKeyboardSystemShortcutTriggered_registerUnregisterListener() {
- val listener = KeyboardSystemShortcutListener()
+ fun testKeyGestureEvent_registerUnregisterListener() {
+ val listener = KeyGestureEventListener()
- // Register keyboard system shortcut listener
- keyboardShortcutCallbackHandler.registerKeyboardSystemShortcutListener(listener, 0)
- keyboardShortcutCallbackHandler.onKeyboardSystemShortcutTriggered(DEVICE_ID, HOME_SHORTCUT)
+ // Register key gesture event listener
+ keyGestureController.registerKeyGestureEventListener(listener, 0)
+ keyGestureController.onKeyGestureEvent(HOME_GESTURE_EVENT)
assertEquals(
- "Listener should get callback on keyboard system shortcut triggered",
- HOME_SHORTCUT,
- lastShortcut!!
+ "Listener should get callback on key gesture event",
+ HOME_GESTURE_EVENT,
+ lastEvent!!
)
// Unregister listener
- lastShortcut = null
- keyboardShortcutCallbackHandler.unregisterKeyboardSystemShortcutListener(listener, 0)
- keyboardShortcutCallbackHandler.onKeyboardSystemShortcutTriggered(DEVICE_ID, HOME_SHORTCUT)
- assertNull("Listener should not get callback after being unregistered", lastShortcut)
+ lastEvent = null
+ keyGestureController.unregisterKeyGestureEventListener(listener, 0)
+ keyGestureController.onKeyGestureEvent(HOME_GESTURE_EVENT)
+ assertNull("Listener should not get callback after being unregistered", lastEvent)
}
- inner class KeyboardSystemShortcutListener : IKeyboardSystemShortcutListener.Stub() {
- override fun onKeyboardSystemShortcutTriggered(
+ inner class KeyGestureEventListener : IKeyGestureEventListener.Stub() {
+ override fun onKeyGestureEvent(
deviceId: Int,
keycodes: IntArray,
modifierState: Int,
- shortcut: Int
+ gestureType: Int
) {
- assertEquals(DEVICE_ID, deviceId)
- lastShortcut = KeyboardSystemShortcut(keycodes, modifierState, shortcut)
+ lastEvent = KeyGestureEvent(deviceId, keycodes, modifierState, gestureType)
}
}
} \ No newline at end of file
diff --git a/tests/Internal/AndroidTest.xml b/tests/Internal/AndroidTest.xml
index 7b67e9ebcced..2d6c650eb2dc 100644
--- a/tests/Internal/AndroidTest.xml
+++ b/tests/Internal/AndroidTest.xml
@@ -26,4 +26,12 @@
<option name="package" value="com.android.internal.tests" />
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
</test>
+
+ <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
+ <option name="pull-pattern-keys" value="perfetto_file_path"/>
+ <option name="directory-keys"
+ value="/data/user/0/com.android.internal.tests/files"/>
+ <option name="collect-on-run-ended-only" value="true"/>
+ <option name="clean-up" value="true"/>
+ </metrics_collector>
</configuration> \ No newline at end of file
diff --git a/tests/Internal/src/com/android/internal/protolog/LegacyProtoLogImplTest.java b/tests/Internal/src/com/android/internal/protolog/LegacyProtoLogImplTest.java
index 5a48327e7576..9657225588b7 100644
--- a/tests/Internal/src/com/android/internal/protolog/LegacyProtoLogImplTest.java
+++ b/tests/Internal/src/com/android/internal/protolog/LegacyProtoLogImplTest.java
@@ -214,6 +214,13 @@ public class LegacyProtoLogImplTest {
verify(mReader, never()).getViewerString(anyLong());
}
+ @Test
+ public void loadViewerConfigOnLogcatGroupRegistration() {
+ TestProtoLogGroup.TEST_GROUP.setLogToLogcat(true);
+ mProtoLog.registerGroups(TestProtoLogGroup.TEST_GROUP);
+ verify(mReader).loadViewerConfig(any(), any());
+ }
+
private static class ProtoLogData {
Long mMessageHash = null;
Long mElapsedTime = null;
diff --git a/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java b/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java
index 7d0c5966b5dc..4b745b289d33 100644
--- a/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java
+++ b/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java
@@ -29,7 +29,6 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static java.io.File.createTempFile;
-import static java.nio.file.Files.createTempDirectory;
import android.content.Context;
import android.os.SystemClock;
@@ -45,6 +44,7 @@ import android.tracing.perfetto.DataSource;
import android.util.proto.ProtoInputStream;
import androidx.test.filters.SmallTest;
+import androidx.test.platform.app.InstrumentationRegistry;
import com.android.internal.protolog.common.IProtoLogGroup;
import com.android.internal.protolog.common.LogDataType;
@@ -67,7 +67,6 @@ import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Random;
-import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicInteger;
/**
@@ -78,7 +77,8 @@ import java.util.concurrent.atomic.AtomicInteger;
@Presubmit
@RunWith(JUnit4.class)
public class PerfettoProtoLogImplTest {
- private final File mTracingDirectory = createTempDirectory("temp").toFile();
+ private final File mTracingDirectory = InstrumentationRegistry.getInstrumentation()
+ .getTargetContext().getFilesDir();
private final ResultWriter mWriter = new ResultWriter()
.forScenario(new ScenarioBuilder()
@@ -384,7 +384,7 @@ public class PerfettoProtoLogImplTest {
new Object[]{5});
verify(implSpy).passToLogcat(eq(TestProtoLogGroup.TEST_GROUP.getTag()), eq(
- LogLevel.INFO), eq("UNKNOWN MESSAGE#1234 (5)"));
+ LogLevel.INFO), eq("UNKNOWN MESSAGE args = (5)"));
verify(mReader).getViewerString(eq(1234L));
}
@@ -451,8 +451,8 @@ public class PerfettoProtoLogImplTest {
before = SystemClock.elapsedRealtimeNanos();
mProtoLog.log(
LogLevel.INFO, TestProtoLogGroup.TEST_GROUP,
- "My test message :: %s, %d, %o, %x, %f, %b",
- "test", 1, 2, 3, 0.4, true);
+ "My test message :: %s, %d, %x, %f, %b",
+ "test", 1, 3, 0.4, true);
after = SystemClock.elapsedRealtimeNanos();
} finally {
traceMonitor.stop(mWriter);
@@ -467,7 +467,7 @@ public class PerfettoProtoLogImplTest {
Truth.assertThat(protolog.messages.getFirst().getTimestamp().getElapsedNanos())
.isAtMost(after);
Truth.assertThat(protolog.messages.getFirst().getMessage())
- .isEqualTo("My test message :: test, 2, 4, 6, 0.400000, true");
+ .isEqualTo("My test message :: test, 2, 6, 0.400000, true");
}
@Test
diff --git a/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceControlViewHostSyncTest.java b/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceControlViewHostSyncTest.java
index 359eb35384c7..5012c235a2a5 100644
--- a/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceControlViewHostSyncTest.java
+++ b/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceControlViewHostSyncTest.java
@@ -84,6 +84,7 @@ public class SurfaceControlViewHostSyncTest extends Activity implements SurfaceH
content.addView(enableSyncButton,
new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.RIGHT | Gravity.BOTTOM));
+ content.setFitsSystemWindows(true);
setContentView(content);
mSv.setZOrderOnTop(false);
diff --git a/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceControlViewHostTest.java b/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceControlViewHostTest.java
index 73e01634709e..4119ea2c73c3 100644
--- a/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceControlViewHostTest.java
+++ b/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceControlViewHostTest.java
@@ -37,6 +37,7 @@ public class SurfaceControlViewHostTest extends Activity implements SurfaceHolde
protected void onCreate(Bundle savedInstanceState) {
FrameLayout content = new FrameLayout(this);
+ content.setFitsSystemWindows(true);
super.onCreate(savedInstanceState);
mView = new SurfaceView(this);
content.addView(mView, new FrameLayout.LayoutParams(
diff --git a/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceInputTestActivity.java b/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceInputTestActivity.java
index ac7dc9e2f31f..528706860b31 100644
--- a/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceInputTestActivity.java
+++ b/tests/SurfaceControlViewHostTest/src/com/android/test/viewembed/SurfaceInputTestActivity.java
@@ -88,6 +88,7 @@ public class SurfaceInputTestActivity extends Activity {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LinearLayout content = new LinearLayout(this);
+ content.setFitsSystemWindows(true);
mLocalSurfaceView = new SurfaceView(this);
content.addView(mLocalSurfaceView, new LinearLayout.LayoutParams(
500, 500, Gravity.CENTER_HORIZONTAL | Gravity.TOP));