File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,21 @@ class InputFlags {
2222public:
2323 /* *
2424 * Check if connected displays feature is enabled, either via the feature flag or settings
25- * override.
25+ * override. Developer setting override allows enabling all the "desktop experiences" features
26+ * including input related connected_displays_cursor flag.
27+ *
28+ * The developer settings override is prioritised over aconfig flags. Any tests that require
29+ * applicable aconfig flags to be disabled with SCOPED_FLAG_OVERRIDE also need this developer
30+ * option to be reset locally.
31+ *
32+ * Also note the developer setting override is only applicable to the desktop experiences
33+ * related features.
34+ *
35+ * To enable only the input flag run:
36+ * adb shell aflags enable com.android.input.flags.connected_displays_cursor
37+ * To override this flag and enable all "desktop experiences" features run:
38+ * adb shell aflags enable com.android.window.flags.enable_desktop_mode_through_dev_option
39+ * adb shell setprop persist.wm.debug.desktop_experience_devopts 1
2640 */
2741 static bool connectedDisplaysCursorEnabled ();
2842
Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ cc_library {
270270
271271 shared_libs : [
272272 " android.companion.virtualdevice.flags-aconfig-cc" ,
273+ " com.android.window.flags.window-aconfig_flags_c_lib" ,
273274 " libPlatformProperties" ,
274275 " libaconfig_storage_read_api_cc" ,
275276 " libbase" ,
Original file line number Diff line number Diff line change 1818
1919#include < android-base/logging.h>
2020#include < com_android_input_flags.h>
21+ #include < com_android_window_flags.h>
2122#include < cutils/properties.h>
2223
2324#include < string>
2425
2526namespace android {
2627
2728bool InputFlags::connectedDisplaysCursorEnabled () {
29+ if (!com::android::window::flags::enable_desktop_mode_through_dev_option ()) {
30+ return com::android::input::flags::connected_displays_cursor ();
31+ }
2832 static std::optional<bool > cachedDevOption;
2933 if (!cachedDevOption.has_value ()) {
3034 char value[PROPERTY_VALUE_MAX];
You can’t perform that action at this time.
0 commit comments