am dc8cda5a: Make sure glowpad is centered when gravity is centered.
* commit 'dc8cda5a71ee4ee644561fed0767c6d0b3a3447d':
Make sure glowpad is centered when gravity is centered.
diff --git a/InCallUI/res/layout/answer_fragment.xml b/InCallUI/res/layout/answer_fragment.xml
index 4f31e3f..ee2b076 100644
--- a/InCallUI/res/layout/answer_fragment.xml
+++ b/InCallUI/res/layout/answer_fragment.xml
@@ -24,6 +24,7 @@
android:layout_height="wrap_content"
android:focusable="true"
android:layout_centerHorizontal="true"
+ android:gravity="center"
android:background="@android:color/black"
android:visibility="gone"
diff --git a/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java b/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java
index 3fc978a..a346ba5 100644
--- a/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java
+++ b/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java
@@ -48,7 +48,7 @@
/**
* This is a copy of com.android.internal.widget.multiwaveview.GlowPadView with minor changes
* to remove dependencies on private api's.
- *
+ *
* Incoporated the scaling functionality.
*
* A re-usable widget containing a center, outer ring and wave animation.
@@ -1114,9 +1114,9 @@
final float placementWidth = getRingWidth();
final float placementHeight = getRingHeight();
float newWaveCenterX = mHorizontalInset
- + Math.max(width, mMaxTargetWidth + placementWidth) / 2;
+ + (mMaxTargetWidth + placementWidth) / 2;
float newWaveCenterY = mVerticalInset
- + Math.max(height, + mMaxTargetHeight + placementHeight) / 2;
+ + (mMaxTargetHeight + placementHeight) / 2;
if (mInitialLayout) {
stopAndHideWaveAnimation();