Deprecate HIDL cameraservice
This prevents the HIDL cameraservice from being registered after FCM
level 7.
Demote the error message to a warning when the HIDL cameraservice fails
to register.
Test: boot cuttlefish and verify no HIDL cameraservice and no crash in
cameraserver.
Bug: 205764761
Change-Id: I786c2ed74d272a9546d2acd901cc2159243c603a
diff --git a/camera/cameraserver/manifest_android.frameworks.cameraservice.service.xml b/camera/cameraserver/manifest_android.frameworks.cameraservice.service.xml
index e892471..f7e455f 100644
--- a/camera/cameraserver/manifest_android.frameworks.cameraservice.service.xml
+++ b/camera/cameraserver/manifest_android.frameworks.cameraservice.service.xml
@@ -1,5 +1,5 @@
<manifest version="1.0" type="framework">
- <hal>
+ <hal format="hidl" max-level="7">
<name>android.frameworks.cameraservice.service</name>
<transport>hwbinder</transport>
<version>2.2</version>
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index c54be55..ec8d6b9 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -194,7 +194,8 @@
mAppOps.setCameraAudioRestriction(mAudioRestriction);
sp<HidlCameraService> hcs = HidlCameraService::getInstance(this);
if (hcs->registerAsService() != android::OK) {
- ALOGE("%s: Failed to register default android.frameworks.cameraservice.service@1.0",
+ // Deprecated, so it will fail to register on newer devices
+ ALOGW("%s: Did not register default android.frameworks.cameraservice.service@2.2",
__FUNCTION__);
}