diff options
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/util/wakelock/WakeLockTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/wakelock/WakeLockTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/wakelock/WakeLockTest.java index 3357be8c8b84..fe01f841aa16 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/util/wakelock/WakeLockTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/util/wakelock/WakeLockTest.java @@ -19,6 +19,7 @@ package com.android.systemui.util.wakelock; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import android.os.Build; import android.os.PowerManager; import androidx.test.filters.SmallTest; @@ -85,4 +86,14 @@ public class WakeLockTest extends SysuiTestCase { assertTrue(ran[0]); assertFalse(mInner.isHeld()); } + + @Test + public void prodBuild_wakeLock_releaseWithoutAcquire_noThrow() { + if (Build.IS_ENG) { + return; + } + + // shouldn't throw an exception on production builds + mWakeLock.release(WHY); + } }
\ No newline at end of file |