Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
frameworks_av
Commits
014620f1
Commit
014620f1
authored
9 years ago
by
Eric Laurent
Browse files
Options
Download
Email Patches
Plain Diff
SoundTrigger: fix binder call status reporting.
Bug: 24677430. Change-Id: Ife9b10e2d1acdb51099b21551e8c191fff7f75b4
parent
4802c0c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
soundtrigger/ISoundTrigger.cpp
soundtrigger/ISoundTrigger.cpp
+8
-6
soundtrigger/ISoundTriggerHwService.cpp
soundtrigger/ISoundTriggerHwService.cpp
+5
-2
No files found.
soundtrigger/ISoundTrigger.cpp
View file @
014620f1
...
...
@@ -60,11 +60,13 @@ public:
data
.
writeInterfaceToken
(
ISoundTrigger
::
getInterfaceDescriptor
());
data
.
writeStrongBinder
(
IInterface
::
asBinder
(
modelMemory
));
status_t
status
=
remote
()
->
transact
(
LOAD_SOUND_MODEL
,
data
,
&
reply
);
if
(
status
!=
NO_ERROR
||
(
status
=
(
status_t
)
reply
.
readInt32
())
!=
NO_ERROR
)
{
if
(
status
!=
NO_ERROR
)
{
return
status
;
}
reply
.
read
(
handle
,
sizeof
(
sound_model_handle_t
));
status
=
(
status_t
)
reply
.
readInt32
();
if
(
status
==
NO_ERROR
)
{
reply
.
read
(
handle
,
sizeof
(
sound_model_handle_t
));
}
return
status
;
}
...
...
@@ -74,7 +76,7 @@ public:
data
.
writeInterfaceToken
(
ISoundTrigger
::
getInterfaceDescriptor
());
data
.
write
(
&
handle
,
sizeof
(
sound_model_handle_t
));
status_t
status
=
remote
()
->
transact
(
UNLOAD_SOUND_MODEL
,
data
,
&
reply
);
if
(
status
!
=
NO_ERROR
)
{
if
(
status
=
=
NO_ERROR
)
{
status
=
(
status_t
)
reply
.
readInt32
();
}
return
status
;
...
...
@@ -93,7 +95,7 @@ public:
}
data
.
writeStrongBinder
(
IInterface
::
asBinder
(
dataMemory
));
status_t
status
=
remote
()
->
transact
(
START_RECOGNITION
,
data
,
&
reply
);
if
(
status
!
=
NO_ERROR
)
{
if
(
status
=
=
NO_ERROR
)
{
status
=
(
status_t
)
reply
.
readInt32
();
}
return
status
;
...
...
@@ -105,7 +107,7 @@ public:
data
.
writeInterfaceToken
(
ISoundTrigger
::
getInterfaceDescriptor
());
data
.
write
(
&
handle
,
sizeof
(
sound_model_handle_t
));
status_t
status
=
remote
()
->
transact
(
STOP_RECOGNITION
,
data
,
&
reply
);
if
(
status
!
=
NO_ERROR
)
{
if
(
status
=
=
NO_ERROR
)
{
status
=
(
status_t
)
reply
.
readInt32
();
}
return
status
;
...
...
This diff is collapsed.
Click to expand it.
soundtrigger/ISoundTriggerHwService.cpp
View file @
014620f1
...
...
@@ -85,8 +85,11 @@ public:
data
.
writeInterfaceToken
(
ISoundTriggerHwService
::
getInterfaceDescriptor
());
data
.
write
(
&
handle
,
sizeof
(
sound_trigger_module_handle_t
));
data
.
writeStrongBinder
(
IInterface
::
asBinder
(
client
));
remote
()
->
transact
(
ATTACH
,
data
,
&
reply
);
status_t
status
=
reply
.
readInt32
();
status_t
status
=
remote
()
->
transact
(
ATTACH
,
data
,
&
reply
);
if
(
status
!=
NO_ERROR
)
{
return
status
;
}
status
=
reply
.
readInt32
();
if
(
reply
.
readInt32
()
!=
0
)
{
module
=
interface_cast
<
ISoundTrigger
>
(
reply
.
readStrongBinder
());
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment