summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/WindowManagerPolicy.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-09-24 19:22:12 -0700
committerDianne Hackborn <hackbod@google.com>2009-09-25 00:48:02 -0700
commit3b3e145d3c41fd68974e08f799b1fd1f8f060cf0 (patch)
tree3f699e0b2f51bfce7061ef87b2690c8ab1032a64 /core/java/android/view/WindowManagerPolicy.java
parentfdf53a4628f915203752660aa07049aa22c01b5a (diff)
downloadframeworks_base-3b3e145d3c41fd68974e08f799b1fd1f8f060cf0.zip
frameworks_base-3b3e145d3c41fd68974e08f799b1fd1f8f060cf0.tar.gz
frameworks_base-3b3e145d3c41fd68974e08f799b1fd1f8f060cf0.tar.bz2
A variety of work on animations.
- The lock screen now fades in and out. - Fixed a bug where we would accidentally freeze the screen when switching to an activity with a different orientation than the current (but the screen itself is in the current orientation). This would mess up the animations on the car dock. - New API to force a particular animation for an activity transition (untested). - New wallpaper animations. - Resources now uses the next API version when in a development build, to help applications being developed against such builds. Change-Id: I2d9998f8400967ff09a04d693dc4ce55f0dbef5b
Diffstat (limited to 'core/java/android/view/WindowManagerPolicy.java')
-rw-r--r--core/java/android/view/WindowManagerPolicy.java60
1 files changed, 45 insertions, 15 deletions
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 1923743..b3125b2 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -314,50 +314,60 @@ public interface WindowManagerPolicy {
public boolean showLw(boolean doAnimation);
}
+ /**
+ * Bit mask that is set for all enter transition.
+ */
+ public final int TRANSIT_ENTER_MASK = 0x1000;
+
+ /**
+ * Bit mask that is set for all exit transitions.
+ */
+ public final int TRANSIT_EXIT_MASK = 0x2000;
+
/** Not set up for a transition. */
- public final int TRANSIT_UNSET = 0;
+ public final int TRANSIT_UNSET = -1;
/** No animation for transition. */
public final int TRANSIT_NONE = 0;
/** Window has been added to the screen. */
- public final int TRANSIT_ENTER = 1;
+ public final int TRANSIT_ENTER = 1 | TRANSIT_ENTER_MASK;
/** Window has been removed from the screen. */
- public final int TRANSIT_EXIT = 2;
+ public final int TRANSIT_EXIT = 2 | TRANSIT_EXIT_MASK;
/** Window has been made visible. */
- public final int TRANSIT_SHOW = 3;
+ public final int TRANSIT_SHOW = 3 | TRANSIT_ENTER_MASK;
/** Window has been made invisible. */
- public final int TRANSIT_HIDE = 4;
+ public final int TRANSIT_HIDE = 4 | TRANSIT_EXIT_MASK;
/** The "application starting" preview window is no longer needed, and will
* animate away to show the real window. */
public final int TRANSIT_PREVIEW_DONE = 5;
/** A window in a new activity is being opened on top of an existing one
* in the same task. */
- public final int TRANSIT_ACTIVITY_OPEN = 6;
+ public final int TRANSIT_ACTIVITY_OPEN = 6 | TRANSIT_ENTER_MASK;
/** The window in the top-most activity is being closed to reveal the
* previous activity in the same task. */
- public final int TRANSIT_ACTIVITY_CLOSE = 7;
+ public final int TRANSIT_ACTIVITY_CLOSE = 7 | TRANSIT_EXIT_MASK;
/** A window in a new task is being opened on top of an existing one
* in another activity's task. */
- public final int TRANSIT_TASK_OPEN = 8;
+ public final int TRANSIT_TASK_OPEN = 8 | TRANSIT_ENTER_MASK;
/** A window in the top-most activity is being closed to reveal the
* previous activity in a different task. */
- public final int TRANSIT_TASK_CLOSE = 9;
+ public final int TRANSIT_TASK_CLOSE = 9 | TRANSIT_EXIT_MASK;
/** A window in an existing task is being displayed on top of an existing one
* in another activity's task. */
- public final int TRANSIT_TASK_TO_FRONT = 10;
+ public final int TRANSIT_TASK_TO_FRONT = 10 | TRANSIT_ENTER_MASK;
/** A window in an existing task is being put below all other tasks. */
- public final int TRANSIT_TASK_TO_BACK = 11;
+ public final int TRANSIT_TASK_TO_BACK = 11 | TRANSIT_EXIT_MASK;
/** A window in a new activity that doesn't have a wallpaper is being
* opened on top of one that does, effectively closing the wallpaper. */
- public final int TRANSIT_WALLPAPER_CLOSE = 12;
+ public final int TRANSIT_WALLPAPER_CLOSE = 12 | TRANSIT_EXIT_MASK;
/** A window in a new activity that does have a wallpaper is being
* opened on one that didn't, effectively opening the wallpaper. */
- public final int TRANSIT_WALLPAPER_OPEN = 13;
+ public final int TRANSIT_WALLPAPER_OPEN = 13 | TRANSIT_ENTER_MASK;
/** A window in a new activity is being opened on top of an existing one,
* and both are on top of the wallpaper. */
- public final int TRANSIT_WALLPAPER_INTRA_OPEN = 14;
+ public final int TRANSIT_WALLPAPER_INTRA_OPEN = 14 | TRANSIT_ENTER_MASK;
/** The window in the top-most activity is being closed to reveal the
* previous activity, and both are on top of he wallpaper. */
- public final int TRANSIT_WALLPAPER_INTRA_CLOSE = 15;
+ public final int TRANSIT_WALLPAPER_INTRA_CLOSE = 15 | TRANSIT_EXIT_MASK;
/** Screen turned off because of power button */
public final int OFF_BECAUSE_OF_USER = 1;
@@ -444,6 +454,21 @@ public interface WindowManagerPolicy {
public int getMaxWallpaperLayer();
/**
+ * Return whether the given window should forcibly hide everything
+ * behind it. Typically returns true for the keyguard.
+ */
+ public boolean doesForceHide(WindowState win, WindowManager.LayoutParams attrs);
+
+ /**
+ * Determine if a window that is behind one that is force hiding
+ * (as determined by {@link #doesForceHide}) should actually be hidden.
+ * For example, typically returns false for the status bar. Be careful
+ * to return false for any window that you may hide yourself, since this
+ * will conflict with what you set.
+ */
+ public boolean canBeForceHidden(WindowState win, WindowManager.LayoutParams attrs);
+
+ /**
* Called when the system would like to show a UI to indicate that an
* application is starting. You can use this to add a
* APPLICATION_STARTING_TYPE window with the given appToken to the window
@@ -524,6 +549,11 @@ public interface WindowManagerPolicy {
public int selectAnimationLw(WindowState win, int transit);
/**
+ * Create and return an animation to re-display a force hidden window.
+ */
+ public Animation createForceHideEnterAnimation();
+
+ /**
* Called from the key queue thread before a key is dispatched to the
* input thread.
*