1 /* 2 * Copyright 2025 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 19 namespace android { 20 21 class InputFlags { 22 public: 23 /** 24 * Check if connected displays feature is enabled, either via the feature flag or settings 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 40 */ 41 static bool connectedDisplaysCursorEnabled(); 42 43 /** 44 * Check if both connectedDisplaysCursor and associatedDisplayCursorBugfix is enabled. 45 */ 46 static bool connectedDisplaysCursorAndAssociatedDisplayCursorBugfixEnabled(); 47 }; 48 49 } // namespace android 50