summaryrefslogtreecommitdiffstats
path: root/media/libmedia/IEffect.cpp
diff options
context:
space:
mode:
authorJohn Grossman <johngro@google.com>2012-01-11 12:23:42 -0800
committerJohn Grossman <johngro@google.com>2012-02-16 13:45:11 -0800
commitaf7d8189f91c45ab919a6c9ac386b268c8d91168 (patch)
tree92619572cd0a03705a5b564ef5749fdd8066d86f /media/libmedia/IEffect.cpp
parent4ff14bae91075eb274eb1c2975982358946e7e63 (diff)
downloadframeworks_av-af7d8189f91c45ab919a6c9ac386b268c8d91168.zip
frameworks_av-af7d8189f91c45ab919a6c9ac386b268c8d91168.tar.gz
frameworks_av-af7d8189f91c45ab919a6c9ac386b268c8d91168.tar.bz2
Enhance Visualizer behavior in the case of mediaserver death.
Bring the Visualizer class into line with the SDK documentation by returning ERROR_DEAD_OBJECT instead of ERROR_INVALID_OPERATION when the Visualizer loses its binder connection to the mediaserver because of a mediaserver restart. Also add a new callback interface to allow clients to be asynchronously notified in the case of server death. Right now, the interface definition and the registration method are flagged as hidden pending API council review/approval. See http://b/issue?id=5717519 for details. Change-Id: Ic15856f27ed5a950a583ac11ca81f79bd7e9b1a0 Signed-off-by: John Grossman <johngro@google.com>
Diffstat (limited to 'media/libmedia/IEffect.cpp')
-rw-r--r--media/libmedia/IEffect.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/media/libmedia/IEffect.cpp b/media/libmedia/IEffect.cpp
index d469e28..5d40cc8 100644
--- a/media/libmedia/IEffect.cpp
+++ b/media/libmedia/IEffect.cpp
@@ -83,8 +83,15 @@ public:
size = *pReplySize;
}
data.writeInt32(size);
- remote()->transact(COMMAND, data, &reply);
- status_t status = reply.readInt32();
+
+ status_t status = remote()->transact(COMMAND, data, &reply);
+ if (status != NO_ERROR) {
+ if (pReplySize != NULL)
+ *pReplySize = 0;
+ return status;
+ }
+
+ status = reply.readInt32();
size = reply.readInt32();
if (size != 0 && pReplyData != NULL && pReplySize != NULL) {
reply.read(pReplyData, size);