Merge "TIF: Fix release logic for hardware wrapper input" into lmp-dev
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java
index 3378171..0b39598 100644
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -1809,7 +1809,7 @@
// If there are any other sessions based on this session, they should be released.
UserState userState = getUserStateLocked(mUserId);
for (SessionState sessionState : userState.sessionStateMap.values()) {
- if (mSession != null && mSession == sessionState.mHardwareSessionToken) {
+ if (mSessionToken == sessionState.mHardwareSessionToken) {
try {
sessionState.mSession.release();
} catch (RemoteException e) {