Loading services/camera/libcameraservice/CameraService.cpp +3 −9 Original line number Original line Diff line number Diff line Loading @@ -2353,12 +2353,8 @@ bool CameraService::isCameraPrivacyEnabled(const String16& packageName, const st return true; return true; } else if (mSensorPrivacyPolicy->getCameraPrivacyState() == SensorPrivacyManager::DISABLED) { } else if (mSensorPrivacyPolicy->getCameraPrivacyState() == SensorPrivacyManager::DISABLED) { return false; return false; } else if ((mSensorPrivacyPolicy->getCameraPrivacyState() } else if (mSensorPrivacyPolicy->getCameraPrivacyState() == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_HELPFUL_APPS) || == SensorPrivacyManager::ENABLED_EXCEPT_ALLOWLISTED_APPS) { (mSensorPrivacyPolicy->getCameraPrivacyState() == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_REQUIRED_APPS) || (mSensorPrivacyPolicy->getCameraPrivacyState() == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_APPS)) { if (hasPermissionsForCameraPrivacyAllowlist(callingPid, callingUid)) { if (hasPermissionsForCameraPrivacyAllowlist(callingPid, callingUid)) { return false; return false; } else { } else { Loading Loading @@ -4903,9 +4899,7 @@ binder::Status CameraService::SensorPrivacyPolicy::onSensorPrivacyStateChanged( // if sensor privacy is enabled then block all clients from accessing the camera // if sensor privacy is enabled then block all clients from accessing the camera if (state == SensorPrivacyManager::ENABLED) { if (state == SensorPrivacyManager::ENABLED) { service->blockAllClients(); service->blockAllClients(); } else if ((state == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_APPS) } else if (state == SensorPrivacyManager::ENABLED_EXCEPT_ALLOWLISTED_APPS) { || (state == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_HELPFUL_APPS) || (state == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_REQUIRED_APPS)) { service->blockPrivacyEnabledClients(); service->blockPrivacyEnabledClients(); } } return binder::Status::ok(); return binder::Status::ok(); Loading Loading
services/camera/libcameraservice/CameraService.cpp +3 −9 Original line number Original line Diff line number Diff line Loading @@ -2353,12 +2353,8 @@ bool CameraService::isCameraPrivacyEnabled(const String16& packageName, const st return true; return true; } else if (mSensorPrivacyPolicy->getCameraPrivacyState() == SensorPrivacyManager::DISABLED) { } else if (mSensorPrivacyPolicy->getCameraPrivacyState() == SensorPrivacyManager::DISABLED) { return false; return false; } else if ((mSensorPrivacyPolicy->getCameraPrivacyState() } else if (mSensorPrivacyPolicy->getCameraPrivacyState() == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_HELPFUL_APPS) || == SensorPrivacyManager::ENABLED_EXCEPT_ALLOWLISTED_APPS) { (mSensorPrivacyPolicy->getCameraPrivacyState() == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_REQUIRED_APPS) || (mSensorPrivacyPolicy->getCameraPrivacyState() == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_APPS)) { if (hasPermissionsForCameraPrivacyAllowlist(callingPid, callingUid)) { if (hasPermissionsForCameraPrivacyAllowlist(callingPid, callingUid)) { return false; return false; } else { } else { Loading Loading @@ -4903,9 +4899,7 @@ binder::Status CameraService::SensorPrivacyPolicy::onSensorPrivacyStateChanged( // if sensor privacy is enabled then block all clients from accessing the camera // if sensor privacy is enabled then block all clients from accessing the camera if (state == SensorPrivacyManager::ENABLED) { if (state == SensorPrivacyManager::ENABLED) { service->blockAllClients(); service->blockAllClients(); } else if ((state == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_APPS) } else if (state == SensorPrivacyManager::ENABLED_EXCEPT_ALLOWLISTED_APPS) { || (state == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_HELPFUL_APPS) || (state == SensorPrivacyManager::AUTOMOTIVE_DRIVER_ASSISTANCE_REQUIRED_APPS)) { service->blockPrivacyEnabledClients(); service->blockPrivacyEnabledClients(); } } return binder::Status::ok(); return binder::Status::ok(); Loading