OSDN Git Service

Fix broken readNullableStrongBinder<T> implementation
authorChristopher Wiley <wiley@google.com>
Tue, 19 Jul 2016 16:23:25 +0000 (09:23 -0700)
committerChristopher Wiley <wiley@google.com>
Tue, 19 Jul 2016 16:34:05 +0000 (09:34 -0700)
commit447b00fd55c90a7b2ad3cef74fb3754fec243fa6
tree05a3e1fab99a737161f06e6415a12124e11167d6
parent7d8f246415075326557b0ebbf95050b715fd4002
Fix broken readNullableStrongBinder<T> implementation

Added a missing return statement.  Omitting this statement
caused the compiler to silently cast a pointer to a status_t,
which in general wasn't the expected value of OK.

Only return an error when the type casted return value is null and
the IBinder we got back was not null, indicating a type error, rather
than the expected null binder.

Bug: 30160959
Change-Id: Ief3c924b902a607335eff2fcd4d860cd8523593a
Test: Integration tests in aidl that exercise this method now pass.
include/binder/Parcel.h