Attach alarm lockscreen animator view to a parent

Bug: 17316762

- Additional checks introduced by ag/534856 now require that the target
 of ViewAnimationUtils#createCircularReveal has a parent before being
 invoked. See b/17316066

Change-Id: If0d6cd548f1749cd5a2ba63ea4de8d1c77639e59
diff --git a/src/com/android/deskclock/alarms/AlarmActivity.java b/src/com/android/deskclock/alarms/AlarmActivity.java
index 67f310c..3b5d741 100644
--- a/src/com/android/deskclock/alarms/AlarmActivity.java
+++ b/src/com/android/deskclock/alarms/AlarmActivity.java
@@ -450,7 +450,9 @@
         final Rect displayRect = new Rect();
         getWindow().getDecorView().getGlobalVisibleRect(displayRect);
 
+        final ViewGroupOverlay groupOverlay = (ViewGroupOverlay) mContentView.getOverlay();
         final View revealView = new View(this);
+        groupOverlay.add(revealView);
         revealView.setBottom(displayRect.bottom);
         revealView.setLeft(displayRect.left);
         revealView.setRight(displayRect.right);
@@ -468,7 +470,6 @@
         final double y_2 = Math.pow(revealView.getTop() - revealCenterY, 2);
         final float revealRadius = (float) Math.max(Math.sqrt(x1_2 + y_2), Math.sqrt(x2_2 + y_2));
 
-        final ViewGroupOverlay groupOverlay = (ViewGroupOverlay) mContentView.getOverlay();
         final Animator revealAnimator = ViewAnimationUtils.createCircularReveal(revealView,
                         revealCenterX, revealCenterY, 0.0f, revealRadius);
         revealAnimator.setDuration(DateUtils.SECOND_IN_MILLIS / 2);