Loading core/java/android/view/ViewRoot.java +21 −7 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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, Loading packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +38 −36 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading @@ -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; Loading Loading
core/java/android/view/ViewRoot.java +21 −7 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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, Loading
packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +38 −36 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading @@ -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; Loading