summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pechetty Sravani <pechetty@google.com> 2024-06-06 05:32:35 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-06-06 05:32:35 +0000
commit3d9a9d418591f8040a11a06054c203edd9d50b10 (patch)
tree9f49f6379427ebdec0eeb1286582721915b66ea8
parente2555ea7a3a7affc512791c34d02608bfcb074ef (diff)
parent721ca9e5ff8634d0ea746f8e0d6a8b2ac217f4f0 (diff)
Merge "Revert "Add addService to pass in dump priority flags."" into main
-rw-r--r--libs/binder/ndk/include_platform/android/binder_manager.h6
-rw-r--r--libs/binder/ndk/service_manager.cpp20
2 files changed, 2 insertions, 24 deletions
diff --git a/libs/binder/ndk/include_platform/android/binder_manager.h b/libs/binder/ndk/include_platform/android/binder_manager.h
index 41b30a0a0f..52edae4a38 100644
--- a/libs/binder/ndk/include_platform/android/binder_manager.h
+++ b/libs/binder/ndk/include_platform/android/binder_manager.h
@@ -30,11 +30,7 @@ enum AServiceManager_AddServiceFlag : uint32_t {
* Services with methods that perform file IO, web socket creation or ways to egress data must
* not be added with this flag for privacy concerns.
*/
- ADD_SERVICE_ALLOW_ISOLATED = 1 << 0,
- ADD_SERVICE_DUMP_FLAG_PRIORITY_CRITICAL = 1 << 1,
- ADD_SERVICE_DUMP_FLAG_PRIORITY_HIGH = 1 << 2,
- ADD_SERVICE_DUMP_FLAG_PRIORITY_NORMAL = 1 << 3,
- ADD_SERVICE_DUMP_FLAG_PRIORITY_DEFAULT = 1 << 4,
+ ADD_SERVICE_ALLOW_ISOLATED = 1,
};
/**
diff --git a/libs/binder/ndk/service_manager.cpp b/libs/binder/ndk/service_manager.cpp
index 4436dbeed7..5529455cc6 100644
--- a/libs/binder/ndk/service_manager.cpp
+++ b/libs/binder/ndk/service_manager.cpp
@@ -49,25 +49,7 @@ binder_exception_t AServiceManager_addServiceWithFlags(AIBinder* binder, const c
sp<IServiceManager> sm = defaultServiceManager();
bool allowIsolated = flags & AServiceManager_AddServiceFlag::ADD_SERVICE_ALLOW_ISOLATED;
- int dumpFlags = 0;
- if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_CRITICAL) {
- dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_CRITICAL;
- }
- if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_HIGH) {
- dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_HIGH;
- }
- if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_NORMAL) {
- dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_NORMAL;
- }
- if (flags & AServiceManager_AddServiceFlag::ADD_SERVICE_DUMP_FLAG_PRIORITY_DEFAULT) {
- dumpFlags |= IServiceManager::DUMP_FLAG_PRIORITY_DEFAULT;
- }
- if (dumpFlags == 0) {
- dumpFlags = IServiceManager::DUMP_FLAG_PRIORITY_DEFAULT;
- }
- status_t exception =
- sm->addService(String16(instance), binder->getBinder(), allowIsolated, dumpFlags);
-
+ status_t exception = sm->addService(String16(instance), binder->getBinder(), allowIsolated);
return PruneException(exception);
}