Camera: Switch camera2 to auto-gen C++ binder interfaces
- Move camera service AIDL files to frameworks/av
- Build C++ interface stubs with AIDL tools
- Add necessary native-side parcelables and update existing ones
- Remove manually-written stubs, rearrange remaining manual stubs
- Adjust implementations to work with auto-generated stubs
- Adjust method signatures for auto-gen differences
- Add rich error messages using binder::Status
Bug: 25091611
Change-Id: I6f69f34b9d1a3f8d1fb7db87357363f8fa8483ff
diff --git a/camera/ICamera.cpp b/camera/ICamera.cpp
index 1dd8912..37b0a10 100644
--- a/camera/ICamera.cpp
+++ b/camera/ICamera.cpp
@@ -22,12 +22,14 @@
#include <sys/types.h>
#include <binder/Parcel.h>
#include <camera/CameraUtils.h>
-#include <camera/ICamera.h>
+#include <android/hardware/ICamera.h>
+#include <android/hardware/ICameraClient.h>
#include <gui/IGraphicBufferProducer.h>
#include <gui/Surface.h>
#include <media/hardware/HardwareAPI.h>
namespace android {
+namespace hardware {
enum {
DISCONNECT = IBinder::FIRST_CALL_TRANSACTION,
@@ -63,13 +65,14 @@
}
// disconnect from camera service
- void disconnect()
+ binder::Status disconnect()
{
ALOGV("disconnect");
Parcel data, reply;
data.writeInterfaceToken(ICamera::getInterfaceDescriptor());
remote()->transact(DISCONNECT, data, &reply);
reply.readExceptionCode();
+ return binder::Status::ok();
}
// pass the buffered IGraphicBufferProducer to the camera service
@@ -467,4 +470,5 @@
// ----------------------------------------------------------------------------
-}; // namespace android
+} // namespace hardware
+} // namespace android