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

Commit d38d6990 authored by Gilbert Lee's avatar Gilbert Lee
Browse files

Adjust maximum accessibility magnification scale from 5x to 8x

Bug: 76414773
Test: Manual
      atest FrameworksServicesTests:com.android.server.accessibility

Change-Id: I558c641bc65ba07a6544d439c8616a7e5d6960b4
parent 6150cc58
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1090,7 +1090,7 @@ public abstract class AccessibilityService extends Service {
         * called) or the service has been disconnected, this method will have
         * no effect and return {@code false}.
         *
         * @param scale the magnification scale to set, must be >= 1 and <= 5
         * @param scale the magnification scale to set, must be >= 1 and <= 8
         * @param animate {@code true} to animate from the current scale or
         *                {@code false} to set the scale immediately
         * @return {@code true} on success, {@code false} on failure
+1 −4
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ import android.provider.Settings;
import android.text.TextUtils;
import android.util.MathUtils;
import android.util.Slog;
import android.util.SparseArray;
import android.view.Display;
import android.view.MagnificationSpec;
import android.view.View;
@@ -40,8 +39,6 @@ import android.view.animation.DecelerateInterpolator;

import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.os.SomeArgs;
import com.android.internal.util.function.pooled.PooledLambda;
import com.android.server.LocalServices;
import com.android.server.wm.WindowManagerInternal;
@@ -63,7 +60,7 @@ public class MagnificationController {
    private static final String LOG_TAG = "MagnificationController";

    public static final float MIN_SCALE = 1.0f;
    public static final float MAX_SCALE = 5.0f;
    public static final float MAX_SCALE = 8.0f;

    private static final boolean DEBUG_SET_MAGNIFICATION_SPEC = false;

+4 −1
Original line number Diff line number Diff line
@@ -115,8 +115,11 @@ class MagnificationGestureHandler extends BaseEventStreamTransformation {
    private static final boolean DEBUG_PANNING_SCALING = false || DEBUG_ALL;
    private static final boolean DEBUG_EVENT_STREAM = false || DEBUG_ALL;

    // The MIN_SCALE is different from MagnificationController.MIN_SCALE due
    // to AccessibilityService.MagnificationController#setScale() has
    // different scale range
    private static final float MIN_SCALE = 2.0f;
    private static final float MAX_SCALE = 5.0f;
    private static final float MAX_SCALE = MagnificationController.MAX_SCALE;

    @VisibleForTesting final MagnificationController mMagnificationController;