Merge "Fix inflating of animations."

This commit is contained in:
Dianne Hackborn
2011-09-11 13:07:24 -07:00
committed by Android (Google) Code Review
4 changed files with 25 additions and 16 deletions

View File

@@ -89,19 +89,19 @@ public class AnimationSet extends Animation {
if (context.getApplicationInfo().targetSdkVersion >= if (context.getApplicationInfo().targetSdkVersion >=
Build.VERSION_CODES.ICE_CREAM_SANDWICH) { Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
if (a.hasValue(com.android.internal.R.styleable.Animation_duration)) { if (a.hasValue(com.android.internal.R.styleable.AnimationSet_duration)) {
mFlags |= PROPERTY_DURATION_MASK; mFlags |= PROPERTY_DURATION_MASK;
} }
if (a.hasValue(com.android.internal.R.styleable.Animation_fillBefore)) { if (a.hasValue(com.android.internal.R.styleable.AnimationSet_fillBefore)) {
mFlags |= PROPERTY_FILL_BEFORE_MASK; mFlags |= PROPERTY_FILL_BEFORE_MASK;
} }
if (a.hasValue(com.android.internal.R.styleable.Animation_fillAfter)) { if (a.hasValue(com.android.internal.R.styleable.AnimationSet_fillAfter)) {
mFlags |= PROPERTY_FILL_AFTER_MASK; mFlags |= PROPERTY_FILL_AFTER_MASK;
} }
if (a.hasValue(com.android.internal.R.styleable.Animation_repeatMode)) { if (a.hasValue(com.android.internal.R.styleable.AnimationSet_repeatMode)) {
mFlags |= PROPERTY_REPEAT_MODE_MASK; mFlags |= PROPERTY_REPEAT_MODE_MASK;
} }
if (a.hasValue(com.android.internal.R.styleable.Animation_startOffset)) { if (a.hasValue(com.android.internal.R.styleable.AnimationSet_startOffset)) {
mFlags |= PROPERTY_START_OFFSET_MASK; mFlags |= PROPERTY_START_OFFSET_MASK;
} }
} }

View File

@@ -3949,10 +3949,6 @@
<!-- ========================== --> <!-- ========================== -->
<eat-comment /> <eat-comment />
<declare-styleable name="AnimationSet">
<attr name="shareInterpolator" format="boolean" />
</declare-styleable>
<declare-styleable name="Animation"> <declare-styleable name="Animation">
<!-- Defines the interpolator used to smooth the animation movement in time. --> <!-- Defines the interpolator used to smooth the animation movement in time. -->
<attr name="interpolator" /> <attr name="interpolator" />
@@ -4002,6 +3998,15 @@
<attr name="detachWallpaper" format="boolean" /> <attr name="detachWallpaper" format="boolean" />
</declare-styleable> </declare-styleable>
<declare-styleable name="AnimationSet">
<attr name="shareInterpolator" format="boolean" />
<attr name="fillBefore" />
<attr name="fillAfter" />
<attr name="duration" />
<attr name="startOffset" />
<attr name="repeatMode" />
</declare-styleable>
<declare-styleable name="RotateAnimation"> <declare-styleable name="RotateAnimation">
<attr name="fromDegrees" /> <attr name="fromDegrees" />
<attr name="toDegrees" /> <attr name="toDegrees" />

View File

@@ -304,8 +304,12 @@ class ScreenRotationAnimation {
} }
if (!mStarted) { if (!mStarted) {
mEnterAnimation.setStartTime(now); if (mEnterAnimation != null) {
mExitAnimation.setStartTime(now); mEnterAnimation.setStartTime(now);
}
if (mExitAnimation != null) {
mExitAnimation.setStartTime(now);
}
mStarted = true; mStarted = true;
} }

View File

@@ -774,7 +774,7 @@ public class WindowManagerService extends IWindowManager.Stub
// The window manager only throws security exceptions, so let's // The window manager only throws security exceptions, so let's
// log all others. // log all others.
if (!(e instanceof SecurityException)) { if (!(e instanceof SecurityException)) {
Slog.e(TAG, "Window Manager Crash", e); Log.wtf(TAG, "Window Manager Crash", e);
} }
throw e; throw e;
} }
@@ -7096,7 +7096,7 @@ public class WindowManagerService extends IWindowManager.Stub
} }
} }
} catch (RuntimeException e) { } catch (RuntimeException e) {
Slog.e(TAG, "Unhandled exception while force removing for memory", e); Log.wtf(TAG, "Unhandled exception while force removing for memory", e);
} }
try { try {
@@ -7131,7 +7131,7 @@ public class WindowManagerService extends IWindowManager.Stub
} }
} catch (RuntimeException e) { } catch (RuntimeException e) {
mInLayout = false; mInLayout = false;
Slog.e(TAG, "Unhandled exception while layout out windows", e); Log.wtf(TAG, "Unhandled exception while laying out windows", e);
} }
} }
@@ -8397,7 +8397,7 @@ public class WindowManagerService extends IWindowManager.Stub
} }
} }
} catch (RuntimeException e) { } catch (RuntimeException e) {
Slog.e(TAG, "Unhandled exception in Window Manager", e); Log.wtf(TAG, "Unhandled exception in Window Manager", e);
} }
Surface.closeTransaction(); Surface.closeTransaction();
@@ -9179,7 +9179,7 @@ public class WindowManagerService extends IWindowManager.Stub
if (windows == null || windows.contains(w)) { if (windows == null || windows.contains(w)) {
pw.print(" Window #"); pw.print(i); pw.print(' '); pw.print(" Window #"); pw.print(i); pw.print(' ');
pw.print(w); pw.println(":"); pw.print(w); pw.println(":");
w.dump(pw, " ", dumpAll); w.dump(pw, " ", dumpAll || windows != null);
} }
} }
if (mInputMethodDialogs.size() > 0) { if (mInputMethodDialogs.size() > 0) {