commit | 7b3cae36800700c5d15466efe55c5cab8f382833 | [log] [tgz] |
---|---|---|
author | Jaewan Kim <jaewan@google.com> | Thu Jun 07 10:16:22 2018 +0900 |
committer | Jaewan Kim <jaewan@google.com> | Thu Jun 07 11:27:35 2018 +0900 |
tree | 7ff3d5745610ae151e595b33b8f6d84a5a58aee4 | |
parent | 39f04a7da4a3b7925827685f1c03dfa0e41ffcd4 [diff] [blame] |
MediaSessionService: Fix NPE Bug: 109766690 Test: Run CtsMediaTests Change-Id: Id94bc1a4c46a28f920b10e39c0ada7ad6a90fc01
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java index 6fff367..68b2a58 100644 --- a/services/core/java/com/android/server/media/MediaSessionService.java +++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -781,6 +781,9 @@ } private void dispatchVolumeKeyLongPressLocked(KeyEvent keyEvent) { + if (mCurrentFullUserRecord.mOnVolumeKeyLongPressListener == null) { + return; + } try { mCurrentFullUserRecord.mOnVolumeKeyLongPressListener.onVolumeKeyLongPress(keyEvent); } catch (RemoteException e) {