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

Commit b8e709fb authored by Chet Haase's avatar Chet Haase Committed by Android Git Automerger
Browse files

am b29e7870: Add Developer Option setting for Animator scaling.

* commit 'b29e7870':
  Add Developer Option setting for Animator scaling.
parents 7f95c071 b29e7870
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -646,6 +646,28 @@
        <item>10</item>
    </string-array>

    <!-- Titles for animator duration scale preference. [CHAR LIMIT=35] -->
    <string-array name="animator_duration_scale_entries">
        <item>Animation off</item>
        <item>Animation scale .5x</item>
        <item>Animation scale 1x</item>
        <item>Animation scale 1.5x</item>
        <item>Animation scale 2x</item>
        <item>Animation scale 5x</item>
        <item>Animation scale 10x</item>
    </string-array>

    <!-- Values for animator duration scale preference. -->
    <string-array name="animator_duration_scale_values" translatable="false" >
        <item>0</item>
        <item>.5</item>
        <item>1</item>
        <item>1.5</item>
        <item>2</item>
        <item>5</item>
        <item>10</item>
    </string-array>

    <!-- Titles for app process limit preference. [CHAR LIMIT=35] -->
    <string-array name="app_process_limit_entries">
        <item>Standard limit</item>
+3 −0
Original line number Diff line number Diff line
@@ -3516,6 +3516,9 @@
    <!-- UI debug setting: scaling factor for transition animations [CHAR LIMIT=25] -->
    <string name="transition_animation_scale_title">Transition animation scale</string>

    <!-- UI debug setting: scaling factor for all Animator-based animations [CHAR LIMIT=25] -->
    <string name="animator_duration_scale_title">Animator duration scale</string>

    <!-- Preference category for application debugging development settings. [CHAR LIMIT=25] -->
    <string name="debug_applications_category">Apps</string>

+7 −0
Original line number Diff line number Diff line
@@ -104,6 +104,13 @@
            android:entries="@array/transition_animation_scale_entries"
            android:entryValues="@array/transition_animation_scale_values" />

        <ListPreference
            android:key="animator_duration_scale"
            android:title="@string/animator_duration_scale_title"
            android:persistent="false"
            android:entries="@array/animator_duration_scale_entries"
            android:entryValues="@array/animator_duration_scale_values" />

    </PreferenceCategory>

    <PreferenceCategory android:key="debug_applications_category"
+8 −0
Original line number Diff line number Diff line
@@ -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;