Skip to content

Commit cdde6f5

Browse files
nscobieAndroid (Google) Code Review
authored andcommitted
Merge "Allow read/write aconfig flags to be read before boot complete" into main
2 parents a499d44 + 887598b commit cdde6f5

3 files changed

Lines changed: 134 additions & 151 deletions

File tree

services/surfaceflinger/common/FlagManager.cpp

Lines changed: 133 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -89,82 +89,82 @@ void FlagManager::setUnitTestMode() {
8989
mBootCompleted = true;
9090
}
9191

92-
void FlagManager::dumpFlag(std::string& result, bool readonly, const char* name,
92+
void FlagManager::dumpFlag(std::string& result, bool aconfig, const char* name,
9393
std::function<bool()> getter) const {
94-
if (readonly || mBootCompleted) {
94+
if (aconfig || mBootCompleted) {
9595
base::StringAppendF(&result, "%s: %s\n", name, getter() ? "true" : "false");
9696
} else {
9797
base::StringAppendF(&result, "%s: in progress (still booting)\n", name);
9898
}
9999
}
100100

101101
void FlagManager::dump(std::string& result) const {
102-
#define DUMP_FLAG_INTERVAL(name, readonly) \
103-
dumpFlag(result, (readonly), #name, std::bind(&FlagManager::name, this))
104-
#define DUMP_SERVER_FLAG(name) DUMP_FLAG_INTERVAL(name, false)
105-
#define DUMP_READ_ONLY_FLAG(name) DUMP_FLAG_INTERVAL(name, true)
102+
#define DUMP_FLAG_INTERNAL(name, aconfig) \
103+
dumpFlag(result, (aconfig), #name, std::bind(&FlagManager::name, this))
104+
#define DUMP_LEGACY_SERVER_FLAG(name) DUMP_FLAG_INTERNAL(name, false)
105+
#define DUMP_ACONFIG_FLAG(name) DUMP_FLAG_INTERNAL(name, true)
106106

107107
base::StringAppendF(&result, "FlagManager values: \n");
108108

109109
/// Legacy server flags ///
110-
DUMP_SERVER_FLAG(use_adpf_cpu_hint);
111-
DUMP_SERVER_FLAG(use_skia_tracing);
110+
DUMP_LEGACY_SERVER_FLAG(use_adpf_cpu_hint);
111+
DUMP_LEGACY_SERVER_FLAG(use_skia_tracing);
112112

113-
/// Trunk stable server flags ///
114-
DUMP_SERVER_FLAG(refresh_rate_overlay_on_external_display);
115-
DUMP_SERVER_FLAG(adpf_gpu_sf);
116-
DUMP_SERVER_FLAG(adpf_native_session_manager);
117-
DUMP_SERVER_FLAG(adpf_use_fmq_channel);
113+
/// Trunk stable server (R/W) flags ///
114+
DUMP_ACONFIG_FLAG(refresh_rate_overlay_on_external_display);
115+
DUMP_ACONFIG_FLAG(adpf_gpu_sf);
116+
DUMP_ACONFIG_FLAG(adpf_native_session_manager);
117+
DUMP_ACONFIG_FLAG(adpf_use_fmq_channel);
118118

119119
/// Trunk stable readonly flags ///
120-
DUMP_READ_ONLY_FLAG(adpf_fmq_sf);
121-
DUMP_READ_ONLY_FLAG(connected_display);
122-
DUMP_READ_ONLY_FLAG(enable_small_area_detection);
123-
DUMP_READ_ONLY_FLAG(stable_edid_ids);
124-
DUMP_READ_ONLY_FLAG(frame_rate_category_mrr);
125-
DUMP_READ_ONLY_FLAG(misc1);
126-
DUMP_READ_ONLY_FLAG(vrr_config);
127-
DUMP_READ_ONLY_FLAG(hdcp_level_hal);
128-
DUMP_READ_ONLY_FLAG(multithreaded_present);
129-
DUMP_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace);
130-
DUMP_READ_ONLY_FLAG(use_known_refresh_rate_for_fps_consistency);
131-
DUMP_READ_ONLY_FLAG(cache_when_source_crop_layer_only_moved);
132-
DUMP_READ_ONLY_FLAG(enable_fro_dependent_features);
133-
DUMP_READ_ONLY_FLAG(display_protected);
134-
DUMP_READ_ONLY_FLAG(fp16_client_target);
135-
DUMP_READ_ONLY_FLAG(game_default_frame_rate);
136-
DUMP_READ_ONLY_FLAG(enable_layer_command_batching);
137-
DUMP_READ_ONLY_FLAG(vulkan_renderengine);
138-
DUMP_READ_ONLY_FLAG(renderable_buffer_usage);
139-
DUMP_READ_ONLY_FLAG(vrr_bugfix_24q4);
140-
DUMP_READ_ONLY_FLAG(vrr_bugfix_dropped_frame);
141-
DUMP_READ_ONLY_FLAG(restore_blur_step);
142-
DUMP_READ_ONLY_FLAG(dont_skip_on_early_ro);
143-
DUMP_READ_ONLY_FLAG(no_vsyncs_on_screen_off);
144-
DUMP_READ_ONLY_FLAG(protected_if_client);
145-
DUMP_READ_ONLY_FLAG(idle_screen_refresh_rate_timeout);
146-
DUMP_READ_ONLY_FLAG(graphite_renderengine);
147-
DUMP_READ_ONLY_FLAG(filter_frames_before_trace_starts);
148-
DUMP_READ_ONLY_FLAG(latch_unsignaled_with_auto_refresh_changed);
149-
DUMP_READ_ONLY_FLAG(deprecate_vsync_sf);
150-
DUMP_READ_ONLY_FLAG(allow_n_vsyncs_in_targeter);
151-
DUMP_READ_ONLY_FLAG(detached_mirror);
152-
DUMP_READ_ONLY_FLAG(commit_not_composited);
153-
DUMP_READ_ONLY_FLAG(correct_dpi_with_display_size);
154-
DUMP_READ_ONLY_FLAG(local_tonemap_screenshots);
155-
DUMP_READ_ONLY_FLAG(override_trusted_overlay);
156-
DUMP_READ_ONLY_FLAG(flush_buffer_slots_to_uncache);
157-
DUMP_READ_ONLY_FLAG(force_compile_graphite_renderengine);
158-
DUMP_READ_ONLY_FLAG(trace_frame_rate_override);
159-
DUMP_READ_ONLY_FLAG(true_hdr_screenshots);
160-
DUMP_READ_ONLY_FLAG(display_config_error_hal);
161-
DUMP_READ_ONLY_FLAG(connected_display_hdr);
162-
DUMP_READ_ONLY_FLAG(deprecate_frame_tracker);
163-
DUMP_READ_ONLY_FLAG(skip_invisible_windows_in_input);
164-
DUMP_READ_ONLY_FLAG(begone_bright_hlg);
165-
166-
#undef DUMP_READ_ONLY_FLAG
167-
#undef DUMP_SERVER_FLAG
120+
DUMP_ACONFIG_FLAG(adpf_fmq_sf);
121+
DUMP_ACONFIG_FLAG(connected_display);
122+
DUMP_ACONFIG_FLAG(enable_small_area_detection);
123+
DUMP_ACONFIG_FLAG(stable_edid_ids);
124+
DUMP_ACONFIG_FLAG(frame_rate_category_mrr);
125+
DUMP_ACONFIG_FLAG(misc1);
126+
DUMP_ACONFIG_FLAG(vrr_config);
127+
DUMP_ACONFIG_FLAG(hdcp_level_hal);
128+
DUMP_ACONFIG_FLAG(multithreaded_present);
129+
DUMP_ACONFIG_FLAG(add_sf_skipped_frames_to_trace);
130+
DUMP_ACONFIG_FLAG(use_known_refresh_rate_for_fps_consistency);
131+
DUMP_ACONFIG_FLAG(cache_when_source_crop_layer_only_moved);
132+
DUMP_ACONFIG_FLAG(enable_fro_dependent_features);
133+
DUMP_ACONFIG_FLAG(display_protected);
134+
DUMP_ACONFIG_FLAG(fp16_client_target);
135+
DUMP_ACONFIG_FLAG(game_default_frame_rate);
136+
DUMP_ACONFIG_FLAG(enable_layer_command_batching);
137+
DUMP_ACONFIG_FLAG(vulkan_renderengine);
138+
DUMP_ACONFIG_FLAG(renderable_buffer_usage);
139+
DUMP_ACONFIG_FLAG(vrr_bugfix_24q4);
140+
DUMP_ACONFIG_FLAG(vrr_bugfix_dropped_frame);
141+
DUMP_ACONFIG_FLAG(restore_blur_step);
142+
DUMP_ACONFIG_FLAG(dont_skip_on_early_ro);
143+
DUMP_ACONFIG_FLAG(no_vsyncs_on_screen_off);
144+
DUMP_ACONFIG_FLAG(protected_if_client);
145+
DUMP_ACONFIG_FLAG(idle_screen_refresh_rate_timeout);
146+
DUMP_ACONFIG_FLAG(graphite_renderengine);
147+
DUMP_ACONFIG_FLAG(filter_frames_before_trace_starts);
148+
DUMP_ACONFIG_FLAG(latch_unsignaled_with_auto_refresh_changed);
149+
DUMP_ACONFIG_FLAG(deprecate_vsync_sf);
150+
DUMP_ACONFIG_FLAG(allow_n_vsyncs_in_targeter);
151+
DUMP_ACONFIG_FLAG(detached_mirror);
152+
DUMP_ACONFIG_FLAG(commit_not_composited);
153+
DUMP_ACONFIG_FLAG(correct_dpi_with_display_size);
154+
DUMP_ACONFIG_FLAG(local_tonemap_screenshots);
155+
DUMP_ACONFIG_FLAG(override_trusted_overlay);
156+
DUMP_ACONFIG_FLAG(flush_buffer_slots_to_uncache);
157+
DUMP_ACONFIG_FLAG(force_compile_graphite_renderengine);
158+
DUMP_ACONFIG_FLAG(trace_frame_rate_override);
159+
DUMP_ACONFIG_FLAG(true_hdr_screenshots);
160+
DUMP_ACONFIG_FLAG(display_config_error_hal);
161+
DUMP_ACONFIG_FLAG(connected_display_hdr);
162+
DUMP_ACONFIG_FLAG(deprecate_frame_tracker);
163+
DUMP_ACONFIG_FLAG(skip_invisible_windows_in_input);
164+
DUMP_ACONFIG_FLAG(begone_bright_hlg);
165+
166+
#undef DUMP_ACONFIG_FLAG
167+
#undef DUMP_LEGACY_SERVER_FLAG
168168
#undef DUMP_FLAG_INTERVAL
169169
}
170170

@@ -189,35 +189,24 @@ bool FlagManager::getServerConfigurableFlag(const char* experimentFlagName) cons
189189
return getServerConfigurableFlag(serverFlagName); \
190190
}
191191

192-
#define FLAG_MANAGER_FLAG_INTERNAL(name, syspropOverride, checkForBootCompleted, owner) \
193-
bool FlagManager::name() const { \
194-
if (checkForBootCompleted) { \
195-
LOG_ALWAYS_FATAL_IF(!mBootCompleted, \
196-
"Can't read %s before boot completed as it is server writable", \
197-
__func__); \
198-
} \
199-
static const std::optional<bool> debugOverride = getBoolProperty(syspropOverride); \
200-
static const bool value = getFlagValue([] { return owner ::name(); }, debugOverride); \
201-
if (mUnitTestMode) { \
202-
/* \
203-
* When testing, we don't want to rely on the cached `value` or the debugOverride. \
204-
*/ \
205-
return owner ::name(); \
206-
} \
207-
return value; \
192+
#define FLAG_MANAGER_ACONFIG_INTERNAL(name, syspropOverride, owner) \
193+
bool FlagManager::name() const { \
194+
static const std::optional<bool> debugOverride = getBoolProperty(syspropOverride); \
195+
static const bool value = getFlagValue([] { return owner ::name(); }, debugOverride); \
196+
if (mUnitTestMode) { \
197+
/* \
198+
* When testing, we don't want to rely on the cached `value` or the debugOverride. \
199+
*/ \
200+
return owner ::name(); \
201+
} \
202+
return value; \
208203
}
209204

210-
#define FLAG_MANAGER_SERVER_FLAG(name, syspropOverride) \
211-
FLAG_MANAGER_FLAG_INTERNAL(name, syspropOverride, true, flags)
205+
#define FLAG_MANAGER_ACONFIG_FLAG(name, syspropOverride) \
206+
FLAG_MANAGER_ACONFIG_INTERNAL(name, syspropOverride, flags)
212207

213-
#define FLAG_MANAGER_READ_ONLY_FLAG(name, syspropOverride) \
214-
FLAG_MANAGER_FLAG_INTERNAL(name, syspropOverride, false, flags)
215-
216-
#define FLAG_MANAGER_SERVER_FLAG_IMPORTED(name, syspropOverride, owner) \
217-
FLAG_MANAGER_FLAG_INTERNAL(name, syspropOverride, true, owner)
218-
219-
#define FLAG_MANAGER_READ_ONLY_FLAG_IMPORTED(name, syspropOverride, owner) \
220-
FLAG_MANAGER_FLAG_INTERNAL(name, syspropOverride, false, owner)
208+
#define FLAG_MANAGER_ACONFIG_FLAG_IMPORTED(name, syspropOverride, owner) \
209+
FLAG_MANAGER_ACONFIG_INTERNAL(name, syspropOverride, owner)
221210

222211
/// Legacy server flags ///
223212
FLAG_MANAGER_LEGACY_SERVER_FLAG(test_flag, "", "")
@@ -227,64 +216,64 @@ FLAG_MANAGER_LEGACY_SERVER_FLAG(use_skia_tracing, PROPERTY_SKIA_ATRACE_ENABLED,
227216
"SkiaTracingFeature__use_skia_tracing")
228217

229218
/// Trunk stable readonly flags ///
230-
FLAG_MANAGER_READ_ONLY_FLAG(adpf_fmq_sf, "")
231-
FLAG_MANAGER_READ_ONLY_FLAG(connected_display, "")
232-
FLAG_MANAGER_READ_ONLY_FLAG(enable_small_area_detection, "")
233-
FLAG_MANAGER_READ_ONLY_FLAG(stable_edid_ids, "debug.sf.stable_edid_ids")
234-
FLAG_MANAGER_READ_ONLY_FLAG(frame_rate_category_mrr, "debug.sf.frame_rate_category_mrr")
235-
FLAG_MANAGER_READ_ONLY_FLAG(misc1, "")
236-
FLAG_MANAGER_READ_ONLY_FLAG(vrr_config, "debug.sf.enable_vrr_config")
237-
FLAG_MANAGER_READ_ONLY_FLAG(hdcp_level_hal, "")
238-
FLAG_MANAGER_READ_ONLY_FLAG(multithreaded_present, "debug.sf.multithreaded_present")
239-
FLAG_MANAGER_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace, "")
240-
FLAG_MANAGER_READ_ONLY_FLAG(use_known_refresh_rate_for_fps_consistency, "")
241-
FLAG_MANAGER_READ_ONLY_FLAG(cache_when_source_crop_layer_only_moved,
242-
"debug.sf.cache_source_crop_only_moved")
243-
FLAG_MANAGER_READ_ONLY_FLAG(enable_fro_dependent_features, "")
244-
FLAG_MANAGER_READ_ONLY_FLAG(display_protected, "")
245-
FLAG_MANAGER_READ_ONLY_FLAG(fp16_client_target, "debug.sf.fp16_client_target")
246-
FLAG_MANAGER_READ_ONLY_FLAG(game_default_frame_rate, "")
247-
FLAG_MANAGER_READ_ONLY_FLAG(enable_layer_command_batching, "debug.sf.enable_layer_command_batching")
248-
FLAG_MANAGER_READ_ONLY_FLAG(vulkan_renderengine, "debug.renderengine.vulkan")
249-
FLAG_MANAGER_READ_ONLY_FLAG(renderable_buffer_usage, "")
250-
FLAG_MANAGER_READ_ONLY_FLAG(restore_blur_step, "debug.renderengine.restore_blur_step")
251-
FLAG_MANAGER_READ_ONLY_FLAG(dont_skip_on_early_ro, "")
252-
FLAG_MANAGER_READ_ONLY_FLAG(no_vsyncs_on_screen_off, "debug.sf.no_vsyncs_on_screen_off")
253-
FLAG_MANAGER_READ_ONLY_FLAG(protected_if_client, "")
254-
FLAG_MANAGER_READ_ONLY_FLAG(vrr_bugfix_24q4, "");
255-
FLAG_MANAGER_READ_ONLY_FLAG(vrr_bugfix_dropped_frame, "")
256-
FLAG_MANAGER_READ_ONLY_FLAG(graphite_renderengine, "debug.renderengine.graphite")
257-
FLAG_MANAGER_READ_ONLY_FLAG(filter_frames_before_trace_starts, "")
258-
FLAG_MANAGER_READ_ONLY_FLAG(latch_unsignaled_with_auto_refresh_changed, "");
259-
FLAG_MANAGER_READ_ONLY_FLAG(deprecate_vsync_sf, "");
260-
FLAG_MANAGER_READ_ONLY_FLAG(allow_n_vsyncs_in_targeter, "");
261-
FLAG_MANAGER_READ_ONLY_FLAG(detached_mirror, "");
262-
FLAG_MANAGER_READ_ONLY_FLAG(commit_not_composited, "");
263-
FLAG_MANAGER_READ_ONLY_FLAG(correct_dpi_with_display_size, "");
264-
FLAG_MANAGER_READ_ONLY_FLAG(local_tonemap_screenshots, "debug.sf.local_tonemap_screenshots");
265-
FLAG_MANAGER_READ_ONLY_FLAG(override_trusted_overlay, "");
266-
FLAG_MANAGER_READ_ONLY_FLAG(flush_buffer_slots_to_uncache, "");
267-
FLAG_MANAGER_READ_ONLY_FLAG(force_compile_graphite_renderengine, "");
268-
FLAG_MANAGER_READ_ONLY_FLAG(true_hdr_screenshots, "debug.sf.true_hdr_screenshots");
269-
FLAG_MANAGER_READ_ONLY_FLAG(display_config_error_hal, "");
270-
FLAG_MANAGER_READ_ONLY_FLAG(connected_display_hdr, "");
271-
FLAG_MANAGER_READ_ONLY_FLAG(deprecate_frame_tracker, "");
272-
FLAG_MANAGER_READ_ONLY_FLAG(skip_invisible_windows_in_input, "");
273-
FLAG_MANAGER_READ_ONLY_FLAG(begone_bright_hlg, "debug.sf.begone_bright_hlg");
274-
275-
/// Trunk stable server flags ///
276-
FLAG_MANAGER_SERVER_FLAG(refresh_rate_overlay_on_external_display, "")
277-
FLAG_MANAGER_SERVER_FLAG(adpf_gpu_sf, "")
278-
FLAG_MANAGER_SERVER_FLAG(adpf_native_session_manager, "");
279-
280-
/// Trunk stable server flags from outside SurfaceFlinger ///
281-
FLAG_MANAGER_SERVER_FLAG_IMPORTED(adpf_use_fmq_channel, "", android::os)
219+
FLAG_MANAGER_ACONFIG_FLAG(adpf_fmq_sf, "")
220+
FLAG_MANAGER_ACONFIG_FLAG(connected_display, "")
221+
FLAG_MANAGER_ACONFIG_FLAG(enable_small_area_detection, "")
222+
FLAG_MANAGER_ACONFIG_FLAG(stable_edid_ids, "debug.sf.stable_edid_ids")
223+
FLAG_MANAGER_ACONFIG_FLAG(frame_rate_category_mrr, "debug.sf.frame_rate_category_mrr")
224+
FLAG_MANAGER_ACONFIG_FLAG(misc1, "")
225+
FLAG_MANAGER_ACONFIG_FLAG(vrr_config, "debug.sf.enable_vrr_config")
226+
FLAG_MANAGER_ACONFIG_FLAG(hdcp_level_hal, "")
227+
FLAG_MANAGER_ACONFIG_FLAG(multithreaded_present, "debug.sf.multithreaded_present")
228+
FLAG_MANAGER_ACONFIG_FLAG(add_sf_skipped_frames_to_trace, "")
229+
FLAG_MANAGER_ACONFIG_FLAG(use_known_refresh_rate_for_fps_consistency, "")
230+
FLAG_MANAGER_ACONFIG_FLAG(cache_when_source_crop_layer_only_moved,
231+
"debug.sf.cache_source_crop_only_moved")
232+
FLAG_MANAGER_ACONFIG_FLAG(enable_fro_dependent_features, "")
233+
FLAG_MANAGER_ACONFIG_FLAG(display_protected, "")
234+
FLAG_MANAGER_ACONFIG_FLAG(fp16_client_target, "debug.sf.fp16_client_target")
235+
FLAG_MANAGER_ACONFIG_FLAG(game_default_frame_rate, "")
236+
FLAG_MANAGER_ACONFIG_FLAG(enable_layer_command_batching, "debug.sf.enable_layer_command_batching")
237+
FLAG_MANAGER_ACONFIG_FLAG(vulkan_renderengine, "debug.renderengine.vulkan")
238+
FLAG_MANAGER_ACONFIG_FLAG(renderable_buffer_usage, "")
239+
FLAG_MANAGER_ACONFIG_FLAG(restore_blur_step, "debug.renderengine.restore_blur_step")
240+
FLAG_MANAGER_ACONFIG_FLAG(dont_skip_on_early_ro, "")
241+
FLAG_MANAGER_ACONFIG_FLAG(no_vsyncs_on_screen_off, "debug.sf.no_vsyncs_on_screen_off")
242+
FLAG_MANAGER_ACONFIG_FLAG(protected_if_client, "")
243+
FLAG_MANAGER_ACONFIG_FLAG(vrr_bugfix_24q4, "");
244+
FLAG_MANAGER_ACONFIG_FLAG(vrr_bugfix_dropped_frame, "")
245+
FLAG_MANAGER_ACONFIG_FLAG(graphite_renderengine, "debug.renderengine.graphite")
246+
FLAG_MANAGER_ACONFIG_FLAG(filter_frames_before_trace_starts, "")
247+
FLAG_MANAGER_ACONFIG_FLAG(latch_unsignaled_with_auto_refresh_changed, "");
248+
FLAG_MANAGER_ACONFIG_FLAG(deprecate_vsync_sf, "");
249+
FLAG_MANAGER_ACONFIG_FLAG(allow_n_vsyncs_in_targeter, "");
250+
FLAG_MANAGER_ACONFIG_FLAG(detached_mirror, "");
251+
FLAG_MANAGER_ACONFIG_FLAG(commit_not_composited, "");
252+
FLAG_MANAGER_ACONFIG_FLAG(correct_dpi_with_display_size, "");
253+
FLAG_MANAGER_ACONFIG_FLAG(local_tonemap_screenshots, "debug.sf.local_tonemap_screenshots");
254+
FLAG_MANAGER_ACONFIG_FLAG(override_trusted_overlay, "");
255+
FLAG_MANAGER_ACONFIG_FLAG(flush_buffer_slots_to_uncache, "");
256+
FLAG_MANAGER_ACONFIG_FLAG(force_compile_graphite_renderengine, "");
257+
FLAG_MANAGER_ACONFIG_FLAG(true_hdr_screenshots, "debug.sf.true_hdr_screenshots");
258+
FLAG_MANAGER_ACONFIG_FLAG(display_config_error_hal, "");
259+
FLAG_MANAGER_ACONFIG_FLAG(connected_display_hdr, "");
260+
FLAG_MANAGER_ACONFIG_FLAG(deprecate_frame_tracker, "");
261+
FLAG_MANAGER_ACONFIG_FLAG(skip_invisible_windows_in_input, "");
262+
FLAG_MANAGER_ACONFIG_FLAG(begone_bright_hlg, "debug.sf.begone_bright_hlg");
263+
264+
/// Trunk stable server (R/W) flags ///
265+
FLAG_MANAGER_ACONFIG_FLAG(refresh_rate_overlay_on_external_display, "")
266+
FLAG_MANAGER_ACONFIG_FLAG(adpf_gpu_sf, "")
267+
FLAG_MANAGER_ACONFIG_FLAG(adpf_native_session_manager, "");
268+
269+
/// Trunk stable server (R/W) flags from outside SurfaceFlinger ///
270+
FLAG_MANAGER_ACONFIG_FLAG_IMPORTED(adpf_use_fmq_channel, "", android::os)
282271

283272
/// Trunk stable readonly flags from outside SurfaceFlinger ///
284-
FLAG_MANAGER_READ_ONLY_FLAG_IMPORTED(idle_screen_refresh_rate_timeout, "",
285-
com::android::server::display::feature::flags)
286-
FLAG_MANAGER_READ_ONLY_FLAG_IMPORTED(adpf_use_fmq_channel_fixed, "", android::os)
287-
FLAG_MANAGER_READ_ONLY_FLAG_IMPORTED(trace_frame_rate_override, "",
288-
com::android::graphics::libgui::flags);
273+
FLAG_MANAGER_ACONFIG_FLAG_IMPORTED(idle_screen_refresh_rate_timeout, "",
274+
com::android::server::display::feature::flags)
275+
FLAG_MANAGER_ACONFIG_FLAG_IMPORTED(adpf_use_fmq_channel_fixed, "", android::os)
276+
FLAG_MANAGER_ACONFIG_FLAG_IMPORTED(trace_frame_rate_override, "",
277+
com::android::graphics::libgui::flags);
289278

290279
} // namespace android

services/surfaceflinger/common/include/common/FlagManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class FlagManager {
4747
bool use_adpf_cpu_hint() const;
4848
bool use_skia_tracing() const;
4949

50-
/// Trunk stable server flags ///
50+
/// Trunk stable server (R/W) flags ///
5151
bool refresh_rate_overlay_on_external_display() const;
5252
bool adpf_gpu_sf() const;
5353
bool adpf_use_fmq_channel() const;

services/surfaceflinger/tests/unittests/FlagManagerTest.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,6 @@ TEST_F(FlagManagerTest, legacyReturnsValue) {
8585
EXPECT_EQ(false, mFlagManager.test_flag());
8686
}
8787

88-
TEST_F(FlagManagerTest, crashesIfQueriedBeforeBoot) {
89-
mFlagManager.markBootIncomplete();
90-
EXPECT_DEATH(FlagManager::getInstance()
91-
.refresh_rate_overlay_on_external_display(), "");
92-
}
93-
9488
TEST_F(FlagManagerTest, returnsOverrideTrue) {
9589
mFlagManager.markBootCompleted();
9690

0 commit comments

Comments
 (0)