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

Commit 6a08a929 authored by Xin Li's avatar Xin Li
Browse files

Merge ab/7061308 into stage.

Bug: 180401296
Merged-In: Iffdea341e5cd3cc2ef82e1b9c0adf211b3c29381
Change-Id: I9e0e28ec101bde3ee24c946e9fb5c11b1cceba64
parents ad9882e7 0c3f0588
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@ apex_defaults {
                "libmpeg2extractor",
                "liboggextractor",
                "libwavextractor",
                // JNI
                "libmediaparser-jni"
            ],
        },
    },
+1 −1
Original line number Diff line number Diff line
{
  "name": "com.android.media.swcodec",
  "version": 300900700,
  "version": 300000000,
  "requireNativeLibs": [
    ":sphal"
  ]
+2 −3
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <binder/IMemory.h>

#include <camera/CameraBase.h>
#include <camera/CameraUtils.h>

// needed to instantiate
#include <camera/Camera.h>
@@ -124,9 +125,7 @@ const sp<::android::hardware::ICameraService> CameraBase<TCam, TCamTraits>::getC
{
    Mutex::Autolock _l(gLock);
    if (gCameraService.get() == 0) {
        char value[PROPERTY_VALUE_MAX];
        property_get("config.disable_cameraservice", value, "0");
        if (strncmp(value, "0", 2) != 0 && strncasecmp(value, "false", 6) != 0) {
        if (CameraUtils::isCameraServiceDisabled()) {
            return gCameraService;
        }

+5 −0
Original line number Diff line number Diff line
@@ -169,6 +169,11 @@ bool CameraMetadata::isEmpty() const {
    return entryCount() == 0;
}

size_t CameraMetadata::bufferSize() const {
    return (mBuffer == NULL) ? 0 :
            get_camera_metadata_size(mBuffer);
}

status_t CameraMetadata::sort() {
    if (mLocked) {
        ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
+7 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <system/window.h>
#include <system/graphics.h>

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

namespace android {
@@ -122,4 +123,10 @@ status_t CameraUtils::getRotationTransform(const CameraMetadata& staticInfo,
    return OK;
}

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);
}

} /* namespace android */
Loading