summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wonsik Kim <wonsik@google.com> 2014-08-05 07:31:02 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2014-08-04 23:56:40 +0000
commita08c1f6af49a7c553344ad3a3958dd1f7e2bad91 (patch)
treede174affb903c655a3dbc28464c612c6cfa169f7
parent363c4efa51d76eedaf7c8dd4c76c1fc6f303224e (diff)
parentb82de3600f15edbff693d1362bf33140c2aabd33 (diff)
Merge "TIF: fix JTvInputHal::removeStream issue" into lmp-dev
-rw-r--r--services/core/jni/com_android_server_tv_TvInputHal.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/services/core/jni/com_android_server_tv_TvInputHal.cpp b/services/core/jni/com_android_server_tv_TvInputHal.cpp
index 5eb627b0fb6b..d5abe0c25dae 100644
--- a/services/core/jni/com_android_server_tv_TvInputHal.cpp
+++ b/services/core/jni/com_android_server_tv_TvInputHal.cpp
@@ -400,18 +400,15 @@ int JTvInputHal::removeStream(int deviceId, int streamId) {
connection.mSurface->setSidebandStream(NULL);
connection.mSurface.clear();
}
+ if (connection.mThread != NULL) {
+ connection.mThread->shutdown();
+ connection.mThread.clear();
+ }
+ if (mDevice->close_stream(mDevice, deviceId, streamId) != 0) {
+ ALOGE("Couldn't remove stream");
+ return BAD_VALUE;
+ }
if (connection.mSourceHandle != NULL) {
- // Need to reset streams
- if (mDevice->close_stream(mDevice, deviceId, streamId) != 0) {
- ALOGE("Couldn't remove stream");
- return BAD_VALUE;
- }
-
- // Clear everything
- if (connection.mThread != NULL) {
- connection.mThread->shutdown();
- connection.mThread.clear();
- }
connection.mSourceHandle.clear();
}
return NO_ERROR;