Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2acb59ca authored by Daniel Norman's avatar Daniel Norman
Browse files

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
parent a578e93e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ cc_defaults {
                "libsync",
                "libui",
                "aconfig_text_flags_c_lib",
                "aconfig_view_accessibility_flags_c_lib",
                "server_configurable_flags",
                "libaconfig_storage_read_api_cc",
                "libgraphicsenv",
+14 −0
Original line number Diff line number Diff line
@@ -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