summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
Diffstat (limited to 'camera')
-rw-r--r--camera/Camera.cpp4
-rw-r--r--camera/CameraBase.cpp4
-rw-r--r--camera/ICamera.cpp8
-rw-r--r--camera/ICameraClient.cpp4
-rw-r--r--camera/ICameraRecordingProxy.cpp4
-rw-r--r--camera/ICameraRecordingProxyListener.cpp2
-rw-r--r--camera/ICameraService.cpp20
-rw-r--r--camera/IProCameraUser.cpp4
-rw-r--r--camera/camera2/CaptureRequest.cpp2
-rw-r--r--camera/camera2/ICameraDeviceUser.cpp2
10 files changed, 27 insertions, 27 deletions
diff --git a/camera/Camera.cpp b/camera/Camera.cpp
index 85f44f0..3a9fb4c 100644
--- a/camera/Camera.cpp
+++ b/camera/Camera.cpp
@@ -55,7 +55,7 @@ sp<Camera> Camera::create(const sp<ICamera>& camera)
if (camera->connect(c) == NO_ERROR) {
c->mStatus = NO_ERROR;
c->mCamera = camera;
- camera->asBinder()->linkToDeath(c);
+ IInterface::asBinder(camera)->linkToDeath(c);
return c;
}
return 0;
@@ -93,7 +93,7 @@ status_t Camera::connectLegacy(int cameraId, int halVersion,
clientUid, /*out*/c->mCamera);
}
if (status == OK && c->mCamera != 0) {
- c->mCamera->asBinder()->linkToDeath(c);
+ IInterface::asBinder(c->mCamera)->linkToDeath(c);
c->mStatus = NO_ERROR;
camera = c;
} else {
diff --git a/camera/CameraBase.cpp b/camera/CameraBase.cpp
index 04694cd..65a1a47 100644
--- a/camera/CameraBase.cpp
+++ b/camera/CameraBase.cpp
@@ -107,7 +107,7 @@ sp<TCam> CameraBase<TCam, TCamTraits>::connect(int cameraId,
/*out*/ c->mCamera);
}
if (status == OK && c->mCamera != 0) {
- c->mCamera->asBinder()->linkToDeath(c);
+ IInterface::asBinder(c->mCamera)->linkToDeath(c);
c->mStatus = NO_ERROR;
} else {
ALOGW("An error occurred while connecting to camera: %d", cameraId);
@@ -122,7 +122,7 @@ void CameraBase<TCam, TCamTraits>::disconnect()
ALOGV("%s: disconnect", __FUNCTION__);
if (mCamera != 0) {
mCamera->disconnect();
- mCamera->asBinder()->unlinkToDeath(this);
+ IInterface::asBinder(mCamera)->unlinkToDeath(this);
mCamera = 0;
}
ALOGV("%s: disconnect (done)", __FUNCTION__);
diff --git a/camera/ICamera.cpp b/camera/ICamera.cpp
index ca31c65..9943be6 100644
--- a/camera/ICamera.cpp
+++ b/camera/ICamera.cpp
@@ -75,7 +75,7 @@ public:
ALOGV("setPreviewTarget");
Parcel data, reply;
data.writeInterfaceToken(ICamera::getInterfaceDescriptor());
- sp<IBinder> b(bufferProducer != NULL ? bufferProducer->asBinder() : NULL);
+ sp<IBinder> b(IInterface::asBinder(bufferProducer));
data.writeStrongBinder(b);
remote()->transact(SET_PREVIEW_TARGET, data, &reply);
return reply.readInt32();
@@ -98,7 +98,7 @@ public:
ALOGV("setPreviewCallbackTarget");
Parcel data, reply;
data.writeInterfaceToken(ICamera::getInterfaceDescriptor());
- sp<IBinder> b(callbackProducer->asBinder());
+ sp<IBinder> b(IInterface::asBinder(callbackProducer));
data.writeStrongBinder(b);
remote()->transact(SET_PREVIEW_CALLBACK_TARGET, data, &reply);
return reply.readInt32();
@@ -147,7 +147,7 @@ public:
ALOGV("releaseRecordingFrame");
Parcel data, reply;
data.writeInterfaceToken(ICamera::getInterfaceDescriptor());
- data.writeStrongBinder(mem->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(mem));
remote()->transact(RELEASE_RECORDING_FRAME, data, &reply);
}
@@ -250,7 +250,7 @@ public:
{
Parcel data, reply;
data.writeInterfaceToken(ICamera::getInterfaceDescriptor());
- data.writeStrongBinder(cameraClient->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(cameraClient));
remote()->transact(CONNECT, data, &reply);
return reply.readInt32();
}
diff --git a/camera/ICameraClient.cpp b/camera/ICameraClient.cpp
index 205c8ba..179a341 100644
--- a/camera/ICameraClient.cpp
+++ b/camera/ICameraClient.cpp
@@ -58,7 +58,7 @@ public:
Parcel data, reply;
data.writeInterfaceToken(ICameraClient::getInterfaceDescriptor());
data.writeInt32(msgType);
- data.writeStrongBinder(imageData->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(imageData));
if (metadata) {
data.writeInt32(metadata->number_of_faces);
data.write(metadata->faces, sizeof(camera_face_t) * metadata->number_of_faces);
@@ -74,7 +74,7 @@ public:
data.writeInterfaceToken(ICameraClient::getInterfaceDescriptor());
data.writeInt64(timestamp);
data.writeInt32(msgType);
- data.writeStrongBinder(imageData->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(imageData));
remote()->transact(DATA_CALLBACK_TIMESTAMP, data, &reply, IBinder::FLAG_ONEWAY);
}
};
diff --git a/camera/ICameraRecordingProxy.cpp b/camera/ICameraRecordingProxy.cpp
index 7223b6d..3dc0ffb 100644
--- a/camera/ICameraRecordingProxy.cpp
+++ b/camera/ICameraRecordingProxy.cpp
@@ -45,7 +45,7 @@ public:
ALOGV("startRecording");
Parcel data, reply;
data.writeInterfaceToken(ICameraRecordingProxy::getInterfaceDescriptor());
- data.writeStrongBinder(listener->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(listener));
remote()->transact(START_RECORDING, data, &reply);
return reply.readInt32();
}
@@ -63,7 +63,7 @@ public:
ALOGV("releaseRecordingFrame");
Parcel data, reply;
data.writeInterfaceToken(ICameraRecordingProxy::getInterfaceDescriptor());
- data.writeStrongBinder(mem->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(mem));
remote()->transact(RELEASE_RECORDING_FRAME, data, &reply);
}
};
diff --git a/camera/ICameraRecordingProxyListener.cpp b/camera/ICameraRecordingProxyListener.cpp
index cb17f19..cf848fc 100644
--- a/camera/ICameraRecordingProxyListener.cpp
+++ b/camera/ICameraRecordingProxyListener.cpp
@@ -42,7 +42,7 @@ public:
data.writeInterfaceToken(ICameraRecordingProxyListener::getInterfaceDescriptor());
data.writeInt64(timestamp);
data.writeInt32(msgType);
- data.writeStrongBinder(imageData->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(imageData));
remote()->transact(DATA_CALLBACK_TIMESTAMP, data, &reply, IBinder::FLAG_ONEWAY);
}
};
diff --git a/camera/ICameraService.cpp b/camera/ICameraService.cpp
index 5485205..fc3e437 100644
--- a/camera/ICameraService.cpp
+++ b/camera/ICameraService.cpp
@@ -172,7 +172,7 @@ public:
{
Parcel data, reply;
data.writeInterfaceToken(ICameraService::getInterfaceDescriptor());
- data.writeStrongBinder(cameraClient->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(cameraClient));
data.writeInt32(cameraId);
data.writeString16(clientPackageName);
data.writeInt32(clientUid);
@@ -194,7 +194,7 @@ public:
{
Parcel data, reply;
data.writeInterfaceToken(ICameraService::getInterfaceDescriptor());
- data.writeStrongBinder(cameraClient->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(cameraClient));
data.writeInt32(cameraId);
data.writeInt32(halVersion);
data.writeString16(clientPackageName);
@@ -217,7 +217,7 @@ public:
{
Parcel data, reply;
data.writeInterfaceToken(ICameraService::getInterfaceDescriptor());
- data.writeStrongBinder(cameraCb->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(cameraCb));
data.writeInt32(cameraId);
data.writeString16(clientPackageName);
data.writeInt32(clientUid);
@@ -242,7 +242,7 @@ public:
{
Parcel data, reply;
data.writeInterfaceToken(ICameraService::getInterfaceDescriptor());
- data.writeStrongBinder(cameraCb->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(cameraCb));
data.writeInt32(cameraId);
data.writeString16(clientPackageName);
data.writeInt32(clientUid);
@@ -260,7 +260,7 @@ public:
{
Parcel data, reply;
data.writeInterfaceToken(ICameraService::getInterfaceDescriptor());
- data.writeStrongBinder(listener->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(listener));
remote()->transact(BnCameraService::ADD_LISTENER, data, &reply);
if (readExceptionCode(reply)) return -EPROTO;
@@ -271,7 +271,7 @@ public:
{
Parcel data, reply;
data.writeInterfaceToken(ICameraService::getInterfaceDescriptor());
- data.writeStrongBinder(listener->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(listener));
remote()->transact(BnCameraService::REMOVE_LISTENER, data, &reply);
if (readExceptionCode(reply)) return -EPROTO;
@@ -384,7 +384,7 @@ status_t BnCameraService::onTransact(
reply->writeInt32(status);
if (camera != NULL) {
reply->writeInt32(1);
- reply->writeStrongBinder(camera->asBinder());
+ reply->writeStrongBinder(IInterface::asBinder(camera));
} else {
reply->writeInt32(0);
}
@@ -404,7 +404,7 @@ status_t BnCameraService::onTransact(
reply->writeInt32(status);
if (camera != NULL) {
reply->writeInt32(1);
- reply->writeStrongBinder(camera->asBinder());
+ reply->writeStrongBinder(IInterface::asBinder(camera));
} else {
reply->writeInt32(0);
}
@@ -424,7 +424,7 @@ status_t BnCameraService::onTransact(
reply->writeInt32(status);
if (camera != NULL) {
reply->writeInt32(1);
- reply->writeStrongBinder(camera->asBinder());
+ reply->writeStrongBinder(IInterface::asBinder(camera));
} else {
reply->writeInt32(0);
}
@@ -484,7 +484,7 @@ status_t BnCameraService::onTransact(
reply->writeInt32(status);
if (camera != NULL) {
reply->writeInt32(1);
- reply->writeStrongBinder(camera->asBinder());
+ reply->writeStrongBinder(IInterface::asBinder(camera));
} else {
reply->writeInt32(0);
}
diff --git a/camera/IProCameraUser.cpp b/camera/IProCameraUser.cpp
index 8f22124..9bd7597 100644
--- a/camera/IProCameraUser.cpp
+++ b/camera/IProCameraUser.cpp
@@ -65,7 +65,7 @@ public:
{
Parcel data, reply;
data.writeInterfaceToken(IProCameraUser::getInterfaceDescriptor());
- data.writeStrongBinder(cameraClient->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(cameraClient));
remote()->transact(CONNECT, data, &reply);
return reply.readInt32();
}
@@ -150,7 +150,7 @@ public:
data.writeInt32(height);
data.writeInt32(format);
- sp<IBinder> b(bufferProducer->asBinder());
+ sp<IBinder> b(IInterface::asBinder(bufferProducer));
data.writeStrongBinder(b);
remote()->transact(CREATE_STREAM, data, &reply);
diff --git a/camera/camera2/CaptureRequest.cpp b/camera/camera2/CaptureRequest.cpp
index 57e5319..d5e1c5b 100644
--- a/camera/camera2/CaptureRequest.cpp
+++ b/camera/camera2/CaptureRequest.cpp
@@ -106,7 +106,7 @@ status_t CaptureRequest::writeToParcel(Parcel* parcel) const {
sp<IBinder> binder;
if (surface != 0) {
- binder = surface->getIGraphicBufferProducer()->asBinder();
+ binder = IInterface::asBinder(surface->getIGraphicBufferProducer());
}
// not sure if readParcelableArray does this, hard to tell from source
diff --git a/camera/camera2/ICameraDeviceUser.cpp b/camera/camera2/ICameraDeviceUser.cpp
index ff4a0c2..35345d2 100644
--- a/camera/camera2/ICameraDeviceUser.cpp
+++ b/camera/camera2/ICameraDeviceUser.cpp
@@ -219,7 +219,7 @@ public:
data.writeInt32(1); // marker that bufferProducer is not null
data.writeString16(String16("unknown_name")); // name of surface
- sp<IBinder> b(bufferProducer->asBinder());
+ sp<IBinder> b(IInterface::asBinder(bufferProducer));
data.writeStrongBinder(b);
remote()->transact(CREATE_STREAM, data, &reply);