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

Commit 044e2aef authored by Yorke Lee's avatar Yorke Lee
Browse files

Add a config flag to control app transitions

Bug: 32289964
Test: Build and verify that app transitions still work
and can be controlled by overlay

Cherry-picked from I78e88c4e7d3c32493c11be451b0c5ca59f68be83
Change-Id: I78e88c4e7d3c32493c11be451b0c5ca59f68be83
parent f501c314
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2632,4 +2632,11 @@

    <!-- An array of packages for which notifications cannot be blocked. -->
    <string-array translatable="false" name="config_nonBlockableNotificationPackages" />

    <!-- The default value for transition animation scale found in developer settings.
         1.0 corresponds to 1x animator scale, 0 means that there will be no transition
         animations. Note that this is only a default and will be overridden by a
         user-set value if toggled by settings so the "Transition animation scale" setting
         should also be hidden if intended to be permanent. -->
    <item name="config_appTransitionAnimationDurationScaleDefault" format="float" type="dimen">1.0</item>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -2730,4 +2730,6 @@
  <!-- Screen-size-dependent modes for picker dialogs. -->
  <java-symbol type="integer" name="time_picker_mode" />
  <java-symbol type="integer" name="date_picker_mode" />

  <java-symbol type="dimen" name="config_appTransitionAnimationDurationScaleDefault" />
</resources>
+4 −1
Original line number Diff line number Diff line
@@ -1039,7 +1039,10 @@ public class WindowManagerService extends IWindowManager.Stub
        mWindowAnimationScaleSetting = Settings.Global.getFloat(context.getContentResolver(),
                Settings.Global.WINDOW_ANIMATION_SCALE, mWindowAnimationScaleSetting);
        mTransitionAnimationScaleSetting = Settings.Global.getFloat(context.getContentResolver(),
                Settings.Global.TRANSITION_ANIMATION_SCALE, mTransitionAnimationScaleSetting);
                Settings.Global.TRANSITION_ANIMATION_SCALE,
                context.getResources().getFloat(
                        R.dimen.config_appTransitionAnimationDurationScaleDefault));

        setAnimatorDurationScale(Settings.Global.getFloat(context.getContentResolver(),
                Settings.Global.ANIMATOR_DURATION_SCALE, mAnimatorDurationScaleSetting));