am 2d7f5931: am 3e5eceb9: am 4dbf514c: Fix issue #2302336: System dialogs are not being given a layer

Merge commit '2d7f59319ad81139b826dff79e97cf7263832014'

* commit '2d7f59319ad81139b826dff79e97cf7263832014':
  Fix issue #2302336: System dialogs are not being given a layer
This commit is contained in:
Dianne Hackborn
2009-12-04 04:24:14 -08:00
committed by Android Git Automerger

View File

@@ -85,6 +85,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE;
import static android.view.WindowManager.LayoutParams.TYPE_SEARCH_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR;
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
@@ -94,7 +95,6 @@ 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.view.WindowManagerPolicy.WindowState;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.media.IAudioService;
@@ -121,25 +121,26 @@ public class PhoneWindowManager implements WindowManagerPolicy {
static final int PHONE_LAYER = 3;
static final int SEARCH_BAR_LAYER = 4;
static final int STATUS_BAR_PANEL_LAYER = 5;
static final int SYSTEM_DIALOG_LAYER = 6;
// toasts and the plugged-in battery thing
static final int TOAST_LAYER = 6;
static final int STATUS_BAR_LAYER = 7;
static final int TOAST_LAYER = 7;
static final int STATUS_BAR_LAYER = 8;
// SIM errors and unlock. Not sure if this really should be in a high layer.
static final int PRIORITY_PHONE_LAYER = 8;
static final int PRIORITY_PHONE_LAYER = 9;
// like the ANR / app crashed dialogs
static final int SYSTEM_ALERT_LAYER = 9;
static final int SYSTEM_ALERT_LAYER = 10;
// system-level error dialogs
static final int SYSTEM_ERROR_LAYER = 10;
static final int SYSTEM_ERROR_LAYER = 11;
// on-screen keyboards and other such input method user interfaces go here.
static final int INPUT_METHOD_LAYER = 11;
static final int INPUT_METHOD_LAYER = 12;
// on-screen keyboards and other such input method user interfaces go here.
static final int INPUT_METHOD_DIALOG_LAYER = 12;
static final int INPUT_METHOD_DIALOG_LAYER = 13;
// the keyguard; nothing on top of these can take focus, since they are
// responsible for power management when displayed.
static final int KEYGUARD_LAYER = 13;
static final int KEYGUARD_DIALOG_LAYER = 14;
static final int KEYGUARD_LAYER = 14;
static final int KEYGUARD_DIALOG_LAYER = 15;
// things in here CAN NOT take focus, but are shown on top of everything else.
static final int SYSTEM_OVERLAY_LAYER = 15;
static final int SYSTEM_OVERLAY_LAYER = 16;
static final int APPLICATION_MEDIA_SUBLAYER = -2;
static final int APPLICATION_MEDIA_OVERLAY_SUBLAYER = -1;
@@ -687,6 +688,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return STATUS_BAR_LAYER;
case TYPE_STATUS_BAR_PANEL:
return STATUS_BAR_PANEL_LAYER;
case TYPE_SYSTEM_DIALOG:
return SYSTEM_DIALOG_LAYER;
case TYPE_SEARCH_BAR:
return SEARCH_BAR_LAYER;
case TYPE_PHONE: