Loading libs/binder/Binder.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -441,6 +441,14 @@ status_t BBinder::unlinkToDeath( return INVALID_OPERATION; } status_t BBinder::addFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) { return INVALID_OPERATION; } status_t BBinder::removeFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) { return INVALID_OPERATION; } status_t BBinder::dump(int /*fd*/, const Vector<String16>& /*args*/) { return NO_ERROR; Loading libs/binder/BpBinder.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -557,6 +557,14 @@ void BpBinder::sendObituary() } } status_t BpBinder::addFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) { return INVALID_OPERATION; } status_t BpBinder::removeFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) { return INVALID_OPERATION; } void BpBinder::reportOneDeath(const Obituary& obit) { sp<DeathRecipient> recipient = obit.recipient.promote(); Loading libs/binder/include/binder/Binder.h +7 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,13 @@ public: void* cookie = nullptr, uint32_t flags = 0, wp<DeathRecipient>* outRecipient = nullptr); // Placeholders to test if adding virtual functions here breaks things. // Will be replaced by an actual API once things are verified to work. LIBBINDER_EXPORTED virtual status_t addFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& callback); LIBBINDER_EXPORTED virtual status_t removeFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& callback); LIBBINDER_EXPORTED virtual void* attachObject(const void* objectID, void* object, void* cleanupCookie, object_cleanup_func func) final; Loading libs/binder/include/binder/BpBinder.h +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ public: void* cookie = nullptr, uint32_t flags = 0, wp<DeathRecipient>* outRecipient = nullptr); [[nodiscard]] virtual status_t addFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& recipient); [[nodiscard]] virtual status_t removeFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& recipient); LIBBINDER_EXPORTED virtual void* attachObject(const void* objectID, void* object, void* cleanupCookie, object_cleanup_func func) final; Loading libs/binder/include/binder/IBinder.h +14 −3 Original line number Diff line number Diff line Loading @@ -198,6 +198,11 @@ public: virtual void binderDied(const wp<IBinder>& who) = 0; }; class FrozenStateChangeCallback : public virtual RefBase { public: virtual void onStateChanged(const wp<IBinder>& who, bool isFrozen) = 0; }; #if defined(__clang__) #pragma clang diagnostic pop #endif Loading Loading @@ -249,6 +254,12 @@ public: uint32_t flags = 0, wp<DeathRecipient>* outRecipient = nullptr) = 0; // Placeholders. See Binder.h for details. [[nodiscard]] virtual status_t addFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& callback) = 0; [[nodiscard]] virtual status_t removeFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& callback) = 0; virtual bool checkSubclass(const void* subclassID) const; typedef void (*object_cleanup_func)(const void* id, void* obj, void* cleanupCookie); Loading Loading
libs/binder/Binder.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -441,6 +441,14 @@ status_t BBinder::unlinkToDeath( return INVALID_OPERATION; } status_t BBinder::addFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) { return INVALID_OPERATION; } status_t BBinder::removeFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) { return INVALID_OPERATION; } status_t BBinder::dump(int /*fd*/, const Vector<String16>& /*args*/) { return NO_ERROR; Loading
libs/binder/BpBinder.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -557,6 +557,14 @@ void BpBinder::sendObituary() } } status_t BpBinder::addFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) { return INVALID_OPERATION; } status_t BpBinder::removeFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) { return INVALID_OPERATION; } void BpBinder::reportOneDeath(const Obituary& obit) { sp<DeathRecipient> recipient = obit.recipient.promote(); Loading
libs/binder/include/binder/Binder.h +7 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,13 @@ public: void* cookie = nullptr, uint32_t flags = 0, wp<DeathRecipient>* outRecipient = nullptr); // Placeholders to test if adding virtual functions here breaks things. // Will be replaced by an actual API once things are verified to work. LIBBINDER_EXPORTED virtual status_t addFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& callback); LIBBINDER_EXPORTED virtual status_t removeFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& callback); LIBBINDER_EXPORTED virtual void* attachObject(const void* objectID, void* object, void* cleanupCookie, object_cleanup_func func) final; Loading
libs/binder/include/binder/BpBinder.h +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ public: void* cookie = nullptr, uint32_t flags = 0, wp<DeathRecipient>* outRecipient = nullptr); [[nodiscard]] virtual status_t addFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& recipient); [[nodiscard]] virtual status_t removeFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& recipient); LIBBINDER_EXPORTED virtual void* attachObject(const void* objectID, void* object, void* cleanupCookie, object_cleanup_func func) final; Loading
libs/binder/include/binder/IBinder.h +14 −3 Original line number Diff line number Diff line Loading @@ -198,6 +198,11 @@ public: virtual void binderDied(const wp<IBinder>& who) = 0; }; class FrozenStateChangeCallback : public virtual RefBase { public: virtual void onStateChanged(const wp<IBinder>& who, bool isFrozen) = 0; }; #if defined(__clang__) #pragma clang diagnostic pop #endif Loading Loading @@ -249,6 +254,12 @@ public: uint32_t flags = 0, wp<DeathRecipient>* outRecipient = nullptr) = 0; // Placeholders. See Binder.h for details. [[nodiscard]] virtual status_t addFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& callback) = 0; [[nodiscard]] virtual status_t removeFrozenStateChangeCallback( const wp<FrozenStateChangeCallback>& callback) = 0; virtual bool checkSubclass(const void* subclassID) const; typedef void (*object_cleanup_func)(const void* id, void* obj, void* cleanupCookie); Loading