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

Commit 51ae084a authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11697857 from 44572a06 to 24Q3-release

Change-Id: Ic8137fb8fd0844debe1ce9758661aff571cabaf5
parents f2f05db2 44572a06
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -383,6 +383,7 @@ interface ICameraService
     * has camera device support.
     *
     * @param cameraId The camera id to query session configuration for
     * @param targetSdkVersion the target sdk level of the application calling this function.
     * @param sessionConfiguration Specific session configuration to be verified.
     * @param deviceId The device id of the context associated with the caller.
     * @param devicePolicy The camera policy of the device of the associated context (default
@@ -393,13 +394,17 @@ interface ICameraService
     *         false - in case there is no device support.
     */
    boolean isSessionConfigurationWithParametersSupported(@utf8InCpp String cameraId,
            in SessionConfiguration sessionConfiguration, int deviceId, int devicePolicy);
            int targetSdkVersion, in SessionConfiguration sessionConfiguration,
            int deviceId, int devicePolicy);

    /**
     * Get the camera characteristics for a particular session configuration for
     * the given camera device.
     *
     * @param cameraId ID of the device for which the session characteristics must be fetched.
     * @param targetSdkVersion the target sdk level of the application calling this function.
     * @param overrideToPortrait Whether to override the sensor orientation information to
     *                           correspond to portrait.
     * @param sessionConfiguration Session configuration for which the characteristics
     *                             must be fetched.
     * @param deviceId The device id of the context associated with the caller.
+20 −0
Original line number Diff line number Diff line
@@ -190,3 +190,23 @@ flag {
       purpose: PURPOSE_BUGFIX
     }
}

flag {
     namespace: "camera_platform"
     name: "check_session_support_before_session_char"
     description: "Validate that a SessionConfiguration is supported before fetching SessionCharacteristics."
     bug: "327008530"
     metadata {
       purpose: PURPOSE_BUGFIX
     }
}

flag {
     namespace: "camera_platform"
     name: "calculate_perf_override_during_session_support"
     description: "Dynamically calulate whether perf class override should be set in isSessionConfigurationWithParametersSupported."
     bug: "332975108"
     metadata {
       purpose: PURPOSE_BUGFIX
     }
}
+7 −4
Original line number Diff line number Diff line
@@ -147,8 +147,12 @@ status_t AidlConversionSpatializer::setParameter(EffectParamReader& param) {
                return statusTFromBinderStatus(mEffect->setParameter(aidlParam));
            }
            default: {
                ALOGE("%s %d invalid command %u", __func__, __LINE__, command);
                return BAD_VALUE;
                // for vendor extension, copy data area to the DefaultExtension, parameter ignored
                VendorExtension ext = VALUE_OR_RETURN_STATUS(
                        aidl::android::legacy2aidl_EffectParameterReader_VendorExtension(param));
                aidlParam =
                        MAKE_SPECIFIC_PARAMETER(Spatializer, spatializer, vendor, ext);
                break;
            }
        }
    } else {
@@ -321,8 +325,7 @@ status_t AidlConversionSpatializer::getParameter(EffectParamWriter& param) {
                return OK;
            }
            default: {
                ALOGE("%s %d invalid command %u", __func__, __LINE__, command);
                return BAD_VALUE;
                VENDOR_EXTENSION_GET_AND_RETURN(Spatializer, spatializer, param);
            }
        }
    } else {
+0 −41
Original line number Diff line number Diff line
@@ -2436,47 +2436,6 @@ status_t MPEG4Writer::setNextFd(int fd) {
    return OK;
}

bool MPEG4Writer::isSampleMetadataValid(size_t trackIndex, int64_t timeUs) {
    // Track Index starts from zero, so it should be at least 1 less than size.
    if (trackIndex >= mTracks.size()) {
        ALOGE("Incorrect trackIndex %zu, mTracks->size() %zu", trackIndex, mTracks.size());
        return false;
    }

    List<Track *>::iterator it = mTracks.begin();

    // (*it) is already pointing to trackIndex 0.
    for (int i = 1; i <= trackIndex; i++) {
        it++;
    }

    return (*it)->isTimestampValid(timeUs);
}

bool MPEG4Writer::Track::isTimestampValid(int64_t timeUs) {
    // No timescale if HEIF
    if (mIsHeif) {
        return true;
    }

    // Make sure abs(timeUs) does not overflow
    if (timeUs == INT64_MIN) {
       return false;
    }

    // Ensure that the timeUs value does not have extremely low or high values
    // that would cause an underflow or overflow, like in the calculation -
    // mdhdDuration = (trakDurationUs * mTimeScale + 5E5) / 1E6
    if (abs(timeUs) >= (INT64_MAX - 5E5) / mTimeScale) {
        return false;
    }
    // Limit check for calculations in ctts box
    if (abs(timeUs) + kMaxCttsOffsetTimeUs >= INT64_MAX / mTimeScale) {
        return false;
    }
    return true;
}

bool MPEG4Writer::Track::isExifData(
        MediaBufferBase *buffer, uint32_t *tiffHdrOffset) const {
    if (!mIsHeif) {
+0 −3
Original line number Diff line number Diff line
@@ -77,9 +77,6 @@ public:
    virtual void setStartTimeOffsetMs(int ms) { mStartTimeOffsetMs = ms; }
    virtual int32_t getStartTimeOffsetMs() const { return mStartTimeOffsetMs; }
    virtual status_t setNextFd(int fd);
    // Returns true if the timestamp is valid which is compatible with the Mpeg4.
    // Note that this overloads that method in the base class.
    bool isSampleMetadataValid(size_t trackIndex, int64_t timeUs) override;

protected:
    virtual ~MPEG4Writer();
Loading