Skip to content
Snippets Groups Projects
Commit eb08e8cd authored by Kangping Dong's avatar Kangping Dong Committed by Gerrit Code Review
Browse files

Merge "suppress unguarded-availability warning for only AServiceManager_waitForService" into main

parents dff6b916 26b9f22b
No related branches found
No related tags found
No related merge requests found
......@@ -107,10 +107,6 @@ cc_library_shared {
"-Werror",
"-Wno-unused-parameter",
"-Wthread-safety",
// AServiceManager_waitForService is available on only 31+, but it's still safe for Thread
// service because it's enabled on only 34+
"-Wno-unguarded-availability",
],
srcs: [
":services.connectivity-netstats-jni-sources",
......
......@@ -25,7 +25,13 @@ namespace android {
static jobject com_android_server_ServiceManagerWrapper_waitForService(
JNIEnv* env, jobject clazz, jstring serviceName) {
ScopedUtfChars name(env, serviceName);
// AServiceManager_waitForService is available on only 31+, but it's still safe for Thread
// service because it's enabled on only 34+
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
return AIBinder_toJavaBinder(env, AServiceManager_waitForService(name.c_str()));
#pragma clang diagnostic pop
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment