Commits

Chet Haase  committed dbc51de Merge

am 53771e5f: Merge "Remove useless/repetitive code"

* commit '53771e5f955f67035cf6b6432c34171a18ab14dc':
Remove useless/repetitive code

  • Participants
  • Parent commits e964387, 53771e5

Comments (0)

Files changed (1)

File services/java/com/android/server/wm/WindowManagerService.java

             throw new SecurityException("Requires SET_ANIMATION_SCALE permission");
         }
 
-        if (scale < 0) scale = 0;
-        else if (scale > 20) scale = 20;
-        scale = Math.abs(scale);
+        scale = fixScale(scale);
         switch (which) {
-            case 0: mWindowAnimationScale = fixScale(scale); break;
-            case 1: mTransitionAnimationScale = fixScale(scale); break;
-            case 2: mAnimatorDurationScale = fixScale(scale); break;
+            case 0: mWindowAnimationScale = scale; break;
+            case 1: mTransitionAnimationScale = scale; break;
+            case 2: mAnimatorDurationScale = scale; break;
         }
 
         // Persist setting