summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author Xiang Wang <xwxw@google.com> 2024-12-27 00:13:07 -0800
committer Xiang Wang <xwxw@google.com> 2025-01-07 09:58:31 -0800
commitae83ef29cf1fdca7b9d7c71bfb5e0145e38ce4c9 (patch)
tree1bd53fcab8b71531d1ba2417718c94feac6e1fbc /include
parent9bf3e87d645649bc7f29a3e46d9cad090a6d2ce2 (diff)
Add a private API to set mocking hint manager for testing
Updated the doc of interval methods as they won't fail now Bug: 346604998 Flag: EXEMPT ndk Test: atest NativeSystemHealthUnitTest SystemHealthManagerUnitTest NativeSystemHealthTest HeadroomTest Change-Id: Ia8a3d921f831ee0c07b16926500581fc2a8d5b00
Diffstat (limited to 'include')
-rw-r--r--include/android/system_health.h2
-rw-r--r--include/private/system_health_private.h32
2 files changed, 32 insertions, 2 deletions
diff --git a/include/android/system_health.h b/include/android/system_health.h
index 6d59706490..bdb1413555 100644
--- a/include/android/system_health.h
+++ b/include/android/system_health.h
@@ -417,7 +417,6 @@ __INTRODUCED_IN(36);
* @param outMinIntervalMillis Non-null output pointer to a int64_t, which
* will be set to the minimum polling interval in milliseconds.
* @return 0 on success.
- * EPIPE if failed to get the minimum polling interval.
* ENOTSUP if API is unsupported.
*/
int ASystemHealth_getCpuHeadroomMinIntervalMillis(int64_t* _Nonnull outMinIntervalMillis)
@@ -434,7 +433,6 @@ __INTRODUCED_IN(36);
* @param outMinIntervalMillis Non-null output pointer to a int64_t, which
* will be set to the minimum polling interval in milliseconds.
* @return 0 on success.
- * EPIPE if failed to get the minimum polling interval.
* ENOTSUP if API is unsupported.
*/
int ASystemHealth_getGpuHeadroomMinIntervalMillis(int64_t* _Nonnull outMinIntervalMillis)
diff --git a/include/private/system_health_private.h b/include/private/system_health_private.h
new file mode 100644
index 0000000000..05a5a06c9c
--- /dev/null
+++ b/include/private/system_health_private.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_PRIVATE_NATIVE_SYSTEM_HEALTH_H
+#define ANDROID_PRIVATE_NATIVE_SYSTEM_HEALTH_H
+
+#include <stdint.h>
+
+__BEGIN_DECLS
+
+/**
+ * For testing only.
+ */
+void ASystemHealth_setIHintManagerForTesting(void* iManager);
+
+__END_DECLS
+
+#endif // ANDROID_PRIVATE_NATIVE_SYSTEM_HEALTH_H
+