Loading core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -3074,6 +3074,7 @@ package android.accessibilityservice { method public void onSystemActionsChanged(); method public final boolean performGlobalAction(int); method public void setAccessibilityFocusAppearance(int, @ColorInt int); method public void setAnimationScale(float); method public boolean setCacheEnabled(boolean); method public void setGestureDetectionPassthroughRegion(int, @NonNull android.graphics.Region); method public final void setServiceInfo(android.accessibilityservice.AccessibilityServiceInfo); Loading Loading @@ -6949,6 +6950,7 @@ package android.app { method public boolean performGlobalAction(int); method public void revokeRuntimePermission(String, String); method public void revokeRuntimePermissionAsUser(String, String, android.os.UserHandle); method public void setAnimationScale(float); method public void setOnAccessibilityEventListener(android.app.UiAutomation.OnAccessibilityEventListener); method public boolean setRotation(int); method public void setRunAsMonkey(boolean); core/java/android/accessibilityservice/AccessibilityService.java +27 −0 Original line number Diff line number Diff line Loading @@ -3120,6 +3120,33 @@ public abstract class AccessibilityService extends Service { } } /** * Sets the system settings values that control the scaling factor for animations. The scale * controls the animation playback speed for animations that respect these settings. Animations * that do not respect the settings values will not be affected by this function. A lower scale * value results in a faster speed. A value of <code>0</code> disables animations entirely. When * animations are disabled services receive window change events more quickly which can reduce * the potential by confusion by reducing the time during which windows are in transition. * * @see AccessibilityEvent#TYPE_WINDOWS_CHANGED * @see AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED * @see android.provider.Settings.Global#WINDOW_ANIMATION_SCALE * @see android.provider.Settings.Global#TRANSITION_ANIMATION_SCALE * @see android.provider.Settings.Global#ANIMATOR_DURATION_SCALE * @param scale The scaling factor for all animations. */ public void setAnimationScale(float scale) { final IAccessibilityServiceConnection connection = AccessibilityInteractionClient.getInstance(this).getConnection(mConnectionId); if (connection != null) { try { connection.setAnimationScale(scale); } catch (RemoteException re) { throw new RuntimeException(re); } } } private static class AccessibilityContext extends ContextWrapper { private final int mConnectionId; Loading core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -144,4 +144,6 @@ interface IAccessibilityServiceConnection { void onDoubleTap(int displayId); void onDoubleTapAndHold(int displayId); void setAnimationScale(float scale); } core/java/android/app/UiAutomation.java +27 −0 Original line number Diff line number Diff line Loading @@ -779,6 +779,33 @@ public final class UiAutomation { return false; } /** * Sets the system settings values that control the scaling factor for animations. The scale * controls the animation playback speed for animations that respect these settings. Animations * that do not respect the settings values will not be affected by this function. A lower scale * value results in a faster speed. A value of <code>0</code> disables animations entirely. When * animations are disabled services receive window change events more quickly which can reduce * the potential by confusion by reducing the time during which windows are in transition. * * @see AccessibilityEvent#TYPE_WINDOWS_CHANGED * @see AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED * @see android.provider.Settings.Global#WINDOW_ANIMATION_SCALE * @see android.provider.Settings.Global#TRANSITION_ANIMATION_SCALE * @see android.provider.Settings.Global#ANIMATOR_DURATION_SCALE * @param scale The scaling factor for all animations. */ public void setAnimationScale(float scale) { final IAccessibilityServiceConnection connection = AccessibilityInteractionClient.getInstance().getConnection(mConnectionId); if (connection != null) { try { connection.setAnimationScale(scale); } catch (RemoteException re) { throw new RuntimeException(re); } } } /** * A request for WindowManagerService to wait until all animations have completed and input * information has been sent from WindowManager to native InputManager. Loading core/tests/coretests/src/android/view/accessibility/AccessibilityServiceConnectionImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -204,4 +204,6 @@ public class AccessibilityServiceConnectionImpl extends IAccessibilityServiceCon public void logTrace(long timestamp, String where, long loggingTypes, String callingParams, int processId, long threadId, int callingUid, Bundle serializedCallingStackInBundle) {} public void setAnimationScale(float scale) {} } Loading
core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -3074,6 +3074,7 @@ package android.accessibilityservice { method public void onSystemActionsChanged(); method public final boolean performGlobalAction(int); method public void setAccessibilityFocusAppearance(int, @ColorInt int); method public void setAnimationScale(float); method public boolean setCacheEnabled(boolean); method public void setGestureDetectionPassthroughRegion(int, @NonNull android.graphics.Region); method public final void setServiceInfo(android.accessibilityservice.AccessibilityServiceInfo); Loading Loading @@ -6949,6 +6950,7 @@ package android.app { method public boolean performGlobalAction(int); method public void revokeRuntimePermission(String, String); method public void revokeRuntimePermissionAsUser(String, String, android.os.UserHandle); method public void setAnimationScale(float); method public void setOnAccessibilityEventListener(android.app.UiAutomation.OnAccessibilityEventListener); method public boolean setRotation(int); method public void setRunAsMonkey(boolean);
core/java/android/accessibilityservice/AccessibilityService.java +27 −0 Original line number Diff line number Diff line Loading @@ -3120,6 +3120,33 @@ public abstract class AccessibilityService extends Service { } } /** * Sets the system settings values that control the scaling factor for animations. The scale * controls the animation playback speed for animations that respect these settings. Animations * that do not respect the settings values will not be affected by this function. A lower scale * value results in a faster speed. A value of <code>0</code> disables animations entirely. When * animations are disabled services receive window change events more quickly which can reduce * the potential by confusion by reducing the time during which windows are in transition. * * @see AccessibilityEvent#TYPE_WINDOWS_CHANGED * @see AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED * @see android.provider.Settings.Global#WINDOW_ANIMATION_SCALE * @see android.provider.Settings.Global#TRANSITION_ANIMATION_SCALE * @see android.provider.Settings.Global#ANIMATOR_DURATION_SCALE * @param scale The scaling factor for all animations. */ public void setAnimationScale(float scale) { final IAccessibilityServiceConnection connection = AccessibilityInteractionClient.getInstance(this).getConnection(mConnectionId); if (connection != null) { try { connection.setAnimationScale(scale); } catch (RemoteException re) { throw new RuntimeException(re); } } } private static class AccessibilityContext extends ContextWrapper { private final int mConnectionId; Loading
core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -144,4 +144,6 @@ interface IAccessibilityServiceConnection { void onDoubleTap(int displayId); void onDoubleTapAndHold(int displayId); void setAnimationScale(float scale); }
core/java/android/app/UiAutomation.java +27 −0 Original line number Diff line number Diff line Loading @@ -779,6 +779,33 @@ public final class UiAutomation { return false; } /** * Sets the system settings values that control the scaling factor for animations. The scale * controls the animation playback speed for animations that respect these settings. Animations * that do not respect the settings values will not be affected by this function. A lower scale * value results in a faster speed. A value of <code>0</code> disables animations entirely. When * animations are disabled services receive window change events more quickly which can reduce * the potential by confusion by reducing the time during which windows are in transition. * * @see AccessibilityEvent#TYPE_WINDOWS_CHANGED * @see AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED * @see android.provider.Settings.Global#WINDOW_ANIMATION_SCALE * @see android.provider.Settings.Global#TRANSITION_ANIMATION_SCALE * @see android.provider.Settings.Global#ANIMATOR_DURATION_SCALE * @param scale The scaling factor for all animations. */ public void setAnimationScale(float scale) { final IAccessibilityServiceConnection connection = AccessibilityInteractionClient.getInstance().getConnection(mConnectionId); if (connection != null) { try { connection.setAnimationScale(scale); } catch (RemoteException re) { throw new RuntimeException(re); } } } /** * A request for WindowManagerService to wait until all animations have completed and input * information has been sent from WindowManager to native InputManager. Loading
core/tests/coretests/src/android/view/accessibility/AccessibilityServiceConnectionImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -204,4 +204,6 @@ public class AccessibilityServiceConnectionImpl extends IAccessibilityServiceCon public void logTrace(long timestamp, String where, long loggingTypes, String callingParams, int processId, long threadId, int callingUid, Bundle serializedCallingStackInBundle) {} public void setAnimationScale(float scale) {} }