summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}