Loading core/java/android/view/WindowlessWindowManager.java +11 −12 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public class WindowlessWindowManager implements IWindowSession { private final static String TAG = "WindowlessWindowManager"; private class State { //TODO : b/150190730 we should create it when view show and release it when view invisible. SurfaceControl mSurfaceControl; WindowManager.LayoutParams mParams = new WindowManager.LayoutParams(); int mDisplayId; Loading Loading @@ -239,21 +240,19 @@ public class WindowlessWindowManager implements IWindowSession { } WindowManager.LayoutParams attrs = state.mParams; if (viewFlags == View.VISIBLE) { final Rect surfaceInsets = attrs.surfaceInsets; int width = surfaceInsets != null ? attrs.width + surfaceInsets.left + surfaceInsets.right : attrs.width; int height = surfaceInsets != null ? attrs.height + surfaceInsets.top + surfaceInsets.bottom : attrs.height; int width = surfaceInsets != null ? attrs.width + surfaceInsets.left + surfaceInsets.right : attrs.width; int height = surfaceInsets != null ? attrs.height + surfaceInsets.top + surfaceInsets.bottom : attrs.height; t.setBufferSize(sc, width, height) .setOpaque(sc, isOpaque(attrs)); if (viewFlags == View.VISIBLE) { t.show(sc); t.setBufferSize(sc, width, height).setOpaque(sc, isOpaque(attrs)).show(sc).apply(); outSurfaceControl.copyFrom(sc); } else { t.hide(sc); t.hide(sc).apply(); outSurfaceControl.release(); } t.apply(); outSurfaceControl.copyFrom(sc); outFrame.set(0, 0, attrs.width, attrs.height); mergedConfiguration.setConfiguration(mConfiguration, mConfiguration); Loading packages/SystemUI/src/com/android/systemui/wm/SystemWindows.java +2 −2 Original line number Diff line number Diff line Loading @@ -189,8 +189,8 @@ public class SystemWindows { public SurfaceControl getViewSurface(View rootView) { for (int i = 0; i < mPerDisplay.size(); ++i) { for (int iWm = 0; iWm < mPerDisplay.valueAt(i).mWwms.size(); ++iWm) { SurfaceControl out = mPerDisplay.valueAt(i).mWwms.get(iWm).getSurfaceControlForWindow(rootView); SurfaceControl out = mPerDisplay.valueAt(i).mWwms.valueAt(iWm) .getSurfaceControlForWindow(rootView); if (out != null) { return out; } Loading Loading
core/java/android/view/WindowlessWindowManager.java +11 −12 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public class WindowlessWindowManager implements IWindowSession { private final static String TAG = "WindowlessWindowManager"; private class State { //TODO : b/150190730 we should create it when view show and release it when view invisible. SurfaceControl mSurfaceControl; WindowManager.LayoutParams mParams = new WindowManager.LayoutParams(); int mDisplayId; Loading Loading @@ -239,21 +240,19 @@ public class WindowlessWindowManager implements IWindowSession { } WindowManager.LayoutParams attrs = state.mParams; if (viewFlags == View.VISIBLE) { final Rect surfaceInsets = attrs.surfaceInsets; int width = surfaceInsets != null ? attrs.width + surfaceInsets.left + surfaceInsets.right : attrs.width; int height = surfaceInsets != null ? attrs.height + surfaceInsets.top + surfaceInsets.bottom : attrs.height; int width = surfaceInsets != null ? attrs.width + surfaceInsets.left + surfaceInsets.right : attrs.width; int height = surfaceInsets != null ? attrs.height + surfaceInsets.top + surfaceInsets.bottom : attrs.height; t.setBufferSize(sc, width, height) .setOpaque(sc, isOpaque(attrs)); if (viewFlags == View.VISIBLE) { t.show(sc); t.setBufferSize(sc, width, height).setOpaque(sc, isOpaque(attrs)).show(sc).apply(); outSurfaceControl.copyFrom(sc); } else { t.hide(sc); t.hide(sc).apply(); outSurfaceControl.release(); } t.apply(); outSurfaceControl.copyFrom(sc); outFrame.set(0, 0, attrs.width, attrs.height); mergedConfiguration.setConfiguration(mConfiguration, mConfiguration); Loading
packages/SystemUI/src/com/android/systemui/wm/SystemWindows.java +2 −2 Original line number Diff line number Diff line Loading @@ -189,8 +189,8 @@ public class SystemWindows { public SurfaceControl getViewSurface(View rootView) { for (int i = 0; i < mPerDisplay.size(); ++i) { for (int iWm = 0; iWm < mPerDisplay.valueAt(i).mWwms.size(); ++iWm) { SurfaceControl out = mPerDisplay.valueAt(i).mWwms.get(iWm).getSurfaceControlForWindow(rootView); SurfaceControl out = mPerDisplay.valueAt(i).mWwms.valueAt(iWm) .getSurfaceControlForWindow(rootView); if (out != null) { return out; } Loading