Skip to content

Commit 1edb3ad

Browse files
devinmoore-googAndroid (Google) Code Review
authored andcommitted
Merge "Add DUMP_FLAG_PROTO to libbinder_ndk" into main
2 parents 8d90063 + ebfb6bb commit 1edb3ad

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

libs/binder/ndk/include_platform/android/binder_manager.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@ enum AServiceManager_AddServiceFlag : uint32_t {
3030
* not be added with this flag for privacy concerns.
3131
*/
3232
ADD_SERVICE_ALLOW_ISOLATED = 1 << 0,
33+
/**
34+
* Allows services to dump sections according to priorities and format
35+
*/
3336
ADD_SERVICE_DUMP_FLAG_PRIORITY_CRITICAL = 1 << 1,
3437
ADD_SERVICE_DUMP_FLAG_PRIORITY_HIGH = 1 << 2,
3538
ADD_SERVICE_DUMP_FLAG_PRIORITY_NORMAL = 1 << 3,
3639
ADD_SERVICE_DUMP_FLAG_PRIORITY_DEFAULT = 1 << 4,
40+
ADD_SERVICE_DUMP_FLAG_PROTO = 1 << 5,
3741
// All other bits are reserved for internal usage
3842
};
3943

libs/binder/ndk/service_manager.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ binder_exception_t AServiceManager_addServiceWithFlags(AIBinder* binder, const c
6363
if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_DEFAULT) {
6464
dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_DEFAULT;
6565
}
66+
if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PROTO) {
67+
dumpFlags |= IServiceManager::DUMP_FLAG_PROTO;
68+
}
6669
if (dumpFlags == 0) {
6770
dumpFlags = IServiceManager::DUMP_FLAG_PRIORITY_DEFAULT;
6871
}

0 commit comments

Comments
 (0)