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

Commit dcee5c41 authored by ktanojo's avatar ktanojo Committed by Kiara Patricia
Browse files

Add config to enable/disable single panning depending on device

updateController will load the default value from the respective
config/xml file and set the value to the default value. This feature
will be disabled by default, but can be enabled by devices via config
overlay

Bug: 282065026, 279498927
Test: manual test
Change-Id: I23ee76d41f8de7b75e8ff224f027a45c1257d67e
parent 90a49af2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6559,6 +6559,10 @@
         serialization, a default vibration will be used.
         Note that, indefinitely repeating vibrations are not allowed as shutdown vibrations. -->
    <string name="config_defaultShutdownVibrationFile" />

    <!-- Whether single finger panning is enabled when magnification is on -->
    <bool name="config_enable_a11y_magnification_single_panning">false</bool>

    <!-- The file path in which custom vibrations are provided for haptic feedbacks.
         If the device does not specify any such file path here, if the file path specified here
         does not exist, or if the contents of the file does not make up a valid customization
+3 −0
Original line number Diff line number Diff line
@@ -5179,5 +5179,8 @@
  <java-symbol type="drawable" name="focus_event_pressed_key_background" />
  <java-symbol type="string" name="config_defaultShutdownVibrationFile" />
  <java-symbol type="string" name="lockscreen_too_many_failed_attempts_countdown" />

  <java-symbol type="bool" name="config_enable_a11y_magnification_single_panning" />

  <java-symbol type="string" name="config_hapticFeedbackCustomizationFile" />
</resources>
+3 −1
Original line number Diff line number Diff line
@@ -204,7 +204,9 @@ public class FullScreenMagnificationGestureHandler extends MagnificationGestureH
        mViewportDraggingState = new ViewportDraggingState();
        mPanningScalingState = new PanningScalingState(context);
        mSinglePanningState = new SinglePanningState(context);
        setSinglePanningEnabled(false);
        setSinglePanningEnabled(
                context.getResources()
                        .getBoolean(R.bool.config_enable_a11y_magnification_single_panning));

        if (mDetectShortcutTrigger) {
            mScreenStateReceiver = new ScreenStateReceiver(context, this);