summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2017-06-13 07:15:46 -0700
committerChet Haase <chet@google.com>2017-06-14 18:55:19 -0700
commite5b44043f75bab47955652b5bd98502ce2294f37 (patch)
treee379e4546033dc41b4c422a70b9eadd161953968
parentc7ea7effde64c682ba8ddaca0fd9ac4354029e41 (diff)
Make --no-window-animation flag apply to animators, too
There is a flag for 'adb shell am instrument' that disables animations, which is useful for testing (if you want to, for example, disable animations to speed up tests or remove animation-caused side-effects as a factor). But only the pre-honeycomb animations (window transitions and window animations) were listening to this flag. This change makes animators listen as well, so all three duration scale settings are affected. Bug: 32072407 --no_window_animation ADB arg should set all animation scales to 0.0f Test: manual. Ran frameworks APCT tests with --no_window_animation and verified that all three types of animations had their duration scales set to 0 for the duration of the tests. Change-Id: I5ae4a60faa714c9534dfae58d1efcd54f577d82b
-rw-r--r--cmds/am/src/com/android/commands/am/Instrument.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds/am/src/com/android/commands/am/Instrument.java b/cmds/am/src/com/android/commands/am/Instrument.java
index 8eefd256a69d..4966b4380d9b 100644
--- a/cmds/am/src/com/android/commands/am/Instrument.java
+++ b/cmds/am/src/com/android/commands/am/Instrument.java
@@ -382,6 +382,7 @@ public class Instrument {
oldAnims = mWm.getAnimationScales();
mWm.setAnimationScale(0, 0.0f);
mWm.setAnimationScale(1, 0.0f);
+ mWm.setAnimationScale(2, 0.0f);
}
// Figure out which component we are tring to do.