From b7cd8b9144e170e12a838de5dc33a132a51419fe Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Sat, 8 Aug 2009 20:53:03 -0700 Subject: [PATCH] Add knowledge about new wallpaper window type. --- .../policy/impl/PhoneWindowManager.java | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/policy/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/com/android/internal/policy/impl/PhoneWindowManager.java index 8c0e95db9dde7..1c7da0e15011d 100644 --- a/policy/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/com/android/internal/policy/impl/PhoneWindowManager.java @@ -88,6 +88,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_TOAST; +import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import android.view.WindowManagerImpl; import android.view.WindowManagerPolicy; import android.media.IAudioService; @@ -108,29 +109,31 @@ public class PhoneWindowManager implements WindowManagerPolicy { static final boolean SHOW_STARTING_ANIMATIONS = true; static final boolean SHOW_PROCESSES_ON_ALT_MENU = false; - static final int APPLICATION_LAYER = 1; - static final int PHONE_LAYER = 2; - static final int SEARCH_BAR_LAYER = 3; - static final int STATUS_BAR_PANEL_LAYER = 4; + // wallpaper is at the bottom, though the window manager may move it. + static final int WALLPAPER_LAYER = 1; + static final int APPLICATION_LAYER = 2; + static final int PHONE_LAYER = 3; + static final int SEARCH_BAR_LAYER = 4; + static final int STATUS_BAR_PANEL_LAYER = 5; // toasts and the plugged-in battery thing - static final int TOAST_LAYER = 5; - static final int STATUS_BAR_LAYER = 6; + static final int TOAST_LAYER = 6; + static final int STATUS_BAR_LAYER = 7; // SIM errors and unlock. Not sure if this really should be in a high layer. - static final int PRIORITY_PHONE_LAYER = 7; + static final int PRIORITY_PHONE_LAYER = 8; // like the ANR / app crashed dialogs - static final int SYSTEM_ALERT_LAYER = 8; + static final int SYSTEM_ALERT_LAYER = 9; // system-level error dialogs - static final int SYSTEM_ERROR_LAYER = 9; + static final int SYSTEM_ERROR_LAYER = 10; // on-screen keyboards and other such input method user interfaces go here. - static final int INPUT_METHOD_LAYER = 10; + static final int INPUT_METHOD_LAYER = 11; // on-screen keyboards and other such input method user interfaces go here. - static final int INPUT_METHOD_DIALOG_LAYER = 11; + static final int INPUT_METHOD_DIALOG_LAYER = 12; // the keyguard; nothing on top of these can take focus, since they are // responsible for power management when displayed. - static final int KEYGUARD_LAYER = 12; - static final int KEYGUARD_DIALOG_LAYER = 13; + static final int KEYGUARD_LAYER = 13; + static final int KEYGUARD_DIALOG_LAYER = 14; // things in here CAN NOT take focus, but are shown on top of everything else. - static final int SYSTEM_OVERLAY_LAYER = 14; + static final int SYSTEM_OVERLAY_LAYER = 15; static final int APPLICATION_MEDIA_SUBLAYER = -2; static final int APPLICATION_MEDIA_OVERLAY_SUBLAYER = -1; @@ -468,7 +471,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { // monitor/control what they are doing. break; case TYPE_INPUT_METHOD: - // The window manager will check this. + case TYPE_WALLPAPER: + // The window manager will check these. break; case TYPE_PHONE: case TYPE_PRIORITY_PHONE: @@ -569,6 +573,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { return PRIORITY_PHONE_LAYER; case TYPE_TOAST: return TOAST_LAYER; + case TYPE_WALLPAPER: + return WALLPAPER_LAYER; } Log.e(TAG, "Unknown window type: " + type); return APPLICATION_LAYER;