diff options
| author | 2023-08-22 15:45:17 -0700 | |
|---|---|---|
| committer | 2024-03-14 21:11:50 -0700 | |
| commit | a954ea0b562a3513b9f2ee93a36a41e834604a9b (patch) | |
| tree | 129ebd063245b0a31eca68d35f50ffcf01d48016 | |
| parent | a451bb09ab72852bbaeb9cb7174a314c8284764c (diff) | |
Fix kotlin nullable errors in Input tests
Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.
Bug: 294110802
Test: builds
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f3413858f14bf7398453603a8df50a8a9169f6a4)
Merged-In: I35530e7ed63a647c39018ef0ee850ceea4dbc0ba
Change-Id: I35530e7ed63a647c39018ef0ee850ceea4dbc0ba
| -rw-r--r-- | tests/Input/src/com/android/test/input/UnresponsiveGestureMonitorActivity.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/Input/src/com/android/test/input/UnresponsiveGestureMonitorActivity.kt b/tests/Input/src/com/android/test/input/UnresponsiveGestureMonitorActivity.kt index 3a24406e2b73..f37f2d3ef8ad 100644 --- a/tests/Input/src/com/android/test/input/UnresponsiveGestureMonitorActivity.kt +++ b/tests/Input/src/com/android/test/input/UnresponsiveGestureMonitorActivity.kt @@ -45,7 +45,7 @@ class UnresponsiveGestureMonitorActivity : Activity() { private lateinit var mInputMonitor: InputMonitor override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - val inputManager = getSystemService(InputManager::class.java) + val inputManager = checkNotNull(getSystemService(InputManager::class.java)) mInputMonitor = inputManager.monitorGestureInput(MONITOR_NAME, displayId) mInputEventReceiver = UnresponsiveReceiver( mInputMonitor.getInputChannel(), Looper.myLooper()) |