diff options
author | Jae Seo <jaeseo@google.com> | 2015-04-20 15:37:50 -0700 |
---|---|---|
committer | Jae Seo <jaeseo@google.com> | 2015-04-21 09:11:29 -0700 |
commit | 82fce64530d19a4da1c02d424fb2515feafe6a70 (patch) | |
tree | 00363e6e5f40c6bbfaaa931ac5b4ef1bed0a3804 /services | |
parent | d00d70a6ce9174bf48207b3d90573bcf7862273e (diff) | |
download | frameworks_base-82fce64530d19a4da1c02d424fb2515feafe6a70.zip frameworks_base-82fce64530d19a4da1c02d424fb2515feafe6a70.tar.gz frameworks_base-82fce64530d19a4da1c02d424fb2515feafe6a70.tar.bz2 |
TIF: Fix incorrect uses of INPUT_STATE_XXX
Also changed TvInputManager.getTvInputState to return
INPUT_STATE_DISCONNECTED for removed inputs and fixed documentation.
Bug: 18563677, Bug: 20435950
Change-Id: Idb81cee852b797eb3f5113d68468905f327928e7
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/tv/TvInputManagerService.java | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java index 3262cc6..5972247 100644 --- a/services/core/java/com/android/server/tv/TvInputManagerService.java +++ b/services/core/java/com/android/server/tv/TvInputManagerService.java @@ -18,8 +18,6 @@ package com.android.server.tv; import static android.media.tv.TvInputManager.INPUT_STATE_CONNECTED; import static android.media.tv.TvInputManager.INPUT_STATE_CONNECTED_STANDBY; -import static android.media.tv.TvInputManager.INPUT_STATE_DISCONNECTED; -import static android.media.tv.TvInputManager.INPUT_STATE_UNKNOWN; import android.app.ActivityManager; import android.content.BroadcastReceiver; @@ -800,7 +798,7 @@ public final class TvInputManagerService extends SystemService { synchronized (mLock) { UserState userState = getUserStateLocked(resolvedUserId); TvInputState state = userState.inputMap.get(inputId); - return state == null ? INPUT_STATE_UNKNOWN : state.state; + return state == null ? INPUT_STATE_CONNECTED : state.state; } } finally { Binder.restoreCallingIdentity(identity); @@ -1908,7 +1906,7 @@ public final class TvInputManagerService extends SystemService { for (TvInputState inputState : userState.inputMap.values()) { if (inputState.info.getComponent().equals(component) - && inputState.state != INPUT_STATE_DISCONNECTED) { + && inputState.state != INPUT_STATE_CONNECTED) { notifyInputStateChangedLocked(userState, inputState.info.getId(), inputState.state, null); } @@ -1957,13 +1955,6 @@ public final class TvInputManagerService extends SystemService { serviceState.callback = null; abortPendingCreateSessionRequestsLocked(serviceState, null, mUserId); - - for (TvInputState inputState : userState.inputMap.values()) { - if (inputState.info.getComponent().equals(component)) { - notifyInputStateChangedLocked(userState, inputState.info.getId(), - INPUT_STATE_DISCONNECTED, null); - } - } } } } @@ -2508,9 +2499,6 @@ public final class TvInputManagerService extends SystemService { } private static class SessionNotFoundException extends IllegalArgumentException { - public SessionNotFoundException() { - } - public SessionNotFoundException(String name) { super(name); } |