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

Commit 57cc653a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add handling of "hard" I/O errors to AudioFlinger" into main

parents ae029140 f548cd3e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -386,7 +386,7 @@ class OutputStreamCallbackAidl : public StreamCallbackBase,
        return runCb([](CbRef cb) { cb->onWriteReady(); });
    }
    ndk::ScopedAStatus onError() override {
        return runCb([](CbRef cb) { cb->onError(); });
        return runCb([](CbRef cb) { cb->onError(true /*isHardError*/); });
    }
    ndk::ScopedAStatus onDrainReady() override {
        return runCb([](CbRef cb) { cb->onDrainReady(); });
+2 −2
Original line number Diff line number Diff line
@@ -901,10 +901,10 @@ void StreamOutHalAidl::onDrainReady() {
    }
}

void StreamOutHalAidl::onError() {
void StreamOutHalAidl::onError(bool isHardError) {
    onAsyncError();
    if (auto clientCb = mClientCallback.load().promote(); clientCb != nullptr) {
        clientCb->onError();
        clientCb->onError(isHardError);
    }
}

+1 −1
Original line number Diff line number Diff line
@@ -386,7 +386,7 @@ class StreamOutHalAidl : public virtual StreamOutHalInterface,
    // StreamOutHalInterfaceCallback
    void onWriteReady() override;
    void onDrainReady() override;
    void onError() override;
    void onError(bool isHardError) override;

  private:
    friend class sp<StreamOutHalAidl>;
+1 −1
Original line number Diff line number Diff line
@@ -997,7 +997,7 @@ void StreamOutHalHidl::onError() {
    sp<StreamOutHalInterfaceCallback> callback = mCallback.load().promote();
    if (callback == 0) return;
    ALOGV("asyncCallback onError");
    callback->onError();
    callback->onError(false /*isHardError*/);
}

void StreamOutHalHidl::onCodecFormatChanged(const std::vector<uint8_t>& metadataBs) {
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ class StreamOutHalInterfaceCallback : public virtual RefBase {
  public:
    virtual void onWriteReady() {}
    virtual void onDrainReady() {}
    virtual void onError() {}
    virtual void onError(bool /*isHardError*/) {}

  protected:
    StreamOutHalInterfaceCallback() = default;
Loading