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

Commit 82d5bdda authored by Yeabkal Wubshit's avatar Yeabkal Wubshit
Browse files

Hide haptic feedback ViewConfiguration APIs

Clients are expected to use the ScrollFeedbackProvider without having to
know the haptic feedback configuration details, so there is no need to
publish these APIs now.

Bug: 299647683
Test: CTS test removed
Change-Id: Ib95bc1b91f8959255d5fe5570b9ff426de6ec5fc
parent 0aaf6a43
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -52580,7 +52580,6 @@ package android.view {
    method @Deprecated public static int getEdgeSlop();
    method @Deprecated public static int getFadingEdgeLength();
    method @Deprecated public static long getGlobalActionKeyTimeout();
    method @FlaggedApi("android.view.flags.scroll_feedback_api") public int getHapticScrollFeedbackTickInterval(int, int, int);
    method public static int getJumpTapTimeout();
    method public static int getKeyRepeatDelay();
    method public static int getKeyRepeatTimeout();
@@ -52620,7 +52619,6 @@ package android.view {
    method @Deprecated public static int getWindowTouchSlop();
    method public static long getZoomControlsTimeout();
    method public boolean hasPermanentMenuKey();
    method @FlaggedApi("android.view.flags.scroll_feedback_api") public boolean isHapticScrollFeedbackEnabled(int, int, int);
    method public boolean shouldShowMenuShortcutsWhenKeyboardPresent();
  }
+4 −3
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package android.view;

import android.annotation.FlaggedApi;
import android.annotation.FloatRange;
import android.annotation.NonNull;
import android.annotation.TestApi;
@@ -1272,8 +1271,9 @@ public class ViewConfiguration {
     * @see InputDevice#getMotionRanges()
     * @see InputDevice#getMotionRange(int)
     * @see InputDevice#getMotionRange(int, int)
     *
     * @hide
     */
    @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API)
    public boolean isHapticScrollFeedbackEnabled(int inputDeviceId, int axis, int source) {
        if (!isInputDeviceInfoValid(inputDeviceId, axis, source)) return false;

@@ -1315,8 +1315,9 @@ public class ViewConfiguration {
     *      returns {@code Integer.MAX_VALUE}.
     *
     * @see #isHapticScrollFeedbackEnabled(int, int, int)
     *
     * @hide
     */
    @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API)
    public int getHapticScrollFeedbackTickInterval(int inputDeviceId, int axis, int source) {
        if (!mRotaryEncoderHapticScrollFeedbackEnabled) {
            return NO_HAPTIC_SCROLL_TICK_INTERVAL;