From e5a6a878342978f13ba5c174c1dfb337173e1939 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 19 May 2021 22:11:37 +0000 Subject: Expose binder stability for debugging in dumpsys See if a service is coupled with the system/core build variant or build variant (or if the service has 'vintf' stability - meaning it is used as a HAL). This will also print additional information about the version of the binder wire protocol that is being used by this object (currently everything uses the same version - this may be the case for a while). Fixes: 184062810 Test: dumpsys_test Test: manually running 'dumpsys --stability' and 'dumpsys --help' Change-Id: Ia9f1d011ef28a9d62a3076fa497ebb33ed53fe0a --- libs/binder/Stability.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/binder/Stability.cpp') diff --git a/libs/binder/Stability.cpp b/libs/binder/Stability.cpp index 709cf67127..601ce96db6 100644 --- a/libs/binder/Stability.cpp +++ b/libs/binder/Stability.cpp @@ -79,9 +79,9 @@ void Stability::markVintf(IBinder* binder) { LOG_ALWAYS_FATAL_IF(result != OK, "Should only mark known object."); } -void Stability::debugLogStability(const std::string& tag, const sp& binder) { +std::string Stability::debugToString(const sp& binder) { auto stability = getCategory(binder.get()); - ALOGE("%s: stability is %s", tag.c_str(), stability.debugString().c_str()); + return stability.debugString(); } void Stability::markVndk(IBinder* binder) { -- cgit v1.2.3-59-g8ed1b