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

Commit 512528a7 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Gerrit Code Review
Browse files

Merge "Merge "Test API's for mouse pointer speed" into android14-tests-dev am:...

Merge "Merge "Test API's for mouse pointer speed" into android14-tests-dev am: 8ac722f2" into main
parents dda33d5b 8863498d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1630,6 +1630,7 @@ package android.hardware.input {
    method @NonNull public java.util.List<java.lang.String> getKeyboardLayoutDescriptorsForInputDevice(@NonNull android.view.InputDevice);
    method @NonNull public String getKeyboardLayoutTypeForLayoutDescriptor(@NonNull String);
    method @NonNull @RequiresPermission(android.Manifest.permission.REMAP_MODIFIER_KEYS) public java.util.Map<java.lang.Integer,java.lang.Integer> getModifierKeyRemapping();
    method public int getMousePointerSpeed();
    method @RequiresPermission(android.Manifest.permission.REMAP_MODIFIER_KEYS) public void remapModifierKey(int, int);
    method @RequiresPermission(android.Manifest.permission.SET_KEYBOARD_LAYOUT) public void removeKeyboardLayoutForInputDevice(@NonNull android.hardware.input.InputDeviceIdentifier, @NonNull String);
    method public void removeUniqueIdAssociation(@NonNull String);
@@ -1639,6 +1640,7 @@ package android.hardware.input {

  public class InputSettings {
    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public static void setMaximumObscuringOpacityForTouch(@NonNull android.content.Context, @FloatRange(from=0, to=1) float);
    field public static final int DEFAULT_POINTER_SPEED = 0; // 0x0
  }

}
@@ -2790,6 +2792,10 @@ package android.provider {
    field public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service";
  }

  public static final class Settings.System extends android.provider.Settings.NameValueTable {
    field public static final String POINTER_SPEED = "pointer_speed";
  }

  public static final class Telephony.Sms.Intents {
    field public static final String SMS_CARRIER_PROVISION_ACTION = "android.provider.Telephony.SMS_CARRIER_PROVISION";
  }
+3 −0
Original line number Diff line number Diff line
@@ -63,6 +63,9 @@ interface IInputManager {
    // active keyboard layout.
    int getKeyCodeForKeyLocation(int deviceId, in int locationKeyCode);

    // Returns the mouse pointer speed.
    int getMousePointerSpeed();

    // Temporarily changes the pointer speed.
    void tryPointerSpeed(int speed);

+23 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SuppressLint;
import android.annotation.SystemService;
import android.annotation.TestApi;
import android.annotation.UserIdInt;
@@ -834,6 +835,28 @@ public final class InputManager {
        }
    }

    /**
     * Returns the mouse pointer speed.
     *
     * <p>The pointer speed is a value between {@link InputSettings#MIN_POINTER_SPEED} and
     * {@link InputSettings#MAX_POINTER_SPEED}, the default value being
     * {@link InputSettings#DEFAULT_POINTER_SPEED}.
     *
     * <p> Note that while setting the mouse pointer speed, it's possible that the input reader has
     * only received this value and has not yet completed reconfiguring itself with this value.
     *
     * @hide
     */
    @SuppressLint("UnflaggedApi") // TestApi without associated feature.
    @TestApi
    public int getMousePointerSpeed() {
        try {
            return mIm.getMousePointerSpeed();
        } catch (RemoteException ex) {
            throw ex.rethrowFromSystemServer();
        }
    }

    /**
     * Changes the mouse pointer speed temporarily, but does not save the setting.
     * <p>
+1 −1
Original line number Diff line number Diff line
@@ -48,8 +48,8 @@ public class InputSettings {

    /**
     * Pointer Speed: The default pointer speed (0).
     * @hide
     */
    @SuppressLint("UnflaggedApi") // TestApi without associated feature.
    public static final int DEFAULT_POINTER_SPEED = 0;

    /**
+2 −0
Original line number Diff line number Diff line
@@ -5651,8 +5651,10 @@ public final class Settings {
         *   +7 = fastest
         * @hide
         */
        @SuppressLint({"NoSettingsProvider", "UnflaggedApi"}) // TestApi without associated feature.
        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
        @Readable
        @TestApi
        public static final String POINTER_SPEED = "pointer_speed";
        /**
Loading