diff options
Diffstat (limited to 'core')
4 files changed, 48 insertions, 3 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 99acb3f..e8ab227 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -416,6 +416,13 @@ public interface WindowManager extends ViewManager { public static final int TYPE_BOOT_PROGRESS = FIRST_SYSTEM_WINDOW+21; /** + * Window type: Fake window to consume touch events when the navigation + * bar is hidden. + * @hide + */ + public static final int TYPE_HIDDEN_NAV_CONSUMER = FIRST_SYSTEM_WINDOW+22; + + /** * End of types of system windows. */ public static final int LAST_SYSTEM_WINDOW = 2999; diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java index aaf45e5..bfd2959 100644 --- a/core/java/android/view/WindowManagerPolicy.java +++ b/core/java/android/view/WindowManagerPolicy.java @@ -23,6 +23,7 @@ import android.graphics.Rect; import android.graphics.RectF; import android.os.IBinder; import android.os.LocalPowerManager; +import android.os.Looper; import android.view.animation.Animation; import java.io.FileDescriptor; @@ -315,6 +316,36 @@ public interface WindowManagerPolicy { } /** + * Representation of a "fake window" that the policy has added to the + * window manager to consume events. + */ + public interface FakeWindow { + /** + * Remove the fake window from the window manager. + */ + void dismiss(); + } + + /** + * Interface for calling back in to the window manager that is private + * between it and the policy. + */ + public interface WindowManagerFuncs { + /** + * Ask the window manager to re-evaluate the system UI flags. + */ + public void reevaluateStatusBarVisibility(); + + /** + * Add a fake window to the window manager. This window sits + * at the top of the other windows and consumes events. + */ + public FakeWindow addFakeWindow(Looper looper, InputHandler inputHandler, + String name, int windowType, int layoutParamsFlags, boolean canReceiveKeys, + boolean hasFocus, boolean touchFullscreen); + } + + /** * Bit mask that is set for all enter transition. */ public final int TRANSIT_ENTER_MASK = 0x1000; @@ -395,6 +426,7 @@ public interface WindowManagerPolicy { * @param powerManager */ public void init(Context context, IWindowManager windowManager, + WindowManagerFuncs windowManagerFuncs, LocalPowerManager powerManager); /** @@ -762,7 +794,7 @@ public interface WindowManagerPolicy { /** * A new window has been focused. */ - public void focusChanged(WindowState lastFocus, WindowState newFocus); + public int focusChangedLw(WindowState lastFocus, WindowState newFocus); /** * Called after the screen turns off. @@ -968,6 +1000,14 @@ public interface WindowManagerPolicy { public void setUserRotationMode(int mode, int rotation); /** + * Called when a new system UI visibility is being reported, allowing + * the policy to adjust what is actually reported. + * @param visibility The raw visiblity reported by the status bar. + * @return The new desired visibility. + */ + public int adjustSystemUiVisibilityLw(int visibility); + + /** * Print the WindowManagerPolicy's state into the given stream. * * @param prefix Text to print at the front of each line. diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl index 3916e86..aca1fa2 100644 --- a/core/java/com/android/internal/statusbar/IStatusBar.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl @@ -34,7 +34,6 @@ oneway interface IStatusBar void topAppWindowChanged(boolean menuVisible); void setImeWindowStatus(in IBinder token, int vis, int backDisposition); void setHardKeyboardStatus(boolean available, boolean enabled); - void userActivity(); void toggleRecentApps(); } diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl index 07430e7..ecebfc0 100644 --- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl @@ -46,6 +46,5 @@ interface IStatusBarService void onNotificationClear(String pkg, String tag, int id); void setSystemUiVisibility(int vis); void setHardKeyboardEnabled(boolean enabled); - void userActivity(); void toggleRecentApps(); } |