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

Commit d106989e authored by Abdelrahman Awadalla's avatar Abdelrahman Awadalla
Browse files

Add "Touchpad Visualizer" to input developer options

Bug: 28231224
Test: atest TouchpadVisualizerPreferenceControllerTest
Test: Manual testing using
      $ adb shell settings get system touchpad_visualizer
Flag: com.android.hardware.input.touchpad_visualizer

Change-Id: I4f6b70b0da12253950b017363f3afcecc1a32570
parent 65672c90
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import static com.android.hardware.input.Flags.keyboardA11ySlowKeysFlag;
import static com.android.hardware.input.Flags.keyboardA11yStickyKeysFlag;
import static com.android.hardware.input.Flags.keyboardA11yMouseKeys;
import static com.android.hardware.input.Flags.touchpadTapDragging;
import static com.android.hardware.input.Flags.touchpadVisualizer;
import static com.android.input.flags.Flags.enableInputFilterRustImpl;

import android.Manifest;
@@ -325,6 +326,15 @@ public class InputSettings {
        return touchpadTapDragging();
    }

    /**
     * Returns true if the feature flag for touchpad visualizer is enabled.
     *
     * @hide
     */
    public static boolean isTouchpadVisualizerFeatureFlagEnabled() {
        return touchpadVisualizer();
    }

    /**
     * Returns true if the touchpad should allow tap dragging.
     *
+8 −0
Original line number Diff line number Diff line
@@ -5911,6 +5911,14 @@ public final class Settings {
         */
        public static final String SHOW_KEY_PRESSES = "show_key_presses";
        /**
         * Show touchpad input visualization on screen.
         * 0 = no
         * 1 = yes
         * @hide
         */
        public static final String TOUCHPAD_VISUALIZER = "touchpad_visualizer";
        /**
         * Show rotary input dispatched to focused windows on the screen.
         * 0 = no
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ message SystemSettingsProto {
        // 0 = no, 1 = yes
        optional SettingProto window_orientation_listener_log = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto show_key_presses = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto touchpad_visualizer = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
    }
    optional DevOptions developer_options = 7;

+5 −0
Original line number Diff line number Diff line
@@ -881,6 +881,11 @@
    <!-- UI debug setting: show physical key presses summary [CHAR LIMIT=150] -->
    <string name="show_key_presses_summary">Show visual feedback for physical key presses</string>

    <!-- UI debug setting: Title text for a debug setting that enables a visualization of touchpad input in a window on the screen  [CHAR LIMIT=50] -->
    <string name="touchpad_visualizer">Show touchpad input</string>
    <!-- UI debug setting: Summary text for a debug setting that enables a visualization of touchpad input in a window on the screen [CHAR LIMIT=150] -->
    <string name="touchpad_visualizer_summary">Screen overlay displaying touchpad input data and recognized gestures</string>

    <!-- UI debug setting: show where surface updates happen? [CHAR LIMIT=25] -->
    <string name="show_screen_updates">Show surface updates</string>
    <!-- UI debug setting: show surface updates summary [CHAR LIMIT=50] -->
+1 −0
Original line number Diff line number Diff line
@@ -200,6 +200,7 @@ public class SystemSettingsValidators {
        VALIDATORS.put(System.POINTER_LOCATION, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.SHOW_TOUCHES, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.SHOW_KEY_PRESSES, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.TOUCHPAD_VISUALIZER, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.SHOW_ROTARY_INPUT, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.WINDOW_ORIENTATION_LISTENER_LOG, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.LOCKSCREEN_SOUNDS_ENABLED, BOOLEAN_VALIDATOR);
Loading