Add mic mute keyboard led. (1/2)
Change-Id: Ie3ddd04853bb3471bb60cefd037d5244733046c4
Test: Built, presubmit
diff --git a/tests/Input/Android.bp b/tests/Input/Android.bp
index d17cd1f..a85d809 100644
--- a/tests/Input/Android.bp
+++ b/tests/Input/Android.bp
@@ -30,7 +30,7 @@
"androidx.test.rules",
"androidx.test.runner",
"androidx.test.uiautomator_uiautomator",
- "servicestests-utils",
+ "compatibility-device-util-axt",
"flag-junit",
"frameworks-base-testutils",
"hamcrest-library",
@@ -38,6 +38,7 @@
"mockito-target-minus-junit4",
"platform-test-annotations",
"services.core.unboosted",
+ "servicestests-utils",
"testables",
"testng",
"truth",
diff --git a/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt b/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt
index f6f766a..2c53f8c 100644
--- a/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt
+++ b/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt
@@ -33,6 +33,7 @@
import androidx.test.platform.app.InstrumentationRegistry
import com.android.internal.util.test.FakeSettingsProvider
import com.google.common.truth.Truth.assertThat
+import com.android.compatibility.common.util.SystemUtil.runWithShellPermissionIdentity
import org.junit.After
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
@@ -141,7 +142,9 @@
fun testInputSettingsUpdatedOnSystemRunning() {
verifyZeroInteractions(native)
- service.systemRunning()
+ runWithShellPermissionIdentity {
+ service.systemRunning()
+ }
verify(native).setPointerSpeed(anyInt())
verify(native).setTouchpadPointerSpeed(anyInt())