summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/DevelopmentSettings.java
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2012-02-01 15:10:12 -0800
committerChet Haase <chet@google.com>2012-02-02 07:37:15 -0800
commitb29e7870de4238cbfa8eb7f3709bed7b49eeacdb (patch)
treeeb9fece94a7999fd77e40d9e969071c957aefc36 /src/com/android/settings/DevelopmentSettings.java
parent7ed71b7896c2572f8f876e100a0b8c1689632e2f (diff)
downloadpackages_apps_Settings-b29e7870de4238cbfa8eb7f3709bed7b49eeacdb.zip
packages_apps_Settings-b29e7870de4238cbfa8eb7f3709bed7b49eeacdb.tar.gz
packages_apps_Settings-b29e7870de4238cbfa8eb7f3709bed7b49eeacdb.tar.bz2
Add Developer Option setting for Animator scaling.
This new setting allows users to set a scale factor for the duration and startDelay of all Animator-based animations. This setting is very similar to the Transition animation scale and Window animation scale settings, except this one applies specifically to Animator animations. The property is only accessible by users through the Settings UI, not programmatically. The value applies system-wide and is picked up per-process at the time of the first ValueAnimator construction. Change-Id: I4fd02b03e508495b39481bfc8904d8771d0fd4e1
Diffstat (limited to 'src/com/android/settings/DevelopmentSettings.java')
-rw-r--r--src/com/android/settings/DevelopmentSettings.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 2ffae19..4a292c4 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -70,6 +70,7 @@ public class DevelopmentSettings extends PreferenceFragment
private static final String FORCE_HARDWARE_UI_KEY = "force_hw_ui";
private static final String WINDOW_ANIMATION_SCALE_KEY = "window_animation_scale";
private static final String TRANSITION_ANIMATION_SCALE_KEY = "transition_animation_scale";
+ private static final String ANIMATOR_DURATION_SCALE_KEY = "animator_duration_scale";
private static final String IMMEDIATELY_DESTROY_ACTIVITIES_KEY
= "immediately_destroy_activities";
@@ -93,6 +94,7 @@ public class DevelopmentSettings extends PreferenceFragment
private CheckBoxPreference mForceHardwareUi;
private ListPreference mWindowAnimationScale;
private ListPreference mTransitionAnimationScale;
+ private ListPreference mAnimatorDurationScale;
private CheckBoxPreference mImmediatelyDestroyActivities;
private ListPreference mAppProcessLimit;
@@ -129,6 +131,8 @@ public class DevelopmentSettings extends PreferenceFragment
mWindowAnimationScale.setOnPreferenceChangeListener(this);
mTransitionAnimationScale = (ListPreference) findPreference(TRANSITION_ANIMATION_SCALE_KEY);
mTransitionAnimationScale.setOnPreferenceChangeListener(this);
+ mAnimatorDurationScale = (ListPreference) findPreference(ANIMATOR_DURATION_SCALE_KEY);
+ mAnimatorDurationScale.setOnPreferenceChangeListener(this);
mImmediatelyDestroyActivities = (CheckBoxPreference) findPreference(
IMMEDIATELY_DESTROY_ACTIVITIES_KEY);
@@ -359,6 +363,7 @@ public class DevelopmentSettings extends PreferenceFragment
private void updateAnimationScaleOptions() {
updateAnimationScaleValue(0, mWindowAnimationScale);
updateAnimationScaleValue(1, mTransitionAnimationScale);
+ updateAnimationScaleValue(2, mAnimatorDurationScale);
}
private void writeAnimationScaleOption(int which, ListPreference pref, Object newValue) {
@@ -473,6 +478,9 @@ public class DevelopmentSettings extends PreferenceFragment
} else if (preference == mTransitionAnimationScale) {
writeAnimationScaleOption(1, mTransitionAnimationScale, newValue);
return true;
+ } else if (preference == mAnimatorDurationScale) {
+ writeAnimationScaleOption(2, mAnimatorDurationScale, newValue);
+ return true;
} else if (preference == mAppProcessLimit) {
writeAppProcessLimitOptions(newValue);
return true;