Add a test for shouldDeviceBePutToSleep when performing the first state transition

Bug: 265088477
Test: atest LogicalDisplayMapperTest
Change-Id: I5bb4df5f2e2197be087ebab373a1a476af15a7e0
This commit is contained in:
Piotr Wilczyński
2023-01-24 16:16:39 +00:00
parent 6a1f582c6f
commit b94172c8bc

View File

@@ -16,6 +16,7 @@
package com.android.server.display;
import static android.hardware.devicestate.DeviceStateManager.INVALID_DEVICE_STATE;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.DEFAULT_DISPLAY_GROUP;
import static android.view.Display.TYPE_EXTERNAL;
@@ -441,6 +442,11 @@ public class LogicalDisplayMapperTest {
/* isOverrideActive= */false,
/* isInteractive= */true,
/* isBootCompleted= */true));
assertFalse(mLogicalDisplayMapper.shouldDeviceBePutToSleep(DEVICE_STATE_CLOSED,
INVALID_DEVICE_STATE,
/* isOverrideActive= */false,
/* isInteractive= */true,
/* isBootCompleted= */true));
}
@Test