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

Commit 0b2f7bab authored by Gilbert Lee's avatar Gilbert Lee Committed by Android (Google) Code Review
Browse files

Merge "Adjust maximum accessibility magnification scale from 5x to 8x"

parents 182bbb6d d38d6990
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line 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
         * called) or the service has been disconnected, this method will have
         * no effect and return {@code false}.
         * 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
         * @param animate {@code true} to animate from the current scale or
         *                {@code false} to set the scale immediately
         *                {@code false} to set the scale immediately
         * @return {@code true} on success, {@code false} on failure
         * @return {@code true} on success, {@code false} on failure
+1 −4
Original line number Original line Diff line number Diff line
@@ -32,7 +32,6 @@ import android.provider.Settings;
import android.text.TextUtils;
import android.text.TextUtils;
import android.util.MathUtils;
import android.util.MathUtils;
import android.util.Slog;
import android.util.Slog;
import android.util.SparseArray;
import android.view.Display;
import android.view.Display;
import android.view.MagnificationSpec;
import android.view.MagnificationSpec;
import android.view.View;
import android.view.View;
@@ -40,8 +39,6 @@ import android.view.animation.DecelerateInterpolator;


import com.android.internal.R;
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
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.internal.util.function.pooled.PooledLambda;
import com.android.server.LocalServices;
import com.android.server.LocalServices;
import com.android.server.wm.WindowManagerInternal;
import com.android.server.wm.WindowManagerInternal;
@@ -63,7 +60,7 @@ public class MagnificationController {
    private static final String LOG_TAG = "MagnificationController";
    private static final String LOG_TAG = "MagnificationController";


    public static final float MIN_SCALE = 1.0f;
    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;
    private static final boolean DEBUG_SET_MAGNIFICATION_SPEC = false;


+4 −1
Original line number Original line 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_PANNING_SCALING = false || DEBUG_ALL;
    private static final boolean DEBUG_EVENT_STREAM = 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 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;
    @VisibleForTesting final MagnificationController mMagnificationController;