Remove "sys.secpolicy.camera.off_" system property check
With I421690f14ee57fa818d2b233fe48a90a0a575a9e, now the device policy camera
restrictions will be propagated with a user restriction via appops, so the
system property check is no longer needed.
Bug 24538855
Change-Id: I7b034c0d49b834e570c758315df6a0163f64af4e
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 2bb282f..ebf6779 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -885,18 +885,7 @@
return -ENODEV;
}
- // Check device policy for this camera
- char value[PROPERTY_VALUE_MAX];
- char key[PROPERTY_KEY_MAX];
userid_t clientUserId = multiuser_get_user_id(clientUid);
- snprintf(key, PROPERTY_KEY_MAX, "sys.secpolicy.camera.off_%d", clientUserId);
- property_get(key, value, "0");
- if (strcmp(value, "1") == 0) {
- // Camera is disabled by DevicePolicyManager.
- ALOGE("CameraService::connect X (PID %d) rejected (camera %s is disabled by device "
- "policy)", callingPid, cameraId.string());
- return -EACCES;
- }
// Only allow clients who are being used by the current foreground device user, unless calling
// from our own process.