Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9e2f68b authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am 13e2bef4: am 80cf4e79: Merge "Fix issue #4500511: Holo effect background...

am 13e2bef4: am 80cf4e79: Merge "Fix issue #4500511: Holo effect background doesn\'t reach top of screen anymore" into honeycomb-mr2

* commit '13e2bef4':
  Fix issue #4500511: Holo effect background doesn't reach top of screen anymore
parents d19fbe34 13e2bef4
Loading
Loading
Loading
Loading
+21 −7
Original line number Diff line number Diff line
@@ -724,10 +724,17 @@ public final class ViewRoot extends Handler implements ViewParent,
            fullRedrawNeeded = true;
            mLayoutRequested = true;

            if (lp.type == WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL) {
                // NOTE -- system code, won't try to do compat mode.
                Display disp = WindowManagerImpl.getDefault().getDefaultDisplay();
                desiredWindowWidth = disp.getRealWidth();
                desiredWindowHeight = disp.getRealHeight();
            } else {
                DisplayMetrics packageMetrics =
                    mView.getContext().getResources().getDisplayMetrics();
                desiredWindowWidth = packageMetrics.widthPixels;
                desiredWindowHeight = packageMetrics.heightPixels;
            }

            // For the very first time, tell the view hierarchy that it
            // is attached to the window.  Note that at this point the surface
@@ -851,11 +858,18 @@ public final class ViewRoot extends Handler implements ViewParent,
                        || lp.height == ViewGroup.LayoutParams.WRAP_CONTENT) {
                    windowSizeMayChange = true;

                    if (lp.type == WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL) {
                        // NOTE -- system code, won't try to do compat mode.
                        Display disp = WindowManagerImpl.getDefault().getDefaultDisplay();
                        desiredWindowWidth = disp.getRealWidth();
                        desiredWindowHeight = disp.getRealHeight();
                    } else {
                        DisplayMetrics packageMetrics = res.getDisplayMetrics();
                        desiredWindowWidth = packageMetrics.widthPixels;
                        desiredWindowHeight = packageMetrics.heightPixels;
                    }
                }
            }

            // Ask host how big it wants to be
            if (DEBUG_ORIENTATION || DEBUG_LAYOUT) Log.v(TAG,
+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ public class TabletStatusBar extends StatusBar implements
        final Resources res = mContext.getResources();
        final Display d = WindowManagerImpl.getDefault().getDefaultDisplay();
        return Math.max(res.getDimensionPixelSize(R.dimen.notification_panel_min_height),
                d.getHeight());
                d.getRealHeight());
    }

    @Override
+38 −36
Original line number Diff line number Diff line
@@ -1780,22 +1780,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    // If this window is attached to another, our display
                    // frame is the same as the one we are attached to.
                    setAttachedWindowFrames(win, fl, sim, attached, true, pf, df, cf, vf);
                } else {
                    if (attrs.type == TYPE_STATUS_BAR_PANEL) {
                        // Status bar panels are the only windows who can go on top of
                        // the status bar.  They are protected by the STATUS_BAR_SERVICE
                        // permission, so they have the same privileges as the status
                        // bar itself.
                        pf.left = df.left = mUnrestrictedScreenLeft;
                        pf.top = df.top = mUnrestrictedScreenTop;
                        pf.right = df.right = mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
                        pf.bottom = df.bottom = mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
                } else {
                    pf.left = df.left = mRestrictedScreenLeft;
                    pf.top = df.top = mRestrictedScreenTop;
                    pf.right = df.right = mRestrictedScreenLeft+mRestrictedScreenWidth;
                    pf.bottom = df.bottom = mRestrictedScreenTop+mRestrictedScreenHeight;
                    }
                    if (adjust != SOFT_INPUT_ADJUST_RESIZE) {
                        cf.left = mDockLeft;
                        cf.top = mDockTop;
@@ -1848,6 +1837,18 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            } else {
                // Otherwise, a normal window must be placed inside the content
                // of all screen decorations.
                if (attrs.type == TYPE_STATUS_BAR_PANEL) {
                    // Status bar panels are the only windows who can go on top of
                    // the status bar.  They are protected by the STATUS_BAR_SERVICE
                    // permission, so they have the same privileges as the status
                    // bar itself.
                    pf.left = df.left = cf.left = vf.left = mUnrestrictedScreenLeft;
                    pf.top = df.top = cf.top = vf.top = mUnrestrictedScreenTop;
                    pf.right = df.right = cf.right = vf.right
                            = mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
                    pf.bottom = df.bottom = cf.bottom = vf.bottom
                            = mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
                } else {
                    pf.left = mContentLeft;
                    pf.top = mContentTop;
                    pf.right = mContentRight;
@@ -1873,6 +1874,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    }
                }
            }
        }
        
        if ((fl & FLAG_LAYOUT_NO_LIMITS) != 0) {
            df.left = df.top = cf.left = cf.top = vf.left = vf.top = -10000;