Loading core/java/android/service/wallpaper/WallpaperService.java +2 −2 Original line number Diff line number Diff line Loading @@ -788,8 +788,8 @@ public abstract class WallpaperService extends Service { com.android.internal.R.style.Animation_Wallpaper; mInputChannel = new InputChannel(); if (mSession.addToDisplay(mWindow, mWindow.mSeq, mLayout, View.VISIBLE, Display.DEFAULT_DISPLAY, mContentInsets, mStableInsets, mOutsets, mDisplayCutout, mInputChannel) < 0) { Display.DEFAULT_DISPLAY, mWinFrame, mContentInsets, mStableInsets, mOutsets, mDisplayCutout, mInputChannel) < 0) { Log.w(TAG, "Failed to add window while updating wallpaper surface."); return; } Loading core/java/android/view/IWindowSession.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -41,8 +41,8 @@ interface IWindowSession { in int viewVisibility, out Rect outContentInsets, out Rect outStableInsets, out InputChannel outInputChannel); int addToDisplay(IWindow window, int seq, in WindowManager.LayoutParams attrs, in int viewVisibility, in int layerStackId, out Rect outContentInsets, out Rect outStableInsets, out Rect outOutsets, in int viewVisibility, in int layerStackId, out Rect outFrame, out Rect outContentInsets, out Rect outStableInsets, out Rect outOutsets, out DisplayCutout.ParcelableWrapper displayCutout, out InputChannel outInputChannel); int addWithoutInputChannel(IWindow window, int seq, in WindowManager.LayoutParams attrs, in int viewVisibility, out Rect outContentInsets, out Rect outStableInsets); Loading core/java/android/view/ViewRootImpl.java +3 −3 Original line number Diff line number Diff line Loading @@ -753,7 +753,7 @@ public final class ViewRootImpl implements ViewParent, mAttachInfo.mRecomputeGlobalAttributes = true; collectViewAttributes(); res = mWindowSession.addToDisplay(mWindow, mSeq, mWindowAttributes, getHostVisibility(), mDisplay.getDisplayId(), getHostVisibility(), mDisplay.getDisplayId(), mWinFrame, mAttachInfo.mContentInsets, mAttachInfo.mStableInsets, mAttachInfo.mOutsets, mAttachInfo.mDisplayCutout, mInputChannel); } catch (RemoteException e) { Loading Loading @@ -1711,8 +1711,8 @@ public final class ViewRootImpl implements ViewParent, desiredWindowWidth = size.x; desiredWindowHeight = size.y; } else { desiredWindowWidth = dipToPx(config.screenWidthDp); desiredWindowHeight = dipToPx(config.screenHeightDp); desiredWindowWidth = mWinFrame.width(); desiredWindowHeight = mWinFrame.height(); } // We used to use the following condition to choose 32 bits drawing caches: Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +27 −17 Original line number Diff line number Diff line Loading @@ -4398,13 +4398,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override // TODO: Should probably be moved into DisplayFrames. public boolean getInsetHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, DisplayFrames displayFrames, Rect outContentInsets, Rect outStableInsets, public boolean getLayoutHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, DisplayFrames displayFrames, Rect outFrame, Rect outContentInsets, Rect outStableInsets, Rect outOutsets, DisplayCutout.ParcelableWrapper outDisplayCutout) { final int fl = PolicyControl.getWindowFlags(null, attrs); final int pfl = attrs.privateFlags; final int sysuiVis = PolicyControl.getSystemUiVisibility(null, attrs); final int systemUiVisibility = (sysuiVis | attrs.subtreeSystemUiVisibility); final int requestedSysUiVis = PolicyControl.getSystemUiVisibility(null, attrs); final int sysUiVis = requestedSysUiVis | getImpliedSysUiFlagsForLayout(attrs); final int displayRotation = displayFrames.mRotation; final int displayWidth = displayFrames.mDisplayWidth; final int displayHeight = displayFrames.mDisplayHeight; Loading @@ -4425,21 +4425,20 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } final boolean layoutInScreenAndInsetDecor = (fl & (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR)) == (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR); final boolean layoutInScreen = (fl & FLAG_LAYOUT_IN_SCREEN) != 0; final boolean layoutInScreenAndInsetDecor = layoutInScreen && (fl & FLAG_LAYOUT_INSET_DECOR) != 0; final boolean screenDecor = (pfl & PRIVATE_FLAG_IS_SCREEN_DECOR) != 0; if (layoutInScreenAndInsetDecor && !screenDecor) { Rect frame; int availRight, availBottom; if (canHideNavigationBar() && (systemUiVisibility & View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) != 0) { frame = displayFrames.mUnrestricted; (sysUiVis & View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) != 0) { outFrame.set(displayFrames.mUnrestricted); availRight = displayFrames.mUnrestricted.right; availBottom = displayFrames.mUnrestricted.bottom; } else { frame = displayFrames.mRestricted; outFrame.set(displayFrames.mRestricted); availRight = displayFrames.mRestricted.right; availBottom = displayFrames.mRestricted.bottom; } Loading @@ -4447,7 +4446,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { availRight - displayFrames.mStable.right, availBottom - displayFrames.mStable.bottom); if ((systemUiVisibility & View.SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0) { if ((sysUiVis & View.SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0) { if ((fl & FLAG_FULLSCREEN) != 0) { outContentInsets.set(displayFrames.mStableFullscreen.left, displayFrames.mStableFullscreen.top, Loading @@ -4469,15 +4468,26 @@ public class PhoneWindowManager implements WindowManagerPolicy { displayWidth, displayHeight); calculateRelevantTaskInsets(taskBounds, outStableInsets, displayWidth, displayHeight); outFrame.intersect(taskBounds); } outDisplayCutout.set(displayFrames.mDisplayCutout.calculateRelativeTo(frame)); outDisplayCutout.set(displayFrames.mDisplayCutout.calculateRelativeTo(outFrame)); return mForceShowSystemBars; } else { if (layoutInScreen) { outFrame.set(displayFrames.mUnrestricted); } else { outFrame.set(displayFrames.mStable); } if (taskBounds != null) { outFrame.intersect(taskBounds); } outContentInsets.setEmpty(); outStableInsets.setEmpty(); outDisplayCutout.set(DisplayCutout.NO_CUTOUT); return mForceShowSystemBars; } } /** * For any given task bounds, the insets relevant for these bounds given the insets relevant Loading services/core/java/com/android/server/policy/WindowManagerPolicy.java +6 −4 Original line number Diff line number Diff line Loading @@ -1145,13 +1145,14 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { /** * Return the insets for the areas covered by system windows. These values are computed on the * Return the layout hints for a newly added window. These values are computed on the * most recent layout, so they are not guaranteed to be correct. * * @param attrs The LayoutParams of the window. * @param taskBounds The bounds of the task this window is on or {@code null} if no task is * associated with the window. * @param displayFrames display frames. * @param outFrame The frame of the window. * @param outContentInsets The areas covered by system windows, expressed as positive insets. * @param outStableInsets The areas covered by stable system windows irrespective of their * current visibility. Expressed as positive insets. Loading @@ -1160,9 +1161,10 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { * @return Whether to always consume the navigation bar. * See {@link #isNavBarForcedShownLw(WindowState)}. */ default boolean getInsetHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, DisplayFrames displayFrames, Rect outContentInsets, Rect outStableInsets, Rect outOutsets, DisplayCutout.ParcelableWrapper outDisplayCutout) { default boolean getLayoutHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, DisplayFrames displayFrames, Rect outFrame, Rect outContentInsets, Rect outStableInsets, Rect outOutsets, DisplayCutout.ParcelableWrapper outDisplayCutout) { return false; } Loading Loading
core/java/android/service/wallpaper/WallpaperService.java +2 −2 Original line number Diff line number Diff line Loading @@ -788,8 +788,8 @@ public abstract class WallpaperService extends Service { com.android.internal.R.style.Animation_Wallpaper; mInputChannel = new InputChannel(); if (mSession.addToDisplay(mWindow, mWindow.mSeq, mLayout, View.VISIBLE, Display.DEFAULT_DISPLAY, mContentInsets, mStableInsets, mOutsets, mDisplayCutout, mInputChannel) < 0) { Display.DEFAULT_DISPLAY, mWinFrame, mContentInsets, mStableInsets, mOutsets, mDisplayCutout, mInputChannel) < 0) { Log.w(TAG, "Failed to add window while updating wallpaper surface."); return; } Loading
core/java/android/view/IWindowSession.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -41,8 +41,8 @@ interface IWindowSession { in int viewVisibility, out Rect outContentInsets, out Rect outStableInsets, out InputChannel outInputChannel); int addToDisplay(IWindow window, int seq, in WindowManager.LayoutParams attrs, in int viewVisibility, in int layerStackId, out Rect outContentInsets, out Rect outStableInsets, out Rect outOutsets, in int viewVisibility, in int layerStackId, out Rect outFrame, out Rect outContentInsets, out Rect outStableInsets, out Rect outOutsets, out DisplayCutout.ParcelableWrapper displayCutout, out InputChannel outInputChannel); int addWithoutInputChannel(IWindow window, int seq, in WindowManager.LayoutParams attrs, in int viewVisibility, out Rect outContentInsets, out Rect outStableInsets); Loading
core/java/android/view/ViewRootImpl.java +3 −3 Original line number Diff line number Diff line Loading @@ -753,7 +753,7 @@ public final class ViewRootImpl implements ViewParent, mAttachInfo.mRecomputeGlobalAttributes = true; collectViewAttributes(); res = mWindowSession.addToDisplay(mWindow, mSeq, mWindowAttributes, getHostVisibility(), mDisplay.getDisplayId(), getHostVisibility(), mDisplay.getDisplayId(), mWinFrame, mAttachInfo.mContentInsets, mAttachInfo.mStableInsets, mAttachInfo.mOutsets, mAttachInfo.mDisplayCutout, mInputChannel); } catch (RemoteException e) { Loading Loading @@ -1711,8 +1711,8 @@ public final class ViewRootImpl implements ViewParent, desiredWindowWidth = size.x; desiredWindowHeight = size.y; } else { desiredWindowWidth = dipToPx(config.screenWidthDp); desiredWindowHeight = dipToPx(config.screenHeightDp); desiredWindowWidth = mWinFrame.width(); desiredWindowHeight = mWinFrame.height(); } // We used to use the following condition to choose 32 bits drawing caches: Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +27 −17 Original line number Diff line number Diff line Loading @@ -4398,13 +4398,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override // TODO: Should probably be moved into DisplayFrames. public boolean getInsetHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, DisplayFrames displayFrames, Rect outContentInsets, Rect outStableInsets, public boolean getLayoutHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, DisplayFrames displayFrames, Rect outFrame, Rect outContentInsets, Rect outStableInsets, Rect outOutsets, DisplayCutout.ParcelableWrapper outDisplayCutout) { final int fl = PolicyControl.getWindowFlags(null, attrs); final int pfl = attrs.privateFlags; final int sysuiVis = PolicyControl.getSystemUiVisibility(null, attrs); final int systemUiVisibility = (sysuiVis | attrs.subtreeSystemUiVisibility); final int requestedSysUiVis = PolicyControl.getSystemUiVisibility(null, attrs); final int sysUiVis = requestedSysUiVis | getImpliedSysUiFlagsForLayout(attrs); final int displayRotation = displayFrames.mRotation; final int displayWidth = displayFrames.mDisplayWidth; final int displayHeight = displayFrames.mDisplayHeight; Loading @@ -4425,21 +4425,20 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } final boolean layoutInScreenAndInsetDecor = (fl & (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR)) == (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR); final boolean layoutInScreen = (fl & FLAG_LAYOUT_IN_SCREEN) != 0; final boolean layoutInScreenAndInsetDecor = layoutInScreen && (fl & FLAG_LAYOUT_INSET_DECOR) != 0; final boolean screenDecor = (pfl & PRIVATE_FLAG_IS_SCREEN_DECOR) != 0; if (layoutInScreenAndInsetDecor && !screenDecor) { Rect frame; int availRight, availBottom; if (canHideNavigationBar() && (systemUiVisibility & View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) != 0) { frame = displayFrames.mUnrestricted; (sysUiVis & View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) != 0) { outFrame.set(displayFrames.mUnrestricted); availRight = displayFrames.mUnrestricted.right; availBottom = displayFrames.mUnrestricted.bottom; } else { frame = displayFrames.mRestricted; outFrame.set(displayFrames.mRestricted); availRight = displayFrames.mRestricted.right; availBottom = displayFrames.mRestricted.bottom; } Loading @@ -4447,7 +4446,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { availRight - displayFrames.mStable.right, availBottom - displayFrames.mStable.bottom); if ((systemUiVisibility & View.SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0) { if ((sysUiVis & View.SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0) { if ((fl & FLAG_FULLSCREEN) != 0) { outContentInsets.set(displayFrames.mStableFullscreen.left, displayFrames.mStableFullscreen.top, Loading @@ -4469,15 +4468,26 @@ public class PhoneWindowManager implements WindowManagerPolicy { displayWidth, displayHeight); calculateRelevantTaskInsets(taskBounds, outStableInsets, displayWidth, displayHeight); outFrame.intersect(taskBounds); } outDisplayCutout.set(displayFrames.mDisplayCutout.calculateRelativeTo(frame)); outDisplayCutout.set(displayFrames.mDisplayCutout.calculateRelativeTo(outFrame)); return mForceShowSystemBars; } else { if (layoutInScreen) { outFrame.set(displayFrames.mUnrestricted); } else { outFrame.set(displayFrames.mStable); } if (taskBounds != null) { outFrame.intersect(taskBounds); } outContentInsets.setEmpty(); outStableInsets.setEmpty(); outDisplayCutout.set(DisplayCutout.NO_CUTOUT); return mForceShowSystemBars; } } /** * For any given task bounds, the insets relevant for these bounds given the insets relevant Loading
services/core/java/com/android/server/policy/WindowManagerPolicy.java +6 −4 Original line number Diff line number Diff line Loading @@ -1145,13 +1145,14 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { /** * Return the insets for the areas covered by system windows. These values are computed on the * Return the layout hints for a newly added window. These values are computed on the * most recent layout, so they are not guaranteed to be correct. * * @param attrs The LayoutParams of the window. * @param taskBounds The bounds of the task this window is on or {@code null} if no task is * associated with the window. * @param displayFrames display frames. * @param outFrame The frame of the window. * @param outContentInsets The areas covered by system windows, expressed as positive insets. * @param outStableInsets The areas covered by stable system windows irrespective of their * current visibility. Expressed as positive insets. Loading @@ -1160,9 +1161,10 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { * @return Whether to always consume the navigation bar. * See {@link #isNavBarForcedShownLw(WindowState)}. */ default boolean getInsetHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, DisplayFrames displayFrames, Rect outContentInsets, Rect outStableInsets, Rect outOutsets, DisplayCutout.ParcelableWrapper outDisplayCutout) { default boolean getLayoutHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, DisplayFrames displayFrames, Rect outFrame, Rect outContentInsets, Rect outStableInsets, Rect outOutsets, DisplayCutout.ParcelableWrapper outDisplayCutout) { return false; } Loading