Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5aee9d4f authored by Jayant Chowdhary's avatar Jayant Chowdhary Committed by Gerrit Code Review
Browse files

Merge "Update CameraUtils::isCameraServiceDisabled to use base::GetBoolProperty."

parents 020dc042 51a782cd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@ cc_library_shared {
    ],

    shared_libs: [
        "libbase",
        "libcutils",
        "libutils",
        "liblog",
+4 −4
Original line number Diff line number Diff line
@@ -20,14 +20,16 @@
#include <camera/CameraUtils.h>
#include <media/hardware/HardwareAPI.h>

#include <android-base/properties.h>
#include <system/window.h>
#include <system/graphics.h>

#include <cutils/properties.h>
#include <utils/Log.h>

namespace android {

const char *kCameraServiceDisabledProperty = "config.disable_cameraservice";

status_t CameraUtils::getRotationTransform(const CameraMetadata& staticInfo,
                /*out*/int32_t* transform) {
    ALOGV("%s", __FUNCTION__);
@@ -124,9 +126,7 @@ status_t CameraUtils::getRotationTransform(const CameraMetadata& staticInfo,
}

bool CameraUtils::isCameraServiceDisabled() {
    char value[PROPERTY_VALUE_MAX];
    property_get("config.disable_cameraservice", value, "0");
    return (strncmp(value, "0", 2) != 0 && strncasecmp(value, "false", 6) != 0);
    return base::GetBoolProperty(kCameraServiceDisabledProperty, false);
}

} /* namespace android */