Only animate alignment of FAB if the FAB container is shown.

The bug in Dialer where the FAB is showing up is because it's hidden,
but then being aligned. The alignment causes the FAB to show again.

Bug: 17316942
Change-Id: I180769d51b431b9191bb7d847acd41d4d7e71299
diff --git a/src/com/android/contacts/common/widget/FloatingActionButtonController.java b/src/com/android/contacts/common/widget/FloatingActionButtonController.java
index e97cbfc..773e024 100644
--- a/src/com/android/contacts/common/widget/FloatingActionButtonController.java
+++ b/src/com/android/contacts/common/widget/FloatingActionButtonController.java
@@ -105,7 +105,9 @@
         }
 
         int translationX = getTranslationXForAlignment(align);
-        if (animate) {
+
+        // Skip animation if container is not shown; animation causes container to show again.
+        if (animate && mFloatingActionButtonContainer.isShown()) {
             mFloatingActionButtonContainer.animate()
                     .translationX(translationX + offsetX)
                     .translationY(offsetY)