summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/WindowManagerPolicy.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-12-18 16:53:55 -0800
committerDianne Hackborn <hackbod@google.com>2009-12-21 15:26:51 -0800
commitde2606dcd36e9dfa49c42dbc68c539505d5ff8d4 (patch)
tree0e1bd13b9b4b68c98701d2a46796694e355cb669 /core/java/android/view/WindowManagerPolicy.java
parent126b02faee5753740cbdaedc35dc9eb279215360 (diff)
downloadframeworks_base-de2606dcd36e9dfa49c42dbc68c539505d5ff8d4.zip
frameworks_base-de2606dcd36e9dfa49c42dbc68c539505d5ff8d4.tar.gz
frameworks_base-de2606dcd36e9dfa49c42dbc68c539505d5ff8d4.tar.bz2
Don't perform app transition of the app is not currently visible.
Yet more special casing for the window manager... try really hard, if we are performing an activity transition that is behind an opaque window (like say the lock screen or status bar) to just not do it. And, just as important, do a reasonable transition away from whatever is on top. Examples: - If the lock screen is up, and you get a call or press the emergency dialer button, we fade from the lock screen to the new UI, instead of fading to the animation going on between the old and new. - If you are in something hiding the lock screen, like the in-call screen, and that is hidden, then fade back to the lock screen. - If you select an item from the status bar, then have the new item displayed behind it as the status bar rolls up rather than seeing a second animation. (In fact this can't always be done because we may not start the transition to the new thing until the status bar is already going away. But for most cases we can do this with just one anim.)
Diffstat (limited to 'core/java/android/view/WindowManagerPolicy.java')
-rw-r--r--core/java/android/view/WindowManagerPolicy.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 5d3840a..bbe9c1f 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -662,6 +662,14 @@ public interface WindowManagerPolicy {
public boolean finishAnimationLw();
/**
+ * Return true if it is okay to perform animations for an app transition
+ * that is about to occur. You may return false for this if, for example,
+ * the lock screen is currently displayed so the switch should happen
+ * immediately.
+ */
+ public boolean allowAppAnimationsLw();
+
+ /**
* Called after the screen turns off.
*
* @param why {@link #OFF_BECAUSE_OF_USER} or
@@ -675,6 +683,11 @@ public interface WindowManagerPolicy {
public void screenTurnedOn();
/**
+ * Return whether the screen is currently on.
+ */
+ public boolean isScreenOn();
+
+ /**
* Perform any initial processing of a low-level input event before the
* window manager handles special keys and generates a high-level event
* that is dispatched to the application.