Enable rich status reporting for binder interface
Generated aidl code now requires services to return
android::binder::Status objects from server interfaces. These objects
allow services to report error conditions as exceptions in Java.
Bug: 25632204
Test: Generated code compiles with updated aidl
Change-Id: I588be72e35b6caaa31454ecde0f51544e1134ce9
diff --git a/binder_service.cc b/binder_service.cc
index b8c62ce..8029505 100644
--- a/binder_service.cc
+++ b/binder_service.cc
@@ -20,30 +20,30 @@
using android::String16;
using android::os::IUpdateEnginePayloadApplicationCallback;
using android::sp;
-using android::status_t;
+using android::binder::Status;
using std::vector;
namespace chromeos_update_engine {
-status_t BinderService::applyPayload(
+Status BinderService::applyPayload(
const String16& url,
const vector<String16>& header_kv_pairs,
const sp<IUpdateEnginePayloadApplicationCallback>& callback,
int32_t* return_value) {
*return_value = 0;
- return OK;
+ return Status::ok();
}
-status_t BinderService::suspend() {
- return OK;
+Status BinderService::suspend() {
+ return Status::ok();
}
-status_t BinderService::resume() {
- return OK;
+Status BinderService::resume() {
+ return Status::ok();
}
-status_t BinderService::cancel() {
- return OK;
+Status BinderService::cancel() {
+ return Status::ok();
}
} // namespace chromeos_update_engine