Loading services/core/java/com/android/server/devicestate/DeviceState.java→core/java/android/hardware/devicestate/DeviceState.java +3 −4 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.server.devicestate; package android.hardware.devicestate; import static android.hardware.devicestate.DeviceStateManager.MAXIMUM_DEVICE_STATE; import static android.hardware.devicestate.DeviceStateManager.MINIMUM_DEVICE_STATE; Loading @@ -22,7 +22,6 @@ import static android.hardware.devicestate.DeviceStateManager.MINIMUM_DEVICE_STA import android.annotation.IntDef; import android.annotation.IntRange; import android.annotation.NonNull; import android.hardware.devicestate.DeviceStateManager; import com.android.internal.util.Preconditions; Loading @@ -38,9 +37,9 @@ import java.util.Objects; * state of the system. This is useful for variable-state devices, like foldable or rollable * devices, that can be configured by users into differing hardware states, which each may have a * different expected use case. * @hide * * @see DeviceStateProvider * @see DeviceStateManagerService * @see DeviceStateManager */ public final class DeviceState { /** Loading core/tests/devicestatetests/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ android_test { "androidx.test.rules", "frameworks-base-testutils", "mockito-target-minus-junit4", "platform-test-annotations", "testng", ], libs: ["android.test.runner"], platform_apis: true, Loading services/tests/servicestests/src/com/android/server/devicestate/DeviceStateTest.java→core/tests/devicestatetests/src/android/hardware/devicestate/DeviceStateTest.java +4 −5 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.server.devicestate; package android.hardware.devicestate; import static android.hardware.devicestate.DeviceStateManager.MAXIMUM_DEVICE_STATE; import static android.hardware.devicestate.DeviceStateManager.MINIMUM_DEVICE_STATE; Loading @@ -25,18 +25,17 @@ import static org.testng.Assert.assertThrows; import android.platform.test.annotations.Presubmit; import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** * Unit tests for {@link DeviceState}. * Unit tests for {@link android.hardware.devicestate.DeviceState}. * <p/> * Run with <code>atest DeviceStateTest</code>. */ @Presubmit @RunWith(AndroidJUnit4.class) @RunWith(JUnit4.class) public final class DeviceStateTest { @Test public void testConstruct() { Loading services/core/java/com/android/server/devicestate/DeviceStateManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -19,11 +19,11 @@ package com.android.server.devicestate; import static android.Manifest.permission.CONTROL_DEVICE_STATE; import static android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND; import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.hardware.devicestate.DeviceState.FLAG_CANCEL_OVERRIDE_REQUESTS; import static android.hardware.devicestate.DeviceStateManager.INVALID_DEVICE_STATE; import static android.hardware.devicestate.DeviceStateManager.MAXIMUM_DEVICE_STATE; import static android.hardware.devicestate.DeviceStateManager.MINIMUM_DEVICE_STATE; import static com.android.server.devicestate.DeviceState.FLAG_CANCEL_OVERRIDE_REQUESTS; import static com.android.server.devicestate.OverrideRequest.OVERRIDE_REQUEST_TYPE_BASE_STATE; import static com.android.server.devicestate.OverrideRequest.OVERRIDE_REQUEST_TYPE_EMULATED_STATE; import static com.android.server.devicestate.OverrideRequestController.FLAG_POWER_SAVE_ENABLED; Loading @@ -40,6 +40,7 @@ import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.app.IProcessObserver; import android.content.Context; import android.hardware.devicestate.DeviceState; import android.hardware.devicestate.DeviceStateInfo; import android.hardware.devicestate.DeviceStateManager; import android.hardware.devicestate.DeviceStateManagerInternal; Loading services/core/java/com/android/server/devicestate/DeviceStateManagerShellCommand.java +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.server.devicestate; import android.annotation.NonNull; import android.annotation.Nullable; import android.hardware.devicestate.DeviceState; import android.hardware.devicestate.DeviceStateManager; import android.hardware.devicestate.DeviceStateRequest; import android.os.Binder; Loading Loading
services/core/java/com/android/server/devicestate/DeviceState.java→core/java/android/hardware/devicestate/DeviceState.java +3 −4 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.server.devicestate; package android.hardware.devicestate; import static android.hardware.devicestate.DeviceStateManager.MAXIMUM_DEVICE_STATE; import static android.hardware.devicestate.DeviceStateManager.MINIMUM_DEVICE_STATE; Loading @@ -22,7 +22,6 @@ import static android.hardware.devicestate.DeviceStateManager.MINIMUM_DEVICE_STA import android.annotation.IntDef; import android.annotation.IntRange; import android.annotation.NonNull; import android.hardware.devicestate.DeviceStateManager; import com.android.internal.util.Preconditions; Loading @@ -38,9 +37,9 @@ import java.util.Objects; * state of the system. This is useful for variable-state devices, like foldable or rollable * devices, that can be configured by users into differing hardware states, which each may have a * different expected use case. * @hide * * @see DeviceStateProvider * @see DeviceStateManagerService * @see DeviceStateManager */ public final class DeviceState { /** Loading
core/tests/devicestatetests/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ android_test { "androidx.test.rules", "frameworks-base-testutils", "mockito-target-minus-junit4", "platform-test-annotations", "testng", ], libs: ["android.test.runner"], platform_apis: true, Loading
services/tests/servicestests/src/com/android/server/devicestate/DeviceStateTest.java→core/tests/devicestatetests/src/android/hardware/devicestate/DeviceStateTest.java +4 −5 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.server.devicestate; package android.hardware.devicestate; import static android.hardware.devicestate.DeviceStateManager.MAXIMUM_DEVICE_STATE; import static android.hardware.devicestate.DeviceStateManager.MINIMUM_DEVICE_STATE; Loading @@ -25,18 +25,17 @@ import static org.testng.Assert.assertThrows; import android.platform.test.annotations.Presubmit; import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** * Unit tests for {@link DeviceState}. * Unit tests for {@link android.hardware.devicestate.DeviceState}. * <p/> * Run with <code>atest DeviceStateTest</code>. */ @Presubmit @RunWith(AndroidJUnit4.class) @RunWith(JUnit4.class) public final class DeviceStateTest { @Test public void testConstruct() { Loading
services/core/java/com/android/server/devicestate/DeviceStateManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -19,11 +19,11 @@ package com.android.server.devicestate; import static android.Manifest.permission.CONTROL_DEVICE_STATE; import static android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND; import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.hardware.devicestate.DeviceState.FLAG_CANCEL_OVERRIDE_REQUESTS; import static android.hardware.devicestate.DeviceStateManager.INVALID_DEVICE_STATE; import static android.hardware.devicestate.DeviceStateManager.MAXIMUM_DEVICE_STATE; import static android.hardware.devicestate.DeviceStateManager.MINIMUM_DEVICE_STATE; import static com.android.server.devicestate.DeviceState.FLAG_CANCEL_OVERRIDE_REQUESTS; import static com.android.server.devicestate.OverrideRequest.OVERRIDE_REQUEST_TYPE_BASE_STATE; import static com.android.server.devicestate.OverrideRequest.OVERRIDE_REQUEST_TYPE_EMULATED_STATE; import static com.android.server.devicestate.OverrideRequestController.FLAG_POWER_SAVE_ENABLED; Loading @@ -40,6 +40,7 @@ import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.app.IProcessObserver; import android.content.Context; import android.hardware.devicestate.DeviceState; import android.hardware.devicestate.DeviceStateInfo; import android.hardware.devicestate.DeviceStateManager; import android.hardware.devicestate.DeviceStateManagerInternal; Loading
services/core/java/com/android/server/devicestate/DeviceStateManagerShellCommand.java +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.server.devicestate; import android.annotation.NonNull; import android.annotation.Nullable; import android.hardware.devicestate.DeviceState; import android.hardware.devicestate.DeviceStateManager; import android.hardware.devicestate.DeviceStateRequest; import android.os.Binder; Loading