Integration test for application specific exceptions
Bug: 25800533
Test: Integration tests pass
Change-Id: Iaf742a29509b1280c5db7c7231a4fac538a07574
diff --git a/tests/aidl_test_service.cpp b/tests/aidl_test_service.cpp
index 2b6b5fd..d68842b 100644
--- a/tests/aidl_test_service.cpp
+++ b/tests/aidl_test_service.cpp
@@ -25,6 +25,7 @@
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
#include <binder/ProcessState.h>
+#include <binder/Status.h>
#include <nativehelper/ScopedFd.h>
#include <utils/Errors.h>
#include <utils/Log.h>
@@ -98,7 +99,7 @@
class NativeService : public BnTestService {
public:
NativeService() {}
- ~NativeService() override {}
+ virtual ~NativeService() = default;
int Run() {
sp<Looper> looper(Looper::prepare(0 /* opts */));
@@ -301,6 +302,10 @@
return Status::ok();
}
+ Status ThrowServiceException(int code) override {
+ return Status::fromServiceSpecificError(code);
+ }
+
private:
map<String16, sp<INamedCallback>> service_map_;
};