Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +17 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,9 @@ public class BubbleController implements BubbleExpandedView.OnBubbleBlockedListe /** Flag to position the header below the activity view */ private static final String ENABLE_BUBBLE_FOOTER = "experiment_enable_bubble_footer"; private static final String BUBBLE_STIFFNESS = "experiment_bubble_stiffness"; private static final String BUBBLE_BOUNCINESS = "experiment_bubble_bounciness"; private final Context mContext; private final NotificationEntryManager mNotificationEntryManager; private final IActivityTaskManager mActivityTaskManager; Loading Loading @@ -569,6 +572,20 @@ public class BubbleController implements BubbleExpandedView.OnBubbleBlockedListe ENABLE_BUBBLE_FOOTER, 0) != 0; } /** Default stiffness to use for bubble physics animations. */ public static int getBubbleStiffness(Context context, int defaultStiffness) { return Settings.Secure.getInt( context.getContentResolver(), BUBBLE_STIFFNESS, defaultStiffness); } /** Default bounciness/damping ratio to use for bubble physics animations. */ public static float getBubbleBounciness(Context context, float defaultBounciness) { return Settings.Secure.getInt( context.getContentResolver(), BUBBLE_BOUNCINESS, (int) (defaultBounciness * 100)) / 100f; } /** PinnedStackListener that dispatches IME visibility updates to the stack. */ private class BubblesImeListener extends IPinnedStackListener.Stub { Loading packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java +2 −2 Original line number Diff line number Diff line Loading @@ -266,8 +266,8 @@ public class ExpandedAnimationController @Override SpringForce getSpringForce(DynamicAnimation.ViewProperty property, View view) { return new SpringForce() .setStiffness(SpringForce.STIFFNESS_LOW) .setDampingRatio(SpringForce.DAMPING_RATIO_LOW_BOUNCY); .setDampingRatio(SpringForce.DAMPING_RATIO_LOW_BOUNCY) .setStiffness(SpringForce.STIFFNESS_LOW); } @Override Loading packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java +5 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import androidx.dynamicanimation.animation.SpringAnimation; import androidx.dynamicanimation.animation.SpringForce; import com.android.systemui.R; import com.android.systemui.bubbles.BubbleController; import com.google.android.collect.Sets; Loading Loading @@ -337,8 +338,10 @@ public class StackAnimationController extends @Override SpringForce getSpringForce(DynamicAnimation.ViewProperty property, View view) { return new SpringForce() .setDampingRatio(DEFAULT_BOUNCINESS) .setStiffness(DEFAULT_STIFFNESS); .setDampingRatio(BubbleController.getBubbleBounciness( mLayout.getContext(), DEFAULT_BOUNCINESS)) .setStiffness(BubbleController.getBubbleStiffness( mLayout.getContext(), (int) (DEFAULT_STIFFNESS * 100f))); } @Override Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +17 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,9 @@ public class BubbleController implements BubbleExpandedView.OnBubbleBlockedListe /** Flag to position the header below the activity view */ private static final String ENABLE_BUBBLE_FOOTER = "experiment_enable_bubble_footer"; private static final String BUBBLE_STIFFNESS = "experiment_bubble_stiffness"; private static final String BUBBLE_BOUNCINESS = "experiment_bubble_bounciness"; private final Context mContext; private final NotificationEntryManager mNotificationEntryManager; private final IActivityTaskManager mActivityTaskManager; Loading Loading @@ -569,6 +572,20 @@ public class BubbleController implements BubbleExpandedView.OnBubbleBlockedListe ENABLE_BUBBLE_FOOTER, 0) != 0; } /** Default stiffness to use for bubble physics animations. */ public static int getBubbleStiffness(Context context, int defaultStiffness) { return Settings.Secure.getInt( context.getContentResolver(), BUBBLE_STIFFNESS, defaultStiffness); } /** Default bounciness/damping ratio to use for bubble physics animations. */ public static float getBubbleBounciness(Context context, float defaultBounciness) { return Settings.Secure.getInt( context.getContentResolver(), BUBBLE_BOUNCINESS, (int) (defaultBounciness * 100)) / 100f; } /** PinnedStackListener that dispatches IME visibility updates to the stack. */ private class BubblesImeListener extends IPinnedStackListener.Stub { Loading
packages/SystemUI/src/com/android/systemui/bubbles/animation/ExpandedAnimationController.java +2 −2 Original line number Diff line number Diff line Loading @@ -266,8 +266,8 @@ public class ExpandedAnimationController @Override SpringForce getSpringForce(DynamicAnimation.ViewProperty property, View view) { return new SpringForce() .setStiffness(SpringForce.STIFFNESS_LOW) .setDampingRatio(SpringForce.DAMPING_RATIO_LOW_BOUNCY); .setDampingRatio(SpringForce.DAMPING_RATIO_LOW_BOUNCY) .setStiffness(SpringForce.STIFFNESS_LOW); } @Override Loading
packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java +5 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import androidx.dynamicanimation.animation.SpringAnimation; import androidx.dynamicanimation.animation.SpringForce; import com.android.systemui.R; import com.android.systemui.bubbles.BubbleController; import com.google.android.collect.Sets; Loading Loading @@ -337,8 +338,10 @@ public class StackAnimationController extends @Override SpringForce getSpringForce(DynamicAnimation.ViewProperty property, View view) { return new SpringForce() .setDampingRatio(DEFAULT_BOUNCINESS) .setStiffness(DEFAULT_STIFFNESS); .setDampingRatio(BubbleController.getBubbleBounciness( mLayout.getContext(), DEFAULT_BOUNCINESS)) .setStiffness(BubbleController.getBubbleStiffness( mLayout.getContext(), (int) (DEFAULT_STIFFNESS * 100f))); } @Override Loading