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

Commit 4a8fb90b authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder_ndk: doc common stability error

Ideally we can store in Stability.cpp if stability gets
downgraded without the binder getting used, like other
Binder.cpp 'wasParceled' checks, but we have only seen
this issue one time. Putting a comment for now to
indicate difference (this is not an issue in C++ backend
because Bn* inherits from IBinder, only in NDK backend).

Fixes: 261199113
Test: N/A
Change-Id: I7e98eee2f830ccbf58edb961a5c3fa156c623344
parent 6e5dda51
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -50,6 +50,15 @@ static inline void AIBinder_markCompilationUnitStability(AIBinder* binder) {
 * requirements associated with that higher stability level. For instance, a
 * VINTF stability binder is required to be in the VINTF manifest. This API
 * can be called to use that same interface within the vendor partition.
 *
 * WARNING: you must hold on to a binder instance after this is set, while you
 * are using it. If you get a binder (e.g. `...->asBinder().get()`), you must
 * save this binder and then
 * use it. For instance:
 *
 *     auto binder = ...->asBinder();
 *     AIBinder_forceDowngradeToVendorStability(binder.get());
 *     doSomething(binder);
 */
void AIBinder_forceDowngradeToVendorStability(AIBinder* binder);

@@ -79,6 +88,15 @@ static inline void AIBinder_markCompilationUnitStability(AIBinder* binder) {
 * requirements associated with that higher stability level. For instance, a
 * VINTF stability binder is required to be in the VINTF manifest. This API
 * can be called to use that same interface within the system partition.
 *
 * WARNING: you must hold on to a binder instance after this is set, while you
 * are using it. If you get a binder (e.g. `...->asBinder().get()`), you must
 * save this binder and then
 * use it. For instance:
 *
 *     auto binder = ...->asBinder();
 *     AIBinder_forceDowngradeToSystemStability(binder.get());
 *     doSomething(binder);
 */
void AIBinder_forceDowngradeToSystemStability(AIBinder* binder);