Loading services/core/java/com/android/server/wm/PinnedStackController.java +9 −5 Original line number Diff line number Diff line Loading @@ -158,18 +158,22 @@ class PinnedStackController { /** * Reloads all the resources for the current configuration. */ void reloadResources() { private void reloadResources() { final Resources res = mService.mContext.getResources(); mMinSize = res.getDimensionPixelSize( com.android.internal.R.dimen.default_minimal_size_pip_resizable_task); mDefaultAspectRatio = res.getFloat( com.android.internal.R.dimen.config_pictureInPictureDefaultAspectRatio); final Size screenEdgeInsetsDp = Size.parseSize(res.getString( com.android.internal.R.string.config_defaultPictureInPictureScreenEdgeInsets)); final String screenEdgeInsetsDpString = res.getString( com.android.internal.R.string.config_defaultPictureInPictureScreenEdgeInsets); final Size screenEdgeInsetsDp = !screenEdgeInsetsDpString.isEmpty() ? Size.parseSize(screenEdgeInsetsDpString) : null; mDefaultStackGravity = res.getInteger( com.android.internal.R.integer.config_defaultPictureInPictureGravity); mDisplayContent.getDisplay().getRealMetrics(mTmpMetrics); mScreenEdgeInsets = new Point(dpToPx(screenEdgeInsetsDp.getWidth(), mTmpMetrics), mScreenEdgeInsets = screenEdgeInsetsDp == null ? new Point() : new Point(dpToPx(screenEdgeInsetsDp.getWidth(), mTmpMetrics), dpToPx(screenEdgeInsetsDp.getHeight(), mTmpMetrics)); mMinAspectRatio = res.getFloat( com.android.internal.R.dimen.config_pictureInPictureMinAspectRatio); Loading services/core/java/com/android/server/wm/WindowStateAnimator.java +4 −0 Original line number Diff line number Diff line Loading @@ -1310,6 +1310,10 @@ class WindowStateAnimator { } void setSurfaceBoundariesLocked(final boolean recoveringMemory) { if (mSurfaceController == null) { return; } final WindowState w = mWin; final LayoutParams attrs = mWin.getAttrs(); final Task task = w.getTask(); Loading services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java +12 −9 Original line number Diff line number Diff line Loading @@ -120,6 +120,8 @@ class WindowTestsBase { @After public void tearDown() throws Exception { final LinkedList<WindowState> nonCommonWindows = new LinkedList(); synchronized (sWm.mWindowMap) { sWm.mRoot.forAllWindows(w -> { if (!mCommonWindows.contains(w)) { nonCommonWindows.addLast(w); Loading @@ -133,6 +135,7 @@ class WindowTestsBase { mDisplayContent.removeImmediately(); sWm.mInputMethodTarget = null; } } private WindowState createCommonWindow(WindowState parent, int type, String name) { final WindowState win = createWindow(parent, type, name); Loading Loading
services/core/java/com/android/server/wm/PinnedStackController.java +9 −5 Original line number Diff line number Diff line Loading @@ -158,18 +158,22 @@ class PinnedStackController { /** * Reloads all the resources for the current configuration. */ void reloadResources() { private void reloadResources() { final Resources res = mService.mContext.getResources(); mMinSize = res.getDimensionPixelSize( com.android.internal.R.dimen.default_minimal_size_pip_resizable_task); mDefaultAspectRatio = res.getFloat( com.android.internal.R.dimen.config_pictureInPictureDefaultAspectRatio); final Size screenEdgeInsetsDp = Size.parseSize(res.getString( com.android.internal.R.string.config_defaultPictureInPictureScreenEdgeInsets)); final String screenEdgeInsetsDpString = res.getString( com.android.internal.R.string.config_defaultPictureInPictureScreenEdgeInsets); final Size screenEdgeInsetsDp = !screenEdgeInsetsDpString.isEmpty() ? Size.parseSize(screenEdgeInsetsDpString) : null; mDefaultStackGravity = res.getInteger( com.android.internal.R.integer.config_defaultPictureInPictureGravity); mDisplayContent.getDisplay().getRealMetrics(mTmpMetrics); mScreenEdgeInsets = new Point(dpToPx(screenEdgeInsetsDp.getWidth(), mTmpMetrics), mScreenEdgeInsets = screenEdgeInsetsDp == null ? new Point() : new Point(dpToPx(screenEdgeInsetsDp.getWidth(), mTmpMetrics), dpToPx(screenEdgeInsetsDp.getHeight(), mTmpMetrics)); mMinAspectRatio = res.getFloat( com.android.internal.R.dimen.config_pictureInPictureMinAspectRatio); Loading
services/core/java/com/android/server/wm/WindowStateAnimator.java +4 −0 Original line number Diff line number Diff line Loading @@ -1310,6 +1310,10 @@ class WindowStateAnimator { } void setSurfaceBoundariesLocked(final boolean recoveringMemory) { if (mSurfaceController == null) { return; } final WindowState w = mWin; final LayoutParams attrs = mWin.getAttrs(); final Task task = w.getTask(); Loading
services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java +12 −9 Original line number Diff line number Diff line Loading @@ -120,6 +120,8 @@ class WindowTestsBase { @After public void tearDown() throws Exception { final LinkedList<WindowState> nonCommonWindows = new LinkedList(); synchronized (sWm.mWindowMap) { sWm.mRoot.forAllWindows(w -> { if (!mCommonWindows.contains(w)) { nonCommonWindows.addLast(w); Loading @@ -133,6 +135,7 @@ class WindowTestsBase { mDisplayContent.removeImmediately(); sWm.mInputMethodTarget = null; } } private WindowState createCommonWindow(WindowState parent, int type, String name) { final WindowState win = createWindow(parent, type, name); Loading