libbinder_ndk: distinguish exception/status_t

Previously here, I had erroneously used EX_* values instead of using
values corresponding to status_t.

This CL defines the set of errors that can be returned from APIs and
constrains the return set to be exactly and only those values.

Exception values are currently not used, but they will be used for
a Status-like object since they are required for communicating with
the SDK (Java). This is also why they were not removed.

Bug: 111445392
Test: ./ndk/runtests.sh
Change-Id: I24bbebae60c167d7e050ee608c24cc1ffc8a9101
diff --git a/libs/binder/ndk/test/iface.cpp b/libs/binder/ndk/test/iface.cpp
index a1aa0fa..80700df 100644
--- a/libs/binder/ndk/test/iface.cpp
+++ b/libs/binder/ndk/test/iface.cpp
@@ -41,7 +41,7 @@
 
 binder_status_t IFoo_Class_onTransact(AIBinder* binder, transaction_code_t code, const AParcel* in,
                                       AParcel* out) {
-    binder_status_t stat = EX_UNSUPPORTED_OPERATION;
+    binder_status_t stat = STATUS_FAILED_TRANSACTION;
 
     sp<IFoo> foo = static_cast<IFoo_Class_Data*>(AIBinder_getUserData(binder))->foo;
     CHECK(foo != nullptr) << "Transaction made on already deleted object";
@@ -50,7 +50,7 @@
         case IFoo::DOFOO: {
             int32_t valueIn;
             stat = AParcel_readInt32(in, &valueIn);
-            if (stat != EX_NONE) break;
+            if (stat != STATUS_OK) break;
             int32_t valueOut = foo->doubleNumber(valueIn);
             stat = AParcel_writeInt32(out, valueOut);
             break;
@@ -70,16 +70,16 @@
 
     virtual int32_t doubleNumber(int32_t in) {
         AParcel* parcelIn;
-        CHECK(EX_NONE == AIBinder_prepareTransaction(mBinder, &parcelIn));
+        CHECK(STATUS_OK == AIBinder_prepareTransaction(mBinder, &parcelIn));
 
-        CHECK(EX_NONE == AParcel_writeInt32(parcelIn, in));
+        CHECK(STATUS_OK == AParcel_writeInt32(parcelIn, in));
 
         AParcel* parcelOut;
-        CHECK(EX_NONE ==
+        CHECK(STATUS_OK ==
               AIBinder_transact(mBinder, IFoo::DOFOO, &parcelIn, &parcelOut, 0 /*flags*/));
 
         int32_t out;
-        CHECK(EX_NONE == AParcel_readInt32(parcelOut, &out));
+        CHECK(STATUS_OK == AParcel_readInt32(parcelOut, &out));
 
         AParcel_delete(&parcelOut);