Skip to content

Commit ea6b296

Browse files
Yu-Ting TsengGerrit Code Review
authored andcommitted
Revert "Placeholder for binder freeze notification API."
This reverts commit 4a5441f. Reason for revert: b/351718767 Change-Id: Ic8a6828b72f44746ec925e829748ad53e9050f57
1 parent 4a5441f commit ea6b296

5 files changed

Lines changed: 3 additions & 43 deletions

File tree

libs/binder/Binder.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -441,14 +441,6 @@ status_t BBinder::unlinkToDeath(
441441
return INVALID_OPERATION;
442442
}
443443

444-
status_t BBinder::addFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) {
445-
return INVALID_OPERATION;
446-
}
447-
448-
status_t BBinder::removeFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) {
449-
return INVALID_OPERATION;
450-
}
451-
452444
status_t BBinder::dump(int /*fd*/, const Vector<String16>& /*args*/)
453445
{
454446
return NO_ERROR;

libs/binder/BpBinder.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -557,14 +557,6 @@ void BpBinder::sendObituary()
557557
}
558558
}
559559

560-
status_t BpBinder::addFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) {
561-
return INVALID_OPERATION;
562-
}
563-
564-
status_t BpBinder::removeFrozenStateChangeCallback(const wp<FrozenStateChangeCallback>&) {
565-
return INVALID_OPERATION;
566-
}
567-
568560
void BpBinder::reportOneDeath(const Obituary& obit)
569561
{
570562
sp<DeathRecipient> recipient = obit.recipient.promote();

libs/binder/include/binder/Binder.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ class BBinder : public IBinder {
5050
void* cookie = nullptr, uint32_t flags = 0,
5151
wp<DeathRecipient>* outRecipient = nullptr);
5252

53-
// Placeholders to test if adding virtual functions here breaks things.
54-
// Will be replaced by an actual API once things are verified to work.
55-
LIBBINDER_EXPORTED virtual status_t addFrozenStateChangeCallback(
56-
const wp<FrozenStateChangeCallback>& callback);
57-
LIBBINDER_EXPORTED virtual status_t removeFrozenStateChangeCallback(
58-
const wp<FrozenStateChangeCallback>& callback);
59-
6053
LIBBINDER_EXPORTED virtual void* attachObject(const void* objectID, void* object,
6154
void* cleanupCookie,
6255
object_cleanup_func func) final;

libs/binder/include/binder/BpBinder.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ class BpBinder : public IBinder {
6666
void* cookie = nullptr, uint32_t flags = 0,
6767
wp<DeathRecipient>* outRecipient = nullptr);
6868

69-
[[nodiscard]] virtual status_t addFrozenStateChangeCallback(
70-
const wp<FrozenStateChangeCallback>& recipient);
71-
72-
[[nodiscard]] virtual status_t removeFrozenStateChangeCallback(
73-
const wp<FrozenStateChangeCallback>& recipient);
74-
7569
LIBBINDER_EXPORTED virtual void* attachObject(const void* objectID, void* object,
7670
void* cleanupCookie,
7771
object_cleanup_func func) final;

libs/binder/include/binder/IBinder.h

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,9 @@ class [[clang::lto_visibility_public]] LIBBINDER_EXPORTED IBinder : public virtu
198198
virtual void binderDied(const wp<IBinder>& who) = 0;
199199
};
200200

201-
class FrozenStateChangeCallback : public virtual RefBase {
202-
public:
203-
virtual void onStateChanged(const wp<IBinder>& who, bool isFrozen) = 0;
204-
};
205-
206-
#if defined(__clang__)
207-
#pragma clang diagnostic pop
208-
#endif
201+
#if defined(__clang__)
202+
#pragma clang diagnostic pop
203+
#endif
209204

210205
/**
211206
* Register the @a recipient for a notification if this binder
@@ -254,12 +249,6 @@ class [[clang::lto_visibility_public]] LIBBINDER_EXPORTED IBinder : public virtu
254249
uint32_t flags = 0,
255250
wp<DeathRecipient>* outRecipient = nullptr) = 0;
256251

257-
// Placeholders. See Binder.h for details.
258-
[[nodiscard]] virtual status_t addFrozenStateChangeCallback(
259-
const wp<FrozenStateChangeCallback>& callback) = 0;
260-
[[nodiscard]] virtual status_t removeFrozenStateChangeCallback(
261-
const wp<FrozenStateChangeCallback>& callback) = 0;
262-
263252
virtual bool checkSubclass(const void* subclassID) const;
264253

265254
typedef void (*object_cleanup_func)(const void* id, void* obj, void* cleanupCookie);

0 commit comments

Comments
 (0)