Add lock guards to performance hint NDK

Test: atest PerformanceHintNativeTest
Bug: 343817997
Change-Id: Ic48949252be3122e2e13cfa5979f8831aea72a93
diff --git a/native/android/Android.bp b/native/android/Android.bp
index 8945bd1..c4c4102 100644
--- a/native/android/Android.bp
+++ b/native/android/Android.bp
@@ -41,6 +41,7 @@
         "-Wextra",
         "-Wunused",
         "-Wunreachable-code",
+        "-Wthread-safety",
     ],
 }