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

Commit c49b650d authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4773106 from 3dd71b01 to pi-release

Change-Id: I6003de0800e2dd56fbc4ca073f8814744faa9f26
parents 77228a7b 3dd71b01
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -223,10 +223,14 @@ bool CryptoHal::requiresSecureDecoderComponent(const char *mime) const {
    Mutex::Autolock autoLock(mLock);

    if (mInitCheck != OK) {
        return mInitCheck;
        return false;
    }

    return mPlugin->requiresSecureDecoderComponent(hidl_string(mime));
    Return<bool> hResult = mPlugin->requiresSecureDecoderComponent(hidl_string(mime));
    if (!hResult.isOk()) {
        return false;
    }
    return hResult;
}


+1 −1
Original line number Diff line number Diff line
@@ -806,7 +806,7 @@ void AudioTrack::flush()
        return;
    }
    AutoMutex lock(mLock);
    if (mState == STATE_ACTIVE || mState == STATE_FLUSHED) {
    if (mState == STATE_ACTIVE) {
        return;
    }
    flush_l();
+2 −1
Original line number Diff line number Diff line
@@ -876,7 +876,8 @@ status_t BnAudioPolicyService::onTransact(
        case SET_DEVICE_CONNECTION_STATE:
        case HANDLE_DEVICE_CONFIG_CHANGE:
        case SET_PHONE_STATE:
        case SET_FORCE_USE:
//FIXME: Allow SET_FORCE_USE calls from system apps until a better use case routing API is available
//      case SET_FORCE_USE:
        case INIT_STREAM_VOLUME:
        case SET_STREAM_VOLUME:
        case REGISTER_POLICY_MIXES:
+15 −3
Original line number Diff line number Diff line
@@ -248,12 +248,17 @@ MediaAnalyticsItem::Prop *MediaAnalyticsItem::findProp(const char *name) {
}

void MediaAnalyticsItem::Prop::setName(const char *name, size_t len) {
    mNameLen = len;
    free((void *)mName);
    mName = (const char *) malloc(len+1);
    LOG_ALWAYS_FATAL_IF(mName == NULL,
                        "failed malloc() for property '%s' (len %zu)",
                        name, len);
    memcpy ((void *)mName, name, len+1);
    mNameLen = len;
}

// used only as part of a storing operation
// consider this "find-or-allocate".
// caller validates type and uses clearPropValue() accordingly
MediaAnalyticsItem::Prop *MediaAnalyticsItem::allocateProp(const char *name) {
    size_t len = strlen(name);
    size_t i = findPropIndex(name, len);
@@ -271,7 +276,6 @@ MediaAnalyticsItem::Prop *MediaAnalyticsItem::allocateProp(const char *name) {
        i = mPropCount++;
        prop = &mProps[i];
        prop->setName(name, len);
        prop->mType = kTypeNone;        // make caller set type info
    }

    return prop;
@@ -299,6 +303,7 @@ bool MediaAnalyticsItem::removeProp(const char *name) {
void MediaAnalyticsItem::setInt32(MediaAnalyticsItem::Attr name, int32_t value) {
    Prop *prop = allocateProp(name);
    if (prop != NULL) {
        clearPropValue(prop);
        prop->mType = kTypeInt32;
        prop->u.int32Value = value;
    }
@@ -307,6 +312,7 @@ void MediaAnalyticsItem::setInt32(MediaAnalyticsItem::Attr name, int32_t value)
void MediaAnalyticsItem::setInt64(MediaAnalyticsItem::Attr name, int64_t value) {
    Prop *prop = allocateProp(name);
    if (prop != NULL) {
        clearPropValue(prop);
        prop->mType = kTypeInt64;
        prop->u.int64Value = value;
    }
@@ -315,6 +321,7 @@ void MediaAnalyticsItem::setInt64(MediaAnalyticsItem::Attr name, int64_t value)
void MediaAnalyticsItem::setDouble(MediaAnalyticsItem::Attr name, double value) {
    Prop *prop = allocateProp(name);
    if (prop != NULL) {
        clearPropValue(prop);
        prop->mType = kTypeDouble;
        prop->u.doubleValue = value;
    }
@@ -325,6 +332,7 @@ void MediaAnalyticsItem::setCString(MediaAnalyticsItem::Attr name, const char *v
    Prop *prop = allocateProp(name);
    // any old value will be gone
    if (prop != NULL) {
        clearPropValue(prop);
        prop->mType = kTypeCString;
        prop->u.CStringValue = strdup(value);
    }
@@ -333,6 +341,7 @@ void MediaAnalyticsItem::setCString(MediaAnalyticsItem::Attr name, const char *v
void MediaAnalyticsItem::setRate(MediaAnalyticsItem::Attr name, int64_t count, int64_t duration) {
    Prop *prop = allocateProp(name);
    if (prop != NULL) {
        clearPropValue(prop);
        prop->mType = kTypeRate;
        prop->u.rate.count = count;
        prop->u.rate.duration = duration;
@@ -585,6 +594,9 @@ void MediaAnalyticsItem::copyProp(Prop *dst, const Prop *src)
    // fix any pointers that we blindly copied, so we have our own copies
    if (dst->mName) {
        void *p =  malloc(dst->mNameLen + 1);
        LOG_ALWAYS_FATAL_IF(p == NULL,
                            "failed malloc() duping property '%s' (len %zu)",
                            dst->mName, dst->mNameLen);
        memcpy (p, src->mName, dst->mNameLen + 1);
        dst->mName = (const char *) p;
    }
+0 −1
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@ cc_library_shared {
        "libmedia_helper",
        "libstagefright_codecbase",
        "libstagefright_foundation",
        "libstagefright_omx",
        "libstagefright_omx_utils",
        "libstagefright_xmlparser",
        "libRScpp",
Loading