diff options
author | 2025-02-15 01:35:37 +0000 | |
---|---|---|
committer | 2025-02-21 12:34:09 -0800 | |
commit | 2acb59ca9d9ea5d6ce43e0fed1e1821d148b0e8f (patch) | |
tree | c60a0a19fec4ac0ba044677ff45ac56a9ae32796 /libs/hwui/FeatureFlags.h | |
parent | a578e93e9cb443624eced52dd135a4ab0b8e3457 (diff) |
feat(force invert): import a11y aconfig flags for use in hwui
Bug: 372561761
Test: n/a (used in child changes)
Flag: android.view.accessibility.force_invert_color
Change-Id: I59e354636eabeebcf85be5886a2d7d8554725146
Diffstat (limited to 'libs/hwui/FeatureFlags.h')
-rw-r--r-- | libs/hwui/FeatureFlags.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/hwui/FeatureFlags.h b/libs/hwui/FeatureFlags.h index 5f84f47b725d..5ceb97cef17f 100644 --- a/libs/hwui/FeatureFlags.h +++ b/libs/hwui/FeatureFlags.h @@ -18,6 +18,7 @@ #define ANDROID_HWUI_FEATURE_FLAGS_H #ifdef __ANDROID__ +#include <android_view_accessibility.h> #include <com_android_text_flags.h> #endif // __ANDROID__ @@ -44,6 +45,19 @@ inline bool typeface_redesign_readonly() { } // namespace text_feature +namespace view_accessibility_flags { + +inline bool force_invert_color() { +#ifdef __ANDROID__ + static bool flag = android::view::accessibility::force_invert_color(); + return flag; +#else + return true; +#endif // __ANDROID__ +} + +} // namespace view_accessibility_flags + } // namespace android #endif // ANDROID_HWUI_FEATURE_FLAGS_H |