Skip to content

Commit d6b32b6

Browse files
author
Dianne Hackborn
committed
More work on rotation animation.
Change-Id: Ib8206db98b68cb1e0b16e4c55d949e80ff31bd9f
1 parent 4108fbc commit d6b32b6

File tree

3 files changed

+231
-107
lines changed

3 files changed

+231
-107
lines changed

core/res/res/anim/screen_rotate_finish_exit.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424
android:pivotX="50%" android:pivotY="50%"
2525
android:interpolator="@interpolator/accelerate_decelerate"
2626
android:fillEnabled="true"
27-
android:fillBefore="false" android:fillAfter="true"
27+
android:fillBefore="true" android:fillAfter="true"
2828
android:duration="@android:integer/config_shortAnimTime"/>
2929
<scale android:fromXScale="100%" android:toXScale="100%p"
3030
android:fromYScale="100%" android:toYScale="100%p"
3131
android:pivotX="50%" android:pivotY="50%"
3232
android:interpolator="@interpolator/accelerate_decelerate"
33+
android:fillEnabled="true"
34+
android:fillBefore="true" android:fillAfter="true"
3335
android:duration="@android:integer/config_mediumAnimTime" />
3436
<alpha android:fromAlpha="1.0" android:toAlpha="0"
3537
android:interpolator="@interpolator/accelerate_decelerate"

services/java/com/android/server/wm/BlackFrame.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@ public void setMatrix(Matrix matrix) {
157157
}
158158
}
159159

160+
public void setAlpha(float alpha) {
161+
for (int i=0; i<mBlackSurfaces.length; i++) {
162+
if (mBlackSurfaces[i] != null) {
163+
mBlackSurfaces[i].surface.setAlpha(alpha);
164+
}
165+
}
166+
}
167+
160168
public void clearMatrix() {
161169
for (int i=0; i<mBlackSurfaces.length; i++) {
162170
if (mBlackSurfaces[i] != null) {

0 commit comments

Comments
 (0)