SettingsRoboTests: fix device state rotation related tests

Fixes: 280015539
Test: atest SettingsRoboTests
Change-Id: I0a3cc713f8df0477a172665a60551b456691b17c
This commit is contained in:
Christian Göllner
2023-04-28 15:22:43 +02:00
parent 2b44fc26d1
commit b613cc4a17
3 changed files with 42 additions and 9 deletions

View File

@@ -27,6 +27,7 @@ import org.robolectric.annotation.Implements;
public class ShadowDeviceStateRotationLockSettingsManager {
private static boolean sDeviceStateRotationLockEnabled;
private boolean mIsRotationLockedForAllStates;
@Implementation
public static boolean isDeviceStateRotationLockEnabled(Context context) {
@@ -36,4 +37,13 @@ public class ShadowDeviceStateRotationLockSettingsManager {
public static void setDeviceStateRotationLockEnabled(boolean enabled) {
sDeviceStateRotationLockEnabled = enabled;
}
@Implementation
public boolean isRotationLockedForAllStates() {
return mIsRotationLockedForAllStates;
}
public void setRotationLockedForAllStates(boolean value) {
mIsRotationLockedForAllStates = value;
}
}