From d226512433a850a9658e2576dc034c4821e9c8d9 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Fri, 5 Aug 2016 10:25:21 -0700 Subject: [PATCH] Correctly initialize rotation animation hint. In the case of no activity options we won't initialize it again later, and so we will override the apps request with a hint of 0 (ROTATION_ANIMATION_ROTATE). Bug: 30683604 Change-Id: I5eed12adfbb241859503bcd40f15ee82141436d8 --- .../core/java/com/android/server/am/ActivityRecord.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java index 6e40cfff54110..00fda43f4ca46 100755 --- a/services/core/java/com/android/server/am/ActivityRecord.java +++ b/services/core/java/com/android/server/am/ActivityRecord.java @@ -221,7 +221,12 @@ final class ActivityRecord { boolean pendingVoiceInteractionStart; // Waiting for activity-invoked voice session IVoiceInteractionSession voiceSession; // Voice interaction session for this activity - int mRotationAnimationHint; + // A hint to override the window specified rotation animation, or -1 + // to use the window specified value. We use this so that + // we can select the right animation in the cases of starting + // windows, where the app hasn't had time to set a value + // on the window. + int mRotationAnimationHint = -1; private static String startingWindowStateToString(int state) { switch (state) {