Fix inflating of animations.

Need to define attributes for animation set, to have correct indices.

Also small fixes elsewhere.

Change-Id: If596147e8aee4ebffe4e184872070341eff6df73
diff --git a/services/java/com/android/server/wm/ScreenRotationAnimation.java b/services/java/com/android/server/wm/ScreenRotationAnimation.java
index 3c475a0..e25638f 100644
--- a/services/java/com/android/server/wm/ScreenRotationAnimation.java
+++ b/services/java/com/android/server/wm/ScreenRotationAnimation.java
@@ -304,8 +304,12 @@
         }
 
         if (!mStarted) {
-            mEnterAnimation.setStartTime(now);
-            mExitAnimation.setStartTime(now);
+            if (mEnterAnimation != null) {
+                mEnterAnimation.setStartTime(now);
+            }
+            if (mExitAnimation != null) {
+                mExitAnimation.setStartTime(now);
+            }
             mStarted = true;
         }