static final String TAG = "WindowManager";
static final boolean DEBUG = false;
static final boolean localLOGV = false;
- static final boolean DEBUG_LAYOUT = false;
static final boolean DEBUG_INPUT = false;
+ static final boolean DEBUG_KEYGUARD = false;
+ static final boolean DEBUG_LAYOUT = false;
static final boolean DEBUG_STARTING_WINDOW = false;
static final boolean DEBUG_WAKEUP = false;
static final boolean SHOW_STARTING_ANIMATIONS = true;
case TYPE_WALLPAPER:
case TYPE_PRIVATE_PRESENTATION:
case TYPE_VOICE_INTERACTION:
+ case TYPE_ACCESSIBILITY_OVERLAY:
// The window manager will check these.
break;
case TYPE_PHONE:
case TYPE_PHONE:
case TYPE_POINTER:
case TYPE_PRIORITY_PHONE:
- case TYPE_RECENTS_OVERLAY:
case TYPE_SEARCH_BAR:
case TYPE_STATUS_BAR:
case TYPE_STATUS_BAR_PANEL:
case TYPE_VOICE_INTERACTION:
// voice interaction layer is almost immediately above apps.
return 5;
- case TYPE_RECENTS_OVERLAY:
case TYPE_SYSTEM_DIALOG:
return 6;
case TYPE_TOAST:
// the drag layer: input for drag-and-drop is associated with this window,
// which sits above all other focusable windows
return 25;
- case TYPE_SECURE_SYSTEM_OVERLAY:
+ case TYPE_ACCESSIBILITY_OVERLAY:
+ // overlay put by accessibility services to intercept user interaction
return 26;
- case TYPE_BOOT_PROGRESS:
+ case TYPE_SECURE_SYSTEM_OVERLAY:
return 27;
+ case TYPE_BOOT_PROGRESS:
+ return 28;
case TYPE_POINTER:
// the (mouse) pointer layer
- return 28;
- case TYPE_HIDDEN_NAV_CONSUMER:
return 29;
+ case TYPE_HIDDEN_NAV_CONSUMER:
+ return 30;
}
Log.e(TAG, "Unknown window type: " + type);
return 2;
}
mKeyguardScrim = win;
break;
-
}
return WindowManagerGlobal.ADD_OKAY;
}
return -1;
}
- // If an incoming call is ringing, HOME is totally disabled.
- // (The user is already on the InCallUI at this point,
- // and his ONLY options are to answer or reject the call.)
- TelecomManager telecomManager = getTelecommService();
- if (telecomManager != null && telecomManager.isRinging()) {
- Log.i(TAG, "Ignoring HOME; there's a ringing incoming call.");
- return -1;
- }
-
// Delay handling home if a double-tap is possible.
if (mDoubleTapOnHomeBehavior != DOUBLE_TAP_HOME_NOTHING) {
mHandler.removeCallbacks(mHomeDoubleTapTimeoutRunnable); // just in case
// whether it is taking care of insetting its content. If not,
// we need to use the parent's content frame so that the entire
// window is positioned within that content. Otherwise we can use
- // the display frame and let the attached window take care of
+ // the overscan frame and let the attached window take care of
// positioning its content appropriately.
if (adjust != SOFT_INPUT_ADJUST_RESIZE) {
- cf.set(attached.getOverscanFrameLw());
+ // Set the content frame of the attached window to the parent's decor frame
+ // (same as content frame when IME isn't present) if specifically requested by
+ // setting {@link WindowManager.LayoutParams#FLAG_LAYOUT_ATTACHED_IN_DECOR} flag.
+ // Otherwise, use the overscan frame.
+ cf.set((fl & FLAG_LAYOUT_ATTACHED_IN_DECOR) != 0
+ ? attached.getContentFrameLw() : attached.getOverscanFrameLw());
} else {
// If the window is resizing, then we want to base the content
// frame on our attached content frame to resize... however,
@Override
public void dismissKeyguardLw() {
if (mKeyguardDelegate != null && mKeyguardDelegate.isShowing()) {
+ if (DEBUG_KEYGUARD) Slog.d(TAG, "PWM.dismissKeyguardLw");
mHandler.post(new Runnable() {
@Override
public void run() {
@Override
public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) {
if (mKeyguardDelegate != null) {
+ if (DEBUG_KEYGUARD) Slog.d(TAG, "PWM.startKeyguardExitAnimation");
mKeyguardDelegate.startKeyguardExitAnimation(startTime, fadeoutDuration);
}
}
return true;
}
};
- mBootMsgDialog.setTitle(R.string.android_upgrading_title);
+ if (mContext.getPackageManager().isUpgrade()) {
+ mBootMsgDialog.setTitle(R.string.android_upgrading_title);
+ } else {
+ mBootMsgDialog.setTitle(R.string.android_start_title);
+ }
mBootMsgDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
mBootMsgDialog.setIndeterminate(true);
mBootMsgDialog.getWindow().setType(
private int updateSystemUiVisibilityLw() {
// If there is no window focused, there will be nobody to handle the events
// anyway, so just hang on in whatever state we're in until things settle down.
- WindowState win = mFocusedWindow != null ? mFocusedWindow : mTopFullscreenOpaqueWindowState;
+ final WindowState win = mFocusedWindow != null ? mFocusedWindow
+ : mTopFullscreenOpaqueWindowState;
if (win == null) {
return 0;
}
try {
IStatusBarService statusbar = getStatusBarService();
if (statusbar != null) {
- statusbar.setSystemUiVisibility(visibility, 0xffffffff);
+ statusbar.setSystemUiVisibility(visibility, 0xffffffff, win.toString());
statusbar.topAppWindowChanged(needsMenu);
}
} catch (RemoteException e) {