summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Gabriel Biren <gbiren@google.com> 2024-10-23 20:23:36 +0000
committer Gabriel Biren <gbiren@google.com> 2024-10-23 20:41:26 +0000
commit1d716cb1844179db3a42f89cbeb5a5fd64e8a8cb (patch)
tree50fde709d9bb26bea6efae0933e7222bad807e43
parenta74027cfd78da5c2a25814178fc0c20db8e7dc93 (diff)
Remove the service declaration check in the
JNI waitForService wrapper. The mainline supplicant service will not be declared in any matrix. Bug: 365585450 Test: Manual test - retrieve the mainline supplicant service from the framework Flag: com.android.wifi.flags.mainline_supplicant Change-Id: I395cb378d3fa44a66e89f2a8bac18537a82402c6
-rw-r--r--jni/com_android_server_ServiceManagerWrapper.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/jni/com_android_server_ServiceManagerWrapper.cpp b/jni/com_android_server_ServiceManagerWrapper.cpp
index 2a7a37dd80..b13346b092 100644
--- a/jni/com_android_server_ServiceManagerWrapper.cpp
+++ b/jni/com_android_server_ServiceManagerWrapper.cpp
@@ -30,11 +30,7 @@ extern "C" JNIEXPORT jobject JNICALL
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
const char* serviceName = env->GetStringUTFChars(serviceNameJni, nullptr);
- if (AServiceManager_isDeclared(serviceName)) {
- return AIBinder_toJavaBinder(env, AServiceManager_waitForService(serviceName));
- } else {
- return nullptr;
- }
+ return AIBinder_toJavaBinder(env, AServiceManager_waitForService(serviceName));
#pragma clang diagnostic pop
}