1 #pragma once 2 3 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS 4 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS(FLAG) COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_##FLAG 5 #endif 6 7 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ALWAYS_ROTATE_DISPLAY_DEVICE 8 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ALWAYS_ROTATE_DISPLAY_DEVICE true 9 #endif 10 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_AUTO_BRIGHTNESS_MODE_BEDTIME_WEAR 11 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_AUTO_BRIGHTNESS_MODE_BEDTIME_WEAR false 12 #endif 13 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_AUTO_BRIGHTNESS_MODES 14 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_AUTO_BRIGHTNESS_MODES true 15 #endif 16 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BACK_UP_SMOOTH_DISPLAY_AND_FORCE_PEAK_REFRESH_RATE 17 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BACK_UP_SMOOTH_DISPLAY_AND_FORCE_PEAK_REFRESH_RATE true 18 #endif 19 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BLOCK_AUTOBRIGHTNESS_CHANGES_ON_STYLUS_USAGE 20 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BLOCK_AUTOBRIGHTNESS_CHANGES_ON_STYLUS_USAGE true 21 #endif 22 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BRIGHTNESS_INT_RANGE_USER_PERCEPTION 23 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BRIGHTNESS_INT_RANGE_USER_PERCEPTION false 24 #endif 25 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BRIGHTNESS_WEAR_BEDTIME_MODE_CLAMPER 26 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BRIGHTNESS_WEAR_BEDTIME_MODE_CLAMPER true 27 #endif 28 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_DISPLAY_LISTENER_PERFORMANCE_IMPROVEMENTS 29 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_DISPLAY_LISTENER_PERFORMANCE_IMPROVEMENTS false 30 #endif 31 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_DISPLAY_TOPOLOGY 32 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_DISPLAY_TOPOLOGY false 33 #endif 34 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_ADAPTIVE_TONE_IMPROVEMENTS_1 35 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_ADAPTIVE_TONE_IMPROVEMENTS_1 true 36 #endif 37 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_ADAPTIVE_TONE_IMPROVEMENTS_2 38 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_ADAPTIVE_TONE_IMPROVEMENTS_2 true 39 #endif 40 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_APPLY_DISPLAY_CHANGED_DURING_DISPLAY_ADDED 41 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_APPLY_DISPLAY_CHANGED_DURING_DISPLAY_ADDED true 42 #endif 43 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_BATTERY_STATS_FOR_ALL_DISPLAYS 44 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_BATTERY_STATS_FOR_ALL_DISPLAYS false 45 #endif 46 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_CONNECTED_DISPLAY_ERROR_HANDLING 47 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_CONNECTED_DISPLAY_ERROR_HANDLING true 48 #endif 49 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_CONNECTED_DISPLAY_MANAGEMENT 50 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_CONNECTED_DISPLAY_MANAGEMENT true 51 #endif 52 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT 53 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT false 54 #endif 55 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_DISPLAY_OFFLOAD 56 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_DISPLAY_OFFLOAD true 57 #endif 58 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_DISPLAY_RESOLUTION_RANGE_VOTING 59 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_DISPLAY_RESOLUTION_RANGE_VOTING false 60 #endif 61 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_GET_SUGGESTED_FRAME_RATE 62 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_GET_SUGGESTED_FRAME_RATE false 63 #endif 64 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_GET_SUPPORTED_REFRESH_RATES 65 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_GET_SUPPORTED_REFRESH_RATES false 66 #endif 67 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_HAS_ARR_SUPPORT 68 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_HAS_ARR_SUPPORT false 69 #endif 70 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_HDR_CLAMPER 71 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_HDR_CLAMPER true 72 #endif 73 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_MODE_LIMIT_FOR_EXTERNAL_DISPLAY 74 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_MODE_LIMIT_FOR_EXTERNAL_DISPLAY true 75 #endif 76 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_NBM_CONTROLLER 77 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_NBM_CONTROLLER true 78 #endif 79 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PEAK_REFRESH_RATE_PHYSICAL_LIMIT 80 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PEAK_REFRESH_RATE_PHYSICAL_LIMIT true 81 #endif 82 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PIXEL_ANISOTROPY_CORRECTION 83 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PIXEL_ANISOTROPY_CORRECTION true 84 #endif 85 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PLUGIN_MANAGER 86 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PLUGIN_MANAGER false 87 #endif 88 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PORT_IN_DISPLAY_LAYOUT 89 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PORT_IN_DISPLAY_LAYOUT true 90 #endif 91 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_POWER_THROTTLING_CLAMPER 92 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_POWER_THROTTLING_CLAMPER true 93 #endif 94 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_RESTRICT_DISPLAY_MODES 95 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_RESTRICT_DISPLAY_MODES true 96 #endif 97 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_SYNTHETIC_60HZ_MODES 98 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_SYNTHETIC_60HZ_MODES true 99 #endif 100 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_USER_PREFERRED_MODE_VOTE 101 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_USER_PREFERRED_MODE_VOTE false 102 #endif 103 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_USER_REFRESH_RATE_FOR_EXTERNAL_DISPLAY 104 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_USER_REFRESH_RATE_FOR_EXTERNAL_DISPLAY true 105 #endif 106 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_VSYNC_LOW_LIGHT_VOTE 107 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_VSYNC_LOW_LIGHT_VOTE true 108 #endif 109 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_VSYNC_LOW_POWER_VOTE 110 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_VSYNC_LOW_POWER_VOTE true 111 #endif 112 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_WAITING_CONFIRMATION_BEFORE_MIRRORING 113 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_WAITING_CONFIRMATION_BEFORE_MIRRORING true 114 #endif 115 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_EVEN_DIMMER 116 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_EVEN_DIMMER false 117 #endif 118 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_FAST_HDR_TRANSITIONS 119 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_FAST_HDR_TRANSITIONS true 120 #endif 121 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_HIGHEST_HDR_SDR_RATIO_API 122 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_HIGHEST_HDR_SDR_RATIO_API false 123 #endif 124 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IDLE_SCREEN_CONFIG_IN_SUBSCRIBING_LIGHT_SENSOR 125 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IDLE_SCREEN_CONFIG_IN_SUBSCRIBING_LIGHT_SENSOR true 126 #endif 127 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IDLE_SCREEN_REFRESH_RATE_TIMEOUT 128 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IDLE_SCREEN_REFRESH_RATE_TIMEOUT true 129 #endif 130 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IGNORE_APP_PREFERRED_REFRESH_RATE_REQUEST 131 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IGNORE_APP_PREFERRED_REFRESH_RATE_REQUEST true 132 #endif 133 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IS_ALWAYS_ON_AVAILABLE_API 134 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IS_ALWAYS_ON_AVAILABLE_API false 135 #endif 136 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_NEW_HDR_BRIGHTNESS_MODIFIER 137 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_NEW_HDR_BRIGHTNESS_MODIFIER true 138 #endif 139 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_NORMAL_BRIGHTNESS_FOR_DOZE_PARAMETER 140 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_NORMAL_BRIGHTNESS_FOR_DOZE_PARAMETER false 141 #endif 142 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_OFFLOAD_CONTROLS_DOZE_AUTO_BRIGHTNESS 143 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_OFFLOAD_CONTROLS_DOZE_AUTO_BRIGHTNESS true 144 #endif 145 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_OFFLOAD_DOZE_OVERRIDE_HOLDS_WAKELOCK 146 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_OFFLOAD_DOZE_OVERRIDE_HOLDS_WAKELOCK true 147 #endif 148 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_OFFLOAD_SESSION_CANCEL_BLOCK_SCREEN_ON 149 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_OFFLOAD_SESSION_CANCEL_BLOCK_SCREEN_ON true 150 #endif 151 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_REFACTOR_DISPLAY_POWER_CONTROLLER 152 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_REFACTOR_DISPLAY_POWER_CONTROLLER true 153 #endif 154 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_REFRESH_RATE_VOTING_TELEMETRY 155 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_REFRESH_RATE_VOTING_TELEMETRY true 156 #endif 157 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_RESOLUTION_BACKUP_RESTORE 158 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_RESOLUTION_BACKUP_RESTORE true 159 #endif 160 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_SENSOR_BASED_BRIGHTNESS_THROTTLING 161 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_SENSOR_BASED_BRIGHTNESS_THROTTLING true 162 #endif 163 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_SUBSCRIBE_GRANULAR_DISPLAY_EVENTS 164 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_SUBSCRIBE_GRANULAR_DISPLAY_EVENTS false 165 #endif 166 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_USE_FUSION_PROX_SENSOR 167 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_USE_FUSION_PROX_SENSOR true 168 #endif 169 #ifndef COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_VIRTUAL_DISPLAY_LIMIT 170 #define COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_VIRTUAL_DISPLAY_LIMIT false 171 #endif 172 173 #ifdef __cplusplus 174 175 #include <memory> 176 177 namespace com::android::server::display::feature::flags { 178 179 class flag_provider_interface { 180 public: 181 virtual ~flag_provider_interface() = default; 182 virtual bool always_rotate_display_device() = 0; 183 virtual bool auto_brightness_mode_bedtime_wear() = 0; 184 virtual bool auto_brightness_modes() = 0; 185 virtual bool back_up_smooth_display_and_force_peak_refresh_rate() = 0; 186 virtual bool block_autobrightness_changes_on_stylus_usage() = 0; 187 virtual bool brightness_int_range_user_perception() = 0; 188 virtual bool brightness_wear_bedtime_mode_clamper() = 0; 189 virtual bool display_listener_performance_improvements() = 0; 190 virtual bool display_topology() = 0; 191 virtual bool doze_brightness_float() = 0; 192 virtual bool enable_adaptive_tone_improvements_1() = 0; 193 virtual bool enable_adaptive_tone_improvements_2() = 0; 194 virtual bool enable_apply_display_changed_during_display_added() = 0; 195 virtual bool enable_battery_stats_for_all_displays() = 0; 196 virtual bool enable_connected_display_error_handling() = 0; 197 virtual bool enable_connected_display_management() = 0; 198 virtual bool enable_display_content_mode_management() = 0; 199 virtual bool enable_display_offload() = 0; 200 virtual bool enable_display_resolution_range_voting() = 0; 201 virtual bool enable_displays_refresh_rates_synchronization() = 0; 202 virtual bool enable_get_suggested_frame_rate() = 0; 203 virtual bool enable_get_supported_refresh_rates() = 0; 204 virtual bool enable_has_arr_support() = 0; 205 virtual bool enable_hdr_clamper() = 0; 206 virtual bool enable_mode_limit_for_external_display() = 0; 207 virtual bool enable_nbm_controller() = 0; 208 virtual bool enable_peak_refresh_rate_physical_limit() = 0; 209 virtual bool enable_pixel_anisotropy_correction() = 0; 210 virtual bool enable_plugin_manager() = 0; 211 virtual bool enable_port_in_display_layout() = 0; 212 virtual bool enable_power_throttling_clamper() = 0; 213 virtual bool enable_restrict_display_modes() = 0; 214 virtual bool enable_synthetic_60hz_modes() = 0; 215 virtual bool enable_user_preferred_mode_vote() = 0; 216 virtual bool enable_user_refresh_rate_for_external_display() = 0; 217 virtual bool enable_vsync_low_light_vote() = 0; 218 virtual bool enable_vsync_low_power_vote() = 0; 219 virtual bool enable_waiting_confirmation_before_mirroring() = 0; 220 virtual bool even_dimmer() = 0; 221 virtual bool fast_hdr_transitions() = 0; 222 virtual bool highest_hdr_sdr_ratio_api() = 0; 223 virtual bool idle_screen_config_in_subscribing_light_sensor() = 0; 224 virtual bool idle_screen_refresh_rate_timeout() = 0; 225 virtual bool ignore_app_preferred_refresh_rate_request() = 0; 226 virtual bool is_always_on_available_api() = 0; 227 virtual bool new_hdr_brightness_modifier() = 0; 228 virtual bool normal_brightness_for_doze_parameter() = 0; 229 virtual bool offload_controls_doze_auto_brightness() = 0; 230 virtual bool offload_doze_override_holds_wakelock() = 0; 231 virtual bool offload_session_cancel_block_screen_on() = 0; 232 virtual bool refactor_display_power_controller() = 0; 233 virtual bool refresh_rate_voting_telemetry() = 0; 234 virtual bool resolution_backup_restore() = 0; 235 virtual bool sensor_based_brightness_throttling() = 0; 236 virtual bool subscribe_granular_display_events() = 0; 237 virtual bool use_fusion_prox_sensor() = 0; 238 virtual bool virtual_display_limit() = 0; 239 }; 240 241 extern std::unique_ptr<flag_provider_interface> provider_; 242 243 always_rotate_display_device()244inline bool always_rotate_display_device() { 245 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ALWAYS_ROTATE_DISPLAY_DEVICE; 246 } auto_brightness_mode_bedtime_wear()247inline bool auto_brightness_mode_bedtime_wear() { 248 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_AUTO_BRIGHTNESS_MODE_BEDTIME_WEAR; 249 } auto_brightness_modes()250inline bool auto_brightness_modes() { 251 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_AUTO_BRIGHTNESS_MODES; 252 } back_up_smooth_display_and_force_peak_refresh_rate()253inline bool back_up_smooth_display_and_force_peak_refresh_rate() { 254 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BACK_UP_SMOOTH_DISPLAY_AND_FORCE_PEAK_REFRESH_RATE; 255 } block_autobrightness_changes_on_stylus_usage()256inline bool block_autobrightness_changes_on_stylus_usage() { 257 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BLOCK_AUTOBRIGHTNESS_CHANGES_ON_STYLUS_USAGE; 258 } brightness_int_range_user_perception()259inline bool brightness_int_range_user_perception() { 260 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BRIGHTNESS_INT_RANGE_USER_PERCEPTION; 261 } brightness_wear_bedtime_mode_clamper()262inline bool brightness_wear_bedtime_mode_clamper() { 263 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_BRIGHTNESS_WEAR_BEDTIME_MODE_CLAMPER; 264 } display_listener_performance_improvements()265inline bool display_listener_performance_improvements() { 266 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_DISPLAY_LISTENER_PERFORMANCE_IMPROVEMENTS; 267 } display_topology()268inline bool display_topology() { 269 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_DISPLAY_TOPOLOGY; 270 } doze_brightness_float()271inline bool doze_brightness_float() { 272 return true; 273 } enable_adaptive_tone_improvements_1()274inline bool enable_adaptive_tone_improvements_1() { 275 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_ADAPTIVE_TONE_IMPROVEMENTS_1; 276 } enable_adaptive_tone_improvements_2()277inline bool enable_adaptive_tone_improvements_2() { 278 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_ADAPTIVE_TONE_IMPROVEMENTS_2; 279 } enable_apply_display_changed_during_display_added()280inline bool enable_apply_display_changed_during_display_added() { 281 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_APPLY_DISPLAY_CHANGED_DURING_DISPLAY_ADDED; 282 } enable_battery_stats_for_all_displays()283inline bool enable_battery_stats_for_all_displays() { 284 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_BATTERY_STATS_FOR_ALL_DISPLAYS; 285 } enable_connected_display_error_handling()286inline bool enable_connected_display_error_handling() { 287 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_CONNECTED_DISPLAY_ERROR_HANDLING; 288 } enable_connected_display_management()289inline bool enable_connected_display_management() { 290 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_CONNECTED_DISPLAY_MANAGEMENT; 291 } enable_display_content_mode_management()292inline bool enable_display_content_mode_management() { 293 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT; 294 } enable_display_offload()295inline bool enable_display_offload() { 296 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_DISPLAY_OFFLOAD; 297 } enable_display_resolution_range_voting()298inline bool enable_display_resolution_range_voting() { 299 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_DISPLAY_RESOLUTION_RANGE_VOTING; 300 } enable_displays_refresh_rates_synchronization()301inline bool enable_displays_refresh_rates_synchronization() { 302 return false; 303 } enable_get_suggested_frame_rate()304inline bool enable_get_suggested_frame_rate() { 305 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_GET_SUGGESTED_FRAME_RATE; 306 } enable_get_supported_refresh_rates()307inline bool enable_get_supported_refresh_rates() { 308 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_GET_SUPPORTED_REFRESH_RATES; 309 } enable_has_arr_support()310inline bool enable_has_arr_support() { 311 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_HAS_ARR_SUPPORT; 312 } enable_hdr_clamper()313inline bool enable_hdr_clamper() { 314 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_HDR_CLAMPER; 315 } enable_mode_limit_for_external_display()316inline bool enable_mode_limit_for_external_display() { 317 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_MODE_LIMIT_FOR_EXTERNAL_DISPLAY; 318 } enable_nbm_controller()319inline bool enable_nbm_controller() { 320 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_NBM_CONTROLLER; 321 } enable_peak_refresh_rate_physical_limit()322inline bool enable_peak_refresh_rate_physical_limit() { 323 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PEAK_REFRESH_RATE_PHYSICAL_LIMIT; 324 } enable_pixel_anisotropy_correction()325inline bool enable_pixel_anisotropy_correction() { 326 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PIXEL_ANISOTROPY_CORRECTION; 327 } enable_plugin_manager()328inline bool enable_plugin_manager() { 329 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PLUGIN_MANAGER; 330 } enable_port_in_display_layout()331inline bool enable_port_in_display_layout() { 332 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_PORT_IN_DISPLAY_LAYOUT; 333 } enable_power_throttling_clamper()334inline bool enable_power_throttling_clamper() { 335 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_POWER_THROTTLING_CLAMPER; 336 } enable_restrict_display_modes()337inline bool enable_restrict_display_modes() { 338 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_RESTRICT_DISPLAY_MODES; 339 } enable_synthetic_60hz_modes()340inline bool enable_synthetic_60hz_modes() { 341 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_SYNTHETIC_60HZ_MODES; 342 } enable_user_preferred_mode_vote()343inline bool enable_user_preferred_mode_vote() { 344 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_USER_PREFERRED_MODE_VOTE; 345 } enable_user_refresh_rate_for_external_display()346inline bool enable_user_refresh_rate_for_external_display() { 347 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_USER_REFRESH_RATE_FOR_EXTERNAL_DISPLAY; 348 } enable_vsync_low_light_vote()349inline bool enable_vsync_low_light_vote() { 350 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_VSYNC_LOW_LIGHT_VOTE; 351 } enable_vsync_low_power_vote()352inline bool enable_vsync_low_power_vote() { 353 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_VSYNC_LOW_POWER_VOTE; 354 } enable_waiting_confirmation_before_mirroring()355inline bool enable_waiting_confirmation_before_mirroring() { 356 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_ENABLE_WAITING_CONFIRMATION_BEFORE_MIRRORING; 357 } even_dimmer()358inline bool even_dimmer() { 359 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_EVEN_DIMMER; 360 } fast_hdr_transitions()361inline bool fast_hdr_transitions() { 362 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_FAST_HDR_TRANSITIONS; 363 } highest_hdr_sdr_ratio_api()364inline bool highest_hdr_sdr_ratio_api() { 365 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_HIGHEST_HDR_SDR_RATIO_API; 366 } idle_screen_config_in_subscribing_light_sensor()367inline bool idle_screen_config_in_subscribing_light_sensor() { 368 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IDLE_SCREEN_CONFIG_IN_SUBSCRIBING_LIGHT_SENSOR; 369 } idle_screen_refresh_rate_timeout()370inline bool idle_screen_refresh_rate_timeout() { 371 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IDLE_SCREEN_REFRESH_RATE_TIMEOUT; 372 } ignore_app_preferred_refresh_rate_request()373inline bool ignore_app_preferred_refresh_rate_request() { 374 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IGNORE_APP_PREFERRED_REFRESH_RATE_REQUEST; 375 } is_always_on_available_api()376inline bool is_always_on_available_api() { 377 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_IS_ALWAYS_ON_AVAILABLE_API; 378 } new_hdr_brightness_modifier()379inline bool new_hdr_brightness_modifier() { 380 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_NEW_HDR_BRIGHTNESS_MODIFIER; 381 } normal_brightness_for_doze_parameter()382inline bool normal_brightness_for_doze_parameter() { 383 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_NORMAL_BRIGHTNESS_FOR_DOZE_PARAMETER; 384 } offload_controls_doze_auto_brightness()385inline bool offload_controls_doze_auto_brightness() { 386 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_OFFLOAD_CONTROLS_DOZE_AUTO_BRIGHTNESS; 387 } offload_doze_override_holds_wakelock()388inline bool offload_doze_override_holds_wakelock() { 389 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_OFFLOAD_DOZE_OVERRIDE_HOLDS_WAKELOCK; 390 } offload_session_cancel_block_screen_on()391inline bool offload_session_cancel_block_screen_on() { 392 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_OFFLOAD_SESSION_CANCEL_BLOCK_SCREEN_ON; 393 } refactor_display_power_controller()394inline bool refactor_display_power_controller() { 395 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_REFACTOR_DISPLAY_POWER_CONTROLLER; 396 } refresh_rate_voting_telemetry()397inline bool refresh_rate_voting_telemetry() { 398 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_REFRESH_RATE_VOTING_TELEMETRY; 399 } resolution_backup_restore()400inline bool resolution_backup_restore() { 401 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_RESOLUTION_BACKUP_RESTORE; 402 } sensor_based_brightness_throttling()403inline bool sensor_based_brightness_throttling() { 404 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_SENSOR_BASED_BRIGHTNESS_THROTTLING; 405 } subscribe_granular_display_events()406inline bool subscribe_granular_display_events() { 407 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_SUBSCRIBE_GRANULAR_DISPLAY_EVENTS; 408 } use_fusion_prox_sensor()409inline bool use_fusion_prox_sensor() { 410 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_USE_FUSION_PROX_SENSOR; 411 } virtual_display_limit()412inline bool virtual_display_limit() { 413 return COM_ANDROID_SERVER_DISPLAY_FEATURE_FLAGS_VIRTUAL_DISPLAY_LIMIT; 414 } 415 416 } 417 418 extern "C" { 419 #endif // __cplusplus 420 421 422 bool com_android_server_display_feature_flags_always_rotate_display_device(); 423 bool com_android_server_display_feature_flags_auto_brightness_mode_bedtime_wear(); 424 bool com_android_server_display_feature_flags_auto_brightness_modes(); 425 bool com_android_server_display_feature_flags_back_up_smooth_display_and_force_peak_refresh_rate(); 426 bool com_android_server_display_feature_flags_block_autobrightness_changes_on_stylus_usage(); 427 bool com_android_server_display_feature_flags_brightness_int_range_user_perception(); 428 bool com_android_server_display_feature_flags_brightness_wear_bedtime_mode_clamper(); 429 bool com_android_server_display_feature_flags_display_listener_performance_improvements(); 430 bool com_android_server_display_feature_flags_display_topology(); 431 bool com_android_server_display_feature_flags_doze_brightness_float(); 432 bool com_android_server_display_feature_flags_enable_adaptive_tone_improvements_1(); 433 bool com_android_server_display_feature_flags_enable_adaptive_tone_improvements_2(); 434 bool com_android_server_display_feature_flags_enable_apply_display_changed_during_display_added(); 435 bool com_android_server_display_feature_flags_enable_battery_stats_for_all_displays(); 436 bool com_android_server_display_feature_flags_enable_connected_display_error_handling(); 437 bool com_android_server_display_feature_flags_enable_connected_display_management(); 438 bool com_android_server_display_feature_flags_enable_display_content_mode_management(); 439 bool com_android_server_display_feature_flags_enable_display_offload(); 440 bool com_android_server_display_feature_flags_enable_display_resolution_range_voting(); 441 bool com_android_server_display_feature_flags_enable_displays_refresh_rates_synchronization(); 442 bool com_android_server_display_feature_flags_enable_get_suggested_frame_rate(); 443 bool com_android_server_display_feature_flags_enable_get_supported_refresh_rates(); 444 bool com_android_server_display_feature_flags_enable_has_arr_support(); 445 bool com_android_server_display_feature_flags_enable_hdr_clamper(); 446 bool com_android_server_display_feature_flags_enable_mode_limit_for_external_display(); 447 bool com_android_server_display_feature_flags_enable_nbm_controller(); 448 bool com_android_server_display_feature_flags_enable_peak_refresh_rate_physical_limit(); 449 bool com_android_server_display_feature_flags_enable_pixel_anisotropy_correction(); 450 bool com_android_server_display_feature_flags_enable_plugin_manager(); 451 bool com_android_server_display_feature_flags_enable_port_in_display_layout(); 452 bool com_android_server_display_feature_flags_enable_power_throttling_clamper(); 453 bool com_android_server_display_feature_flags_enable_restrict_display_modes(); 454 bool com_android_server_display_feature_flags_enable_synthetic_60hz_modes(); 455 bool com_android_server_display_feature_flags_enable_user_preferred_mode_vote(); 456 bool com_android_server_display_feature_flags_enable_user_refresh_rate_for_external_display(); 457 bool com_android_server_display_feature_flags_enable_vsync_low_light_vote(); 458 bool com_android_server_display_feature_flags_enable_vsync_low_power_vote(); 459 bool com_android_server_display_feature_flags_enable_waiting_confirmation_before_mirroring(); 460 bool com_android_server_display_feature_flags_even_dimmer(); 461 bool com_android_server_display_feature_flags_fast_hdr_transitions(); 462 bool com_android_server_display_feature_flags_highest_hdr_sdr_ratio_api(); 463 bool com_android_server_display_feature_flags_idle_screen_config_in_subscribing_light_sensor(); 464 bool com_android_server_display_feature_flags_idle_screen_refresh_rate_timeout(); 465 bool com_android_server_display_feature_flags_ignore_app_preferred_refresh_rate_request(); 466 bool com_android_server_display_feature_flags_is_always_on_available_api(); 467 bool com_android_server_display_feature_flags_new_hdr_brightness_modifier(); 468 bool com_android_server_display_feature_flags_normal_brightness_for_doze_parameter(); 469 bool com_android_server_display_feature_flags_offload_controls_doze_auto_brightness(); 470 bool com_android_server_display_feature_flags_offload_doze_override_holds_wakelock(); 471 bool com_android_server_display_feature_flags_offload_session_cancel_block_screen_on(); 472 bool com_android_server_display_feature_flags_refactor_display_power_controller(); 473 bool com_android_server_display_feature_flags_refresh_rate_voting_telemetry(); 474 bool com_android_server_display_feature_flags_resolution_backup_restore(); 475 bool com_android_server_display_feature_flags_sensor_based_brightness_throttling(); 476 bool com_android_server_display_feature_flags_subscribe_granular_display_events(); 477 bool com_android_server_display_feature_flags_use_fusion_prox_sensor(); 478 bool com_android_server_display_feature_flags_virtual_display_limit(); 479 480 #ifdef __cplusplus 481 } // extern "C" 482 #endif 483 484