summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hongguang Chen <hgchen@google.com> 2024-07-08 16:34:50 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-07-08 16:34:50 +0000
commit5a1c5a12a5f0453286c9e722e3c36daa7b71832f (patch)
treef9faac24381d4434ce90dea55477d7485fd211ec
parent370f3da6688fafa8131b597a2b2d86492bcaa9de (diff)
parentea6b29656befa3829850221a2d11f29dceb609ab (diff)
Merge "Revert "Placeholder for binder freeze notification API."" into main
-rw-r--r--libs/binder/Binder.cpp8
-rw-r--r--libs/binder/BpBinder.cpp8
-rw-r--r--libs/binder/include/binder/Binder.h7
-rw-r--r--libs/binder/include/binder/BpBinder.h6
-rw-r--r--libs/binder/include/binder/IBinder.h17
5 files changed, 3 insertions, 43 deletions
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
index 6185b7baf8..c57c9cdd62 100644
--- a/libs/binder/Binder.cpp
+++ b/libs/binder/Binder.cpp
@@ -441,14 +441,6 @@ 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;
diff --git a/libs/binder/BpBinder.cpp b/libs/binder/BpBinder.cpp
index 59c5be75ac..6594aa6309 100644
--- a/libs/binder/BpBinder.cpp
+++ b/libs/binder/BpBinder.cpp
@@ -557,14 +557,6 @@ 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();
diff --git a/libs/binder/include/binder/Binder.h b/libs/binder/include/binder/Binder.h
index 802a3bcd06..135be89c6c 100644
--- a/libs/binder/include/binder/Binder.h
+++ b/libs/binder/include/binder/Binder.h
@@ -50,13 +50,6 @@ 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;
diff --git a/libs/binder/include/binder/BpBinder.h b/libs/binder/include/binder/BpBinder.h
index 0f52f6df52..d7f74c4152 100644
--- a/libs/binder/include/binder/BpBinder.h
+++ b/libs/binder/include/binder/BpBinder.h
@@ -66,12 +66,6 @@ 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;
diff --git a/libs/binder/include/binder/IBinder.h b/libs/binder/include/binder/IBinder.h
index 62d7354387..17248ce289 100644
--- a/libs/binder/include/binder/IBinder.h
+++ b/libs/binder/include/binder/IBinder.h
@@ -198,14 +198,9 @@ 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
+ #if defined(__clang__)
+ #pragma clang diagnostic pop
+ #endif
/**
* Register the @a recipient for a notification if this binder
@@ -254,12 +249,6 @@ 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);