Remove FlingAnimationUtils.Builder provider.

Mark it as directly injectable.

Use a Provider<> of the Builder so that, if DisplayMetrics changes,
the changes get picked up.

Fixes: 174653877
Test: manual
Change-Id: If8b404cbb7f5111144c21ce4810323d95f962359
diff --git a/libs/WindowManager/Shell/Android.bp b/libs/WindowManager/Shell/Android.bp
index 39e32c6..856c9c2 100644
--- a/libs/WindowManager/Shell/Android.bp
+++ b/libs/WindowManager/Shell/Android.bp
@@ -125,9 +125,10 @@
         "protolog-lib",
         "SettingsLib",
         "WindowManager-Shell-proto",
+        "jsr330"
     ],
     kotlincflags: ["-Xjvm-default=enable"],
     manifest: "AndroidManifest.xml",
 
     min_sdk_version: "26",
-}
\ No newline at end of file
+}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/animation/FlingAnimationUtils.java b/libs/WindowManager/Shell/src/com/android/wm/shell/animation/FlingAnimationUtils.java
index 357f777..176c620 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/animation/FlingAnimationUtils.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/animation/FlingAnimationUtils.java
@@ -23,6 +23,8 @@
 import android.view.animation.Interpolator;
 import android.view.animation.PathInterpolator;
 
+import javax.inject.Inject;
+
 /**
  * Utility class to calculate general fling animation when the finger is released.
  */
@@ -368,6 +370,7 @@
         float mX2;
         float mY2;
 
+        @Inject
         public Builder(DisplayMetrics displayMetrics) {
             mDisplayMetrics = displayMetrics;
             reset();