summaryrefslogtreecommitdiff
path: root/core/java/android/view/WindowManagerPolicy.java
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2013-02-21 17:54:37 -0800
committerCraig Mautner <cmautner@google.com>2013-02-22 10:44:52 -0800
commit3c1743705c4df816089e07a17753c6043b4d8e66 (patch)
treedd68b3b869a0b24bac79d713af19eeba57f3e668 /core/java/android/view/WindowManagerPolicy.java
parent7a7360ad528576d560aa13fbb4e81740b2c425b2 (diff)
Create rotation animation modes.
Allow fullscreen windows to specify crossfade or jumpcut animations that override the default rotation animation. Only if the incoming and outgoing topmost windows are fullscreen and both specify the same animation to use. Fixes bug 8182773. Change-Id: I6b3c0020d7bd2cdfba5c66189e114ec62cd54fcf
Diffstat (limited to 'core/java/android/view/WindowManagerPolicy.java')
-rw-r--r--core/java/android/view/WindowManagerPolicy.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 192eded86240..60779ceb7fd9 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -684,6 +684,31 @@ public interface WindowManagerPolicy {
public int selectAnimationLw(WindowState win, int transit);
/**
+ * Determine the animation to run for a rotation transition based on the
+ * top fullscreen windows {@link WindowManager.LayoutParams#rotationAnimation}
+ * and whether it is currently fullscreen and frontmost.
+ *
+ * @param anim The exiting animation resource id is stored in anim[0], the
+ * entering animation resource id is stored in anim[1].
+ */
+ public void selectRotationAnimationLw(int anim[]);
+
+ /**
+ * Validate whether the current top fullscreen has specified the same
+ * {@link WindowManager.LayoutParams#rotationAnimation} value as that
+ * being passed in from the previous top fullscreen window.
+ *
+ * @param exitAnimId exiting resource id from the previous window.
+ * @param enterAnimId entering resource id from the previous window.
+ * @param forceDefault For rotation animations only, if true ignore the
+ * animation values and just return false.
+ * @return true if the previous values are still valid, false if they
+ * should be replaced with the default.
+ */
+ public boolean validateRotationAnimationLw(int exitAnimId, int enterAnimId,
+ boolean forceDefault);
+
+ /**
* Create and return an animation to re-display a force hidden window.
*/
public Animation createForceHideEnterAnimation(boolean onWallpaper);
@@ -909,6 +934,7 @@ public interface WindowManagerPolicy {
* @see android.app.KeyguardManager.KeyguardLock#disableKeyguard()
* @see android.app.KeyguardManager.KeyguardLock#reenableKeyguard()
*/
+ @SuppressWarnings("javadoc")
public void enableKeyguard(boolean enabled);
/**
@@ -924,6 +950,7 @@ public interface WindowManagerPolicy {
* @param callback Callback to send the result back.
* @see android.app.KeyguardManager#exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult)
*/
+ @SuppressWarnings("javadoc")
void exitKeyguardSecurely(OnKeyguardExitResult callback);
/**