@@ -224,8 +224,10 @@ void AIBinder_Class_setOnDump(AIBinder_Class* clazz, AIBinder_onDump onDump) __I
224224 *
225225 * Trace messages will use the provided names instead of bare integer codes when set. If not set by
226226 * this function, trace messages will only be identified by the bare code. This should be called one
227- * time during clazz initialization. clazz and transactionCodeToFunctionMap should have same
228- * lifetime. Resetting/clearing the transactionCodeToFunctionMap is not allowed.
227+ * time during clazz initialization. clazz is defined using AIBinder_Class_define and
228+ * transactionCodeToFunctionMap should have same scope as clazz. Resetting/clearing the
229+ * transactionCodeToFunctionMap is not allowed. Passing null for either clazz or
230+ * transactionCodeToFunctionMap will abort.
229231 *
230232 * Available since API level 36.
231233 *
@@ -236,9 +238,6 @@ void AIBinder_Class_setOnDump(AIBinder_Class* clazz, AIBinder_onDump onDump) __I
236238 * contiguous, and this is required for maximum memory efficiency.
237239 * You can use nullptr if certain transaction codes are not used. Lifetime should be same as clazz.
238240 * \param length number of elements in the transactionCodeToFunctionMap
239- *
240- * \return true if setting codeToFunction to clazz is successful. return false if clazz or
241- * codeToFunction is nullptr.
242241 */
243242void AIBinder_Class_setTransactionCodeToFunctionNameMap (AIBinder_Class* clazz,
244243 const char ** transactionCodeToFunctionMap,
@@ -257,7 +256,8 @@ void AIBinder_Class_setTransactionCodeToFunctionNameMap(AIBinder_Class* clazz,
257256 * \param transactionCode transaction_code_t for which function name is requested.
258257 *
259258 * \return function name in form of const char* if transaction code is valid for given class.
260- * if transaction code is invalid or transactionCodeToFunctionMap is not set, nullptr is returned
259+ * The value returned is valid for the lifetime of clazz. if transaction code is invalid or
260+ * transactionCodeToFunctionMap is not set, nullptr is returned.
261261 */
262262const char * AIBinder_Class_getFunctionName (AIBinder_Class* clazz, transaction_code_t code)
263263 __INTRODUCED_IN(36 );
0 commit comments