Add InterfaceDiedCallback to RemoteCallbackList
Some of the existing uses of RemoteCallbackList extend the class to
override onCallbackDied. However with the Builder pattern it is no
longer possible to do so.
This change offers an alternative that works with the Builder pattern. A
new Builder API setInterfaceDiedCallback() is added to allow the caller
to provide custom death handling logic.
Flag: android.os.binder_frozen_state_change_callback
Test: atest --instant android.os.cts.RemoteCallbackListTest
Bug: 361157077
API-Coverage-Bug: 372923111
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5a0bc1ef9f697dbc973480b5aba4c07d420711a7)
Merged-In: Ib777d9920d8332a09a6da3601ad3bab071fb9cba
Change-Id: Ib777d9920d8332a09a6da3601ad3bab071fb9cba
Original patch:
From 5a0bc1ef9f697dbc973480b5aba4c07d420711a7 Mon Sep 17 00:00:00 2001
From: Yu-Ting Tseng <yutingtseng@google.com>
Date: Mon, 14 Oct 2024 14:13:43 -0700
Subject: [PATCH] Add InterfaceDiedCallback to RemoteCallbackList
Some of the existing uses of RemoteCallbackList extend the class to
override onCallbackDied. However with the Builder pattern it is no
longer possible to do so.
This change offers an alternative that works with the Builder pattern. A
new Builder API setInterfaceDiedCallback() is added to allow the caller
to provide custom death handling logic.
Flag: android.os.binder_frozen_state_change_callback
Change-Id: Ib777d9920d8332a09a6da3601ad3bab071fb9cba
Test: atest --instant android.os.cts.RemoteCallbackListTest
Bug: 361157077
API-Coverage-Bug: 372923111
---
3 files changed