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

Commit 8105e980 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11908474 from 5b59654d to 24Q3-release

Change-Id: Ic142eef207c08a13a936e51a5ef37bddd4349960
parents 2ef68053 5b59654d
Loading
Loading
Loading
Loading
+24 −14
Original line number Original line Diff line number Diff line
@@ -2429,29 +2429,33 @@ typedef enum acamera_metadata_tag {
     *
     *
     * <p>Flash strength level to use in capture mode i.e. when the applications control
     * <p>Flash strength level to use in capture mode i.e. when the applications control
     * flash with either SINGLE or TORCH mode.</p>
     * flash with either SINGLE or TORCH mode.</p>
     * <p>Use android.flash.info.singleStrengthMaxLevel and
     * <p>Use ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL and
     * android.flash.info.torchStrengthMaxLevel to check whether the device supports
     * ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL to check whether the device supports
     * flash strength control or not.
     * flash strength control or not.
     * If the values of android.flash.info.singleStrengthMaxLevel and
     * If the values of android.flash.info.singleStrengthMaxLevel and
     * android.flash.info.torchStrengthMaxLevel are greater than 1,
     * ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL are greater than 1,
     * then the device supports manual flash strength control.</p>
     * then the device supports manual flash strength control.</p>
     * <p>If the ACAMERA_FLASH_MODE <code>==</code> TORCH the value must be &gt;= 1
     * <p>If the ACAMERA_FLASH_MODE <code>==</code> TORCH the value must be &gt;= 1
     * and &lt;= android.flash.info.torchStrengthMaxLevel.
     * and &lt;= ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL.
     * If the application doesn't set the key and
     * If the application doesn't set the key and
     * android.flash.info.torchStrengthMaxLevel &gt; 1,
     * ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL &gt; 1,
     * then the flash will be fired at the default level set by HAL in
     * then the flash will be fired at the default level set by HAL in
     * android.flash.info.torchStrengthDefaultLevel.
     * ACAMERA_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL.
     * If the ACAMERA_FLASH_MODE <code>==</code> SINGLE, then the value must be &gt;= 1
     * If the ACAMERA_FLASH_MODE <code>==</code> SINGLE, then the value must be &gt;= 1
     * and &lt;= android.flash.info.singleStrengthMaxLevel.
     * and &lt;= ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL.
     * If the application does not set this key and
     * If the application does not set this key and
     * android.flash.info.singleStrengthMaxLevel &gt; 1,
     * ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL &gt; 1,
     * then the flash will be fired at the default level set by HAL
     * then the flash will be fired at the default level set by HAL
     * in android.flash.info.singleStrengthDefaultLevel.
     * in ACAMERA_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL.
     * If ACAMERA_CONTROL_AE_MODE is set to any of ON_AUTO_FLASH, ON_ALWAYS_FLASH,
     * If ACAMERA_CONTROL_AE_MODE is set to any of ON_AUTO_FLASH, ON_ALWAYS_FLASH,
     * ON_AUTO_FLASH_REDEYE, ON_EXTERNAL_FLASH values, then the strengthLevel will be ignored.</p>
     * ON_AUTO_FLASH_REDEYE, ON_EXTERNAL_FLASH values, then the strengthLevel will be ignored.</p>
     *
     *
     * @see ACAMERA_CONTROL_AE_MODE
     * @see ACAMERA_CONTROL_AE_MODE
     * @see ACAMERA_FLASH_MODE
     * @see ACAMERA_FLASH_MODE
     * @see ACAMERA_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL
     * @see ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL
     * @see ACAMERA_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL
     * @see ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL
     */
     */
    ACAMERA_FLASH_STRENGTH_LEVEL =                              // int32
    ACAMERA_FLASH_STRENGTH_LEVEL =                              // int32
            ACAMERA_FLASH_START + 6,
            ACAMERA_FLASH_START + 6,
@@ -2487,9 +2491,11 @@ typedef enum acamera_metadata_tag {
     * </ul></p>
     * </ul></p>
     *
     *
     * <p>If flash unit is available this will be greater than or equal to 1 and less
     * <p>If flash unit is available this will be greater than or equal to 1 and less
     * or equal to <code>android.flash.info.singleStrengthMaxLevel</code>.
     * or equal to ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL.
     * Note for devices that do not support the manual flash strength control
     * Note for devices that do not support the manual flash strength control
     * feature, this level will always be equal to 1.</p>
     * feature, this level will always be equal to 1.</p>
     *
     * @see ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL
     */
     */
    ACAMERA_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL =               // int32
    ACAMERA_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL =               // int32
            ACAMERA_FLASH_START + 8,
            ACAMERA_FLASH_START + 8,
@@ -2509,12 +2515,14 @@ typedef enum acamera_metadata_tag {
     * otherwise the value will be equal to 1.</p>
     * otherwise the value will be equal to 1.</p>
     * <p>Note that this level is just a number of supported levels(the granularity of control).
     * <p>Note that this level is just a number of supported levels(the granularity of control).
     * There is no actual physical power units tied to this level.
     * There is no actual physical power units tied to this level.
     * There is no relation between android.flash.info.torchStrengthMaxLevel and
     * There is no relation between ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL and
     * android.flash.info.singleStrengthMaxLevel i.e. the ratio of
     * ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL i.e. the ratio of
     * android.flash.info.torchStrengthMaxLevel:android.flash.info.singleStrengthMaxLevel
     * ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL:ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL
     * is not guaranteed to be the ratio of actual brightness.</p>
     * is not guaranteed to be the ratio of actual brightness.</p>
     *
     *
     * @see ACAMERA_FLASH_MODE
     * @see ACAMERA_FLASH_MODE
     * @see ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL
     * @see ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL
     */
     */
    ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL =                    // int32
    ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL =                    // int32
            ACAMERA_FLASH_START + 9,
            ACAMERA_FLASH_START + 9,
@@ -2529,9 +2537,11 @@ typedef enum acamera_metadata_tag {
     * </ul></p>
     * </ul></p>
     *
     *
     * <p>If flash unit is available this will be greater than or equal to 1 and less
     * <p>If flash unit is available this will be greater than or equal to 1 and less
     * or equal to android.flash.info.torchStrengthMaxLevel.
     * or equal to ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL.
     * Note for the devices that do not support the manual flash strength control feature,
     * Note for the devices that do not support the manual flash strength control feature,
     * this level will always be equal to 1.</p>
     * this level will always be equal to 1.</p>
     *
     * @see ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL
     */
     */
    ACAMERA_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL =                // int32
    ACAMERA_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL =                // int32
            ACAMERA_FLASH_START + 10,
            ACAMERA_FLASH_START + 10,
+17 −12
Original line number Original line Diff line number Diff line
@@ -89,6 +89,7 @@ class CameraFuzzer : public ::android::hardware::BnCameraClient {
    bool initCamera();
    bool initCamera();
    void invokeCamera();
    void invokeCamera();
    void invokeSetParameters();
    void invokeSetParameters();
    native_handle_t* createNativeHandle();
    sp<Camera> mCamera = nullptr;
    sp<Camera> mCamera = nullptr;
    FuzzedDataProvider* mFDP = nullptr;
    FuzzedDataProvider* mFDP = nullptr;


@@ -103,6 +104,18 @@ class CameraFuzzer : public ::android::hardware::BnCameraClient {
    };
    };
};
};


native_handle_t* CameraFuzzer::createNativeHandle() {
    int32_t numFds = mFDP->ConsumeIntegralInRange<int32_t>(kMinElements, kMaxElements);
    int32_t numInts = mFDP->ConsumeIntegralInRange<int32_t>(kNumMin, kNumMax);
    native_handle_t* handle = native_handle_create(numFds, numInts);
    for (int32_t i = 0; i < numFds; ++i) {
        std::string filename = mFDP->ConsumeRandomLengthString(kMaxBytes);
        int32_t fd = open(filename.c_str(), O_RDWR | O_CREAT | O_TRUNC);
        handle->data[i] = fd;
    }
    return handle;
}

bool CameraFuzzer::initCamera() {
bool CameraFuzzer::initCamera() {
    ProcessState::self()->startThreadPool();
    ProcessState::self()->startThreadPool();
    sp<IServiceManager> sm = defaultServiceManager();
    sp<IServiceManager> sm = defaultServiceManager();
@@ -291,15 +304,11 @@ void CameraFuzzer::invokeCamera() {
                },
                },
                [&]() {
                [&]() {
                    int64_t timestamp = mFDP->ConsumeIntegral<int64_t>();
                    int64_t timestamp = mFDP->ConsumeIntegral<int64_t>();
                    int32_t numFds = mFDP->ConsumeIntegralInRange<int32_t>(kNumMin, kNumMax);
                    native_handle_t* handle = createNativeHandle();
                    int32_t numInts = mFDP->ConsumeIntegralInRange<int32_t>(kNumMin, kNumMax);
                    native_handle_t* handle = native_handle_create(numFds, numInts);
                    mCamera->recordingFrameHandleCallbackTimestamp(timestamp, handle);
                    mCamera->recordingFrameHandleCallbackTimestamp(timestamp, handle);
                },
                },
                [&]() {
                [&]() {
                    int32_t numFds = mFDP->ConsumeIntegralInRange<int32_t>(kNumMin, kNumMax);
                    native_handle_t* handle = createNativeHandle();
                    int32_t numInts = mFDP->ConsumeIntegralInRange<int32_t>(kNumMin, kNumMax);
                    native_handle_t* handle = native_handle_create(numFds, numInts);
                    mCamera->releaseRecordingFrameHandle(handle);
                    mCamera->releaseRecordingFrameHandle(handle);
                },
                },
                [&]() { mCamera->releaseRecordingFrame(iMem); },
                [&]() { mCamera->releaseRecordingFrame(iMem); },
@@ -308,9 +317,7 @@ void CameraFuzzer::invokeCamera() {
                    for (int8_t i = 0;
                    for (int8_t i = 0;
                         i < mFDP->ConsumeIntegralInRange<int8_t>(kMinElements, kMaxElements);
                         i < mFDP->ConsumeIntegralInRange<int8_t>(kMinElements, kMaxElements);
                         ++i) {
                         ++i) {
                        int32_t numFds = mFDP->ConsumeIntegralInRange<int32_t>(kNumMin, kNumMax);
                        native_handle_t* handle = createNativeHandle();
                        int32_t numInts = mFDP->ConsumeIntegralInRange<int32_t>(kNumMin, kNumMax);
                        native_handle_t* handle = native_handle_create(numFds, numInts);
                        handles.push_back(handle);
                        handles.push_back(handle);
                    }
                    }
                    mCamera->releaseRecordingFrameHandleBatch(handles);
                    mCamera->releaseRecordingFrameHandleBatch(handles);
@@ -320,9 +327,7 @@ void CameraFuzzer::invokeCamera() {
                    for (int8_t i = 0;
                    for (int8_t i = 0;
                         i < mFDP->ConsumeIntegralInRange<int8_t>(kMinElements, kMaxElements);
                         i < mFDP->ConsumeIntegralInRange<int8_t>(kMinElements, kMaxElements);
                         ++i) {
                         ++i) {
                        int32_t numFds = mFDP->ConsumeIntegralInRange<int32_t>(kNumMin, kNumMax);
                        native_handle_t* handle = createNativeHandle();
                        int32_t numInts = mFDP->ConsumeIntegralInRange<int32_t>(kNumMin, kNumMax);
                        native_handle_t* handle = native_handle_create(numFds, numInts);
                        handles.push_back(handle);
                        handles.push_back(handle);
                    }
                    }
                    std::vector<nsecs_t> timestamps;
                    std::vector<nsecs_t> timestamps;
+10 −0
Original line number Original line Diff line number Diff line
@@ -43,6 +43,16 @@ flag {
  bug: "325520135"
  bug: "325520135"
}
}


flag {
  name: "input_surface_throttle"
  namespace: "codec_fwk"
  description: "Bugfix flag for input surface throttle"
  bug: "342269852"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
flag {
  name: "large_audio_frame_finish"
  name: "large_audio_frame_finish"
  namespace: "codec_fwk"
  namespace: "codec_fwk"
+4 −4
Original line number Original line Diff line number Diff line
@@ -155,7 +155,7 @@ c2_status_t C2SoftFlacEnc::onInit() {
    mSignalledError = false;
    mSignalledError = false;
    mSignalledOutputEos = false;
    mSignalledOutputEos = false;
    mIsFirstFrame = true;
    mIsFirstFrame = true;
    mAnchorTimeStamp = 0ull;
    mAnchorTimeStamp = 0;
    mProcessedSamples = 0u;
    mProcessedSamples = 0u;
    mEncoderWriteData = false;
    mEncoderWriteData = false;
    mEncoderReturnedNbBytes = 0;
    mEncoderReturnedNbBytes = 0;
@@ -186,7 +186,7 @@ c2_status_t C2SoftFlacEnc::onStop() {
    mSignalledError = false;
    mSignalledError = false;
    mSignalledOutputEos = false;
    mSignalledOutputEos = false;
    mIsFirstFrame = true;
    mIsFirstFrame = true;
    mAnchorTimeStamp = 0ull;
    mAnchorTimeStamp = 0;
    mProcessedSamples = 0u;
    mProcessedSamples = 0u;
    mEncoderWriteData = false;
    mEncoderWriteData = false;
    mEncoderReturnedNbBytes = 0;
    mEncoderReturnedNbBytes = 0;
@@ -236,7 +236,7 @@ void C2SoftFlacEnc::process(
              inSize, (int)work->input.ordinal.timestamp.peeku(),
              inSize, (int)work->input.ordinal.timestamp.peeku(),
              (int)work->input.ordinal.frameIndex.peeku(), work->input.flags);
              (int)work->input.ordinal.frameIndex.peeku(), work->input.flags);
    if (mIsFirstFrame && inSize) {
    if (mIsFirstFrame && inSize) {
        mAnchorTimeStamp = work->input.ordinal.timestamp.peekull();
        mAnchorTimeStamp = work->input.ordinal.timestamp.peekll();
        mIsFirstFrame = false;
        mIsFirstFrame = false;
    }
    }


@@ -405,7 +405,7 @@ FLAC__StreamEncoderWriteStatus C2SoftFlacEnc::onEncodedFlacAvailable(
    C2WriteView wView = mOutputBlock->map().get();
    C2WriteView wView = mOutputBlock->map().get();
    uint8_t* outData = wView.data();
    uint8_t* outData = wView.data();
    const uint32_t sampleRate = mIntf->getSampleRate();
    const uint32_t sampleRate = mIntf->getSampleRate();
    const uint64_t outTimeStamp = mProcessedSamples * 1000000ll / sampleRate;
    const int64_t outTimeStamp = mProcessedSamples * 1000000ll / sampleRate;
    ALOGV("writing %zu bytes of encoded data on output", bytes);
    ALOGV("writing %zu bytes of encoded data on output", bytes);
    // increment mProcessedSamples to maintain audio synchronization during
    // increment mProcessedSamples to maintain audio synchronization during
    // play back
    // play back
+1 −1
Original line number Original line Diff line number Diff line
@@ -72,7 +72,7 @@ private:
    bool mSignalledOutputEos;
    bool mSignalledOutputEos;
    uint32_t mBlockSize;
    uint32_t mBlockSize;
    bool mIsFirstFrame;
    bool mIsFirstFrame;
    uint64_t mAnchorTimeStamp;
    int64_t mAnchorTimeStamp;
    uint64_t mProcessedSamples;
    uint64_t mProcessedSamples;
    // should the data received by the callback be written to the output port
    // should the data received by the callback be written to the output port
    bool mEncoderWriteData;
    bool mEncoderWriteData;
Loading