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

Commit d6c29636 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[audio] Handle DEAD_OBJECT from system server" into main

parents a9bb7075 145737c2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -35,11 +35,11 @@ public:
    {
    }

    // This should never fail
    virtual sp<media::IAudioManagerNative> getNativeInterface() {
        Parcel data, reply;
        data.writeInterfaceToken(IAudioManager::getInterfaceDescriptor());
        const status_t res = remote()->transact(GET_NATIVE_INTERFACE, data, &reply, 0);
        if (res == DEAD_OBJECT) return nullptr;
        LOG_ALWAYS_FATAL_IF(res != OK, "%s failed with result %d", __func__, res);
        const int ex = reply.readExceptionCode();
        LOG_ALWAYS_FATAL_IF(ex != binder::Status::EX_NONE, "%s failed with exception %d",
@@ -48,7 +48,7 @@ public:
        sp<IBinder> binder;
        const status_t err = reply.readNullableStrongBinder(&binder);
        LOG_ALWAYS_FATAL_IF(binder == nullptr, "%s failed unexpected nullptr %d", __func__, err);
        const auto iface = checked_interface_cast<media::IAudioManagerNative>(std::move(binder));
        const auto iface = checked_interface_cast<media::IAudioManagerNative>(binder);
        LOG_ALWAYS_FATAL_IF(iface == nullptr, "%s failed unexpected interface", __func__);
        return iface;
    }