Propagate clientAttribution to CameraService::BasicClient
Permission checks for camera streaming will be moved to BasicClient in
the near future. Store the client's AttributionSourceState in BasicClient.
Since the calling pid is used to identify the client after preflight permission checks,
continue storing mClientPid separately from the AttributionSourceState pid.
Bug: 369841571
Bug: 190657833
Test: CtsSecurityTestCases:CameraPermissionTest
Flag: EXEMPT mechanical refactor
Change-Id: I1aa27ae66ba897752fdbac43b2a6f9c94301ae71
diff --git a/services/camera/libcameraservice/api2/CameraOfflineSessionClient.h b/services/camera/libcameraservice/api2/CameraOfflineSessionClient.h
index 77de874..29dd72c 100644
--- a/services/camera/libcameraservice/api2/CameraOfflineSessionClient.h
+++ b/services/camera/libcameraservice/api2/CameraOfflineSessionClient.h
@@ -44,25 +44,21 @@
{
public:
CameraOfflineSessionClient(
- const sp<CameraService>& cameraService,
- sp<CameraOfflineSessionBase> session,
+ const sp<CameraService>& cameraService, sp<CameraOfflineSessionBase> session,
const KeyedVector<sp<IBinder>, sp<CompositeStream>>& offlineCompositeStreamMap,
const sp<ICameraDeviceCallbacks>& remoteCallback,
std::shared_ptr<AttributionAndPermissionUtils> attributionAndPermissionUtils,
- const std::string& clientPackageName,
- const std::optional<std::string>& clientFeatureId,
- const std::string& cameraIdStr, int cameraFacing, int sensorOrientation,
- int clientPid, uid_t clientUid, int servicePid) :
- CameraService::BasicClient(
- cameraService,
- IInterface::asBinder(remoteCallback),
- attributionAndPermissionUtils,
- // (v)ndk doesn't have offline session support
- clientPackageName, /*overridePackageName*/false, clientFeatureId,
- cameraIdStr, cameraFacing, sensorOrientation, clientPid, clientUid, servicePid,
- hardware::ICameraService::ROTATION_OVERRIDE_NONE),
- mRemoteCallback(remoteCallback), mOfflineSession(session),
- mCompositeStreamMap(offlineCompositeStreamMap) {}
+ const AttributionSourceState& clientAttribution, int callingPid,
+ const std::string& cameraIdStr, int cameraFacing, int sensorOrientation, int servicePid)
+ : CameraService::BasicClient(cameraService, IInterface::asBinder(remoteCallback),
+ attributionAndPermissionUtils,
+ // (v)ndk doesn't have offline session support
+ clientAttribution, callingPid, /*overridePackageName*/ false,
+ cameraIdStr, cameraFacing, sensorOrientation, servicePid,
+ hardware::ICameraService::ROTATION_OVERRIDE_NONE),
+ mRemoteCallback(remoteCallback),
+ mOfflineSession(session),
+ mCompositeStreamMap(offlineCompositeStreamMap) {}
virtual ~CameraOfflineSessionClient() {}