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

Commit eb563a04 authored by Yuhan Yang's avatar Yuhan Yang Committed by Android (Google) Code Review
Browse files

Merge "Fix flaky onMotionEvent_initClickSchedulerDelayFromSetting" into main

parents d47e010c 84ffc17e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -82,13 +82,13 @@ import com.android.server.accessibility.Flags;
 */
public class AutoclickController extends BaseEventStreamTransformation {

    public static final int DEFAULT_AUTOCLICK_DELAY_TIME = Flags.enableAutoclickIndicator()
            ? AUTOCLICK_DELAY_WITH_INDICATOR_DEFAULT : AUTOCLICK_DELAY_DEFAULT;

    private static final String LOG_TAG = AutoclickController.class.getSimpleName();
    // TODO(b/393559560): Finalize scroll amount.
    private static final float SCROLL_AMOUNT = 1.0f;

    private static final int DEFAULT_AUTOCLICK_DELAY_TIME = Flags.enableAutoclickIndicator()
            ? AUTOCLICK_DELAY_WITH_INDICATOR_DEFAULT : AUTOCLICK_DELAY_DEFAULT;

    private final AccessibilityTraceManager mTrace;
    private final Context mContext;
    private final int mUserId;
+1 −1
Original line number Diff line number Diff line
@@ -269,7 +269,7 @@ public class AutoclickControllerTest {
                Settings.Secure.getIntForUser(
                        mTestableContext.getContentResolver(),
                        Settings.Secure.ACCESSIBILITY_AUTOCLICK_DELAY,
                        AccessibilityManager.AUTOCLICK_DELAY_WITH_INDICATOR_DEFAULT,
                        mController.DEFAULT_AUTOCLICK_DELAY_TIME,
                        mTestableContext.getUserId());
        assertThat(mController.mClickScheduler.getDelayForTesting()).isEqualTo(delay);
    }