commit | b06cb8870f0407f18bb1225065a93aba2a5de2bf | [log] [tgz] |
---|---|---|
author | Jae Seo <jaeseo@google.com> | Wed Apr 09 12:08:17 2014 -0700 |
committer | Jae Seo <jaeseo@google.com> | Wed Apr 09 12:10:58 2014 -0700 |
tree | 7baeeddbd5652404dcd8483143a4557833bd271a | |
parent | 8d637b819b23d0fcca87a39d26d0350e062852f4 [diff] |
Skip cleaning up TV service/session when the user state is not found Bug: 13930813 Change-Id: I64285edaca0bd06d6f6efaeb6b5c30c2ef762902
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java index 972b088..79c4a50 100644 --- a/services/core/java/com/android/server/tv/TvInputManagerService.java +++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -151,8 +151,11 @@ private void removeUser(int userId) { synchronized (mLock) { + UserState userState = mUserStates.get(userId); + if (userState == null) { + return; + } // Release created sessions. - UserState userState = getUserStateLocked(userId); for (SessionState state : userState.sessionStateMap.values()) { if (state.session != null) { try {