libbinder_ndk: remove NullableStrongBinder
Nullable types do not exist in Java. For most Java types, the type is split into a nullable and non-nullable variant. This is because C++ types are more usually non-nullable, but everything in Java is non-nullable. This does mean that some Java interfaces may have to have '@Nullable' added to them in order to function as expected w/ the NDK. It also means that some transactions will be allowed in Java which are not allowed in C++. However, in Java, if a null is ignored, it will just result in a NullPointerException and be delivered to the other side. C++ does not have this same capacity (in Android), and so instead, we distinguish nullability in the type system. The basic layout is: NDK layer - all objects are nullable if they are nullable in Java NDK C++ wrapper - functions are provided for nullable and non-nullable variants AIDL - @Nullable selects nullable wrapper if desired, but the default is to return an error to the remote process (like Java would throw NullPointerException). Bug: 111445392 Test: android.binder.cts Change-Id: I615420f735a45ef7869b9ee7e86ce21b844d84a2
Loading
Please register or sign in to comment