diff options
| author | 2024-08-28 16:59:46 +0900 | |
|---|---|---|
| committer | 2024-08-29 10:55:28 +0900 | |
| commit | f3a937151782534bd925dd7fa1f80c468197a1b7 (patch) | |
| tree | 776b95748f626ca894376fd7c9e20749f0e6d344 | |
| parent | 61468e660c36c5e1c994df993d3b4437db564c49 (diff) | |
Fix condition to register TabletModeChangeListeners
Should be empty check instead of null check. The bug was
introduced when it's moved over from InputManager
ag/21849880
Bug: 357504418
Test: m && presubmit
Flag: EXEMPT bugfix
Change-Id: Id900ab21d6ddb21d0251de418c76b2e81d2989c0
| -rw-r--r-- | core/java/android/hardware/input/InputManagerGlobal.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/hardware/input/InputManagerGlobal.java b/core/java/android/hardware/input/InputManagerGlobal.java index 03cf7c5f926c..2a362381a003 100644 --- a/core/java/android/hardware/input/InputManagerGlobal.java +++ b/core/java/android/hardware/input/InputManagerGlobal.java @@ -567,7 +567,7 @@ public final class InputManagerGlobal { Objects.requireNonNull(listener, "listener must not be null"); synchronized (mOnTabletModeChangedListeners) { - if (mOnTabletModeChangedListeners == null) { + if (mOnTabletModeChangedListeners.isEmpty()) { initializeTabletModeListenerLocked(); } int idx = findOnTabletModeChangedListenerLocked(listener); |