Loading camera/ICamera.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public: ALOGV("setPreviewTarget"); Parcel data, reply; data.writeInterfaceToken(ICamera::getInterfaceDescriptor()); sp<IBinder> b(bufferProducer->asBinder()); sp<IBinder> b(bufferProducer != NULL ? bufferProducer->asBinder() : NULL); data.writeStrongBinder(b); remote()->transact(SET_PREVIEW_TARGET, data, &reply); return reply.readInt32(); Loading services/camera/libcameraservice/CameraService.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -1363,7 +1363,8 @@ CameraService::Client::Client(const sp<CameraService>& cameraService, int cameraId, int cameraFacing, int clientPid, uid_t clientUid, int servicePid) : CameraService::BasicClient(cameraService, cameraClient->asBinder(), CameraService::BasicClient(cameraService, cameraClient != NULL ? cameraClient->asBinder() : NULL, clientPackageName, cameraId, cameraFacing, clientPid, clientUid, Loading Loading @@ -1476,7 +1477,9 @@ status_t CameraService::BasicClient::finishCameraOps() { } // Always stop watching, even if no camera op is active if (mOpsCallback != NULL) { mAppOpsManager.stopWatchingMode(mOpsCallback); } mOpsCallback.clear(); return OK; Loading services/camera/libcameraservice/api1/Camera2Client.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -165,7 +165,8 @@ status_t Camera2Client::dump(int fd, const Vector<String16>& args) { String8 result; result.appendFormat("Client2[%d] (%p) Client: %s PID: %d, dump:\n", mCameraId, getRemoteCallback()->asBinder().get(), (getRemoteCallback() != NULL ? getRemoteCallback()->asBinder().get() : NULL), String8(mClientPackageName).string(), mClientPid); result.append(" State: "); Loading services/camera/libcameraservice/api1/CameraClient.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,8 @@ status_t CameraClient::dump(int fd, const Vector<String16>& args) { size_t len = snprintf(buffer, SIZE, "Client[%d] (%p) PID: %d\n", mCameraId, getRemoteCallback()->asBinder().get(), (getRemoteCallback() != NULL ? getRemoteCallback()->asBinder().get() : NULL), mClientPid); len = (len > SIZE - 1) ? SIZE - 1 : len; write(fd, buffer, len); Loading services/camera/libcameraservice/api2/CameraDeviceClient.cpp +13 −10 Original line number Diff line number Diff line Loading @@ -42,8 +42,14 @@ CameraDeviceClientBase::CameraDeviceClientBase( int clientPid, uid_t clientUid, int servicePid) : BasicClient(cameraService, remoteCallback->asBinder(), clientPackageName, cameraId, cameraFacing, clientPid, clientUid, servicePid), BasicClient(cameraService, remoteCallback != NULL ? remoteCallback->asBinder() : NULL, clientPackageName, cameraId, cameraFacing, clientPid, clientUid, servicePid), mRemoteCallback(remoteCallback) { } Loading Loading @@ -353,12 +359,8 @@ status_t CameraDeviceClient::createStream(int width, int height, int format, useAsync = true; } sp<IBinder> binder; sp<ANativeWindow> anw; if (bufferProducer != 0) { binder = bufferProducer->asBinder(); anw = new Surface(bufferProducer, useAsync); } sp<IBinder> binder = bufferProducer->asBinder(); sp<ANativeWindow> anw = new Surface(bufferProducer, useAsync); // TODO: remove w,h,f since we are ignoring them Loading Loading @@ -395,7 +397,7 @@ status_t CameraDeviceClient::createStream(int width, int height, int format, res = mDevice->createStream(anw, width, height, format, &streamId); if (res == OK) { mStreamMap.add(bufferProducer->asBinder(), streamId); mStreamMap.add(binder, streamId); ALOGV("%s: Camera %d: Successfully created a new stream ID %d", __FUNCTION__, mCameraId, streamId); Loading Loading @@ -514,7 +516,8 @@ status_t CameraDeviceClient::dump(int fd, const Vector<String16>& args) { String8 result; result.appendFormat("CameraDeviceClient[%d] (%p) dump:\n", mCameraId, getRemoteCallback()->asBinder().get()); (getRemoteCallback() != NULL ? getRemoteCallback()->asBinder().get() : NULL) ); result.appendFormat(" Current client: %s (PID %d, UID %u)\n", String8(mClientPackageName).string(), mClientPid, mClientUid); Loading Loading
camera/ICamera.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public: ALOGV("setPreviewTarget"); Parcel data, reply; data.writeInterfaceToken(ICamera::getInterfaceDescriptor()); sp<IBinder> b(bufferProducer->asBinder()); sp<IBinder> b(bufferProducer != NULL ? bufferProducer->asBinder() : NULL); data.writeStrongBinder(b); remote()->transact(SET_PREVIEW_TARGET, data, &reply); return reply.readInt32(); Loading
services/camera/libcameraservice/CameraService.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -1363,7 +1363,8 @@ CameraService::Client::Client(const sp<CameraService>& cameraService, int cameraId, int cameraFacing, int clientPid, uid_t clientUid, int servicePid) : CameraService::BasicClient(cameraService, cameraClient->asBinder(), CameraService::BasicClient(cameraService, cameraClient != NULL ? cameraClient->asBinder() : NULL, clientPackageName, cameraId, cameraFacing, clientPid, clientUid, Loading Loading @@ -1476,7 +1477,9 @@ status_t CameraService::BasicClient::finishCameraOps() { } // Always stop watching, even if no camera op is active if (mOpsCallback != NULL) { mAppOpsManager.stopWatchingMode(mOpsCallback); } mOpsCallback.clear(); return OK; Loading
services/camera/libcameraservice/api1/Camera2Client.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -165,7 +165,8 @@ status_t Camera2Client::dump(int fd, const Vector<String16>& args) { String8 result; result.appendFormat("Client2[%d] (%p) Client: %s PID: %d, dump:\n", mCameraId, getRemoteCallback()->asBinder().get(), (getRemoteCallback() != NULL ? getRemoteCallback()->asBinder().get() : NULL), String8(mClientPackageName).string(), mClientPid); result.append(" State: "); Loading
services/camera/libcameraservice/api1/CameraClient.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,8 @@ status_t CameraClient::dump(int fd, const Vector<String16>& args) { size_t len = snprintf(buffer, SIZE, "Client[%d] (%p) PID: %d\n", mCameraId, getRemoteCallback()->asBinder().get(), (getRemoteCallback() != NULL ? getRemoteCallback()->asBinder().get() : NULL), mClientPid); len = (len > SIZE - 1) ? SIZE - 1 : len; write(fd, buffer, len); Loading
services/camera/libcameraservice/api2/CameraDeviceClient.cpp +13 −10 Original line number Diff line number Diff line Loading @@ -42,8 +42,14 @@ CameraDeviceClientBase::CameraDeviceClientBase( int clientPid, uid_t clientUid, int servicePid) : BasicClient(cameraService, remoteCallback->asBinder(), clientPackageName, cameraId, cameraFacing, clientPid, clientUid, servicePid), BasicClient(cameraService, remoteCallback != NULL ? remoteCallback->asBinder() : NULL, clientPackageName, cameraId, cameraFacing, clientPid, clientUid, servicePid), mRemoteCallback(remoteCallback) { } Loading Loading @@ -353,12 +359,8 @@ status_t CameraDeviceClient::createStream(int width, int height, int format, useAsync = true; } sp<IBinder> binder; sp<ANativeWindow> anw; if (bufferProducer != 0) { binder = bufferProducer->asBinder(); anw = new Surface(bufferProducer, useAsync); } sp<IBinder> binder = bufferProducer->asBinder(); sp<ANativeWindow> anw = new Surface(bufferProducer, useAsync); // TODO: remove w,h,f since we are ignoring them Loading Loading @@ -395,7 +397,7 @@ status_t CameraDeviceClient::createStream(int width, int height, int format, res = mDevice->createStream(anw, width, height, format, &streamId); if (res == OK) { mStreamMap.add(bufferProducer->asBinder(), streamId); mStreamMap.add(binder, streamId); ALOGV("%s: Camera %d: Successfully created a new stream ID %d", __FUNCTION__, mCameraId, streamId); Loading Loading @@ -514,7 +516,8 @@ status_t CameraDeviceClient::dump(int fd, const Vector<String16>& args) { String8 result; result.appendFormat("CameraDeviceClient[%d] (%p) dump:\n", mCameraId, getRemoteCallback()->asBinder().get()); (getRemoteCallback() != NULL ? getRemoteCallback()->asBinder().get() : NULL) ); result.appendFormat(" Current client: %s (PID %d, UID %u)\n", String8(mClientPackageName).string(), mClientPid, mClientUid); Loading