Loading core/java/android/view/Surface.java +18 −1 Original line number Diff line number Diff line Loading @@ -225,6 +225,9 @@ public class Surface implements Parcelable { // non compatibility mode. private Matrix mCompatibleMatrix; private int mWidth; private int mHeight; private native void nativeCreate(SurfaceSession session, String name, int w, int h, int format, int flags) throws OutOfResourcesException; Loading Loading @@ -330,6 +333,8 @@ public class Surface implements Parcelable { checkHeadless(); mName = name; mWidth = w; mHeight = h; nativeCreate(session, name, w, h, format, flags); mCloseGuard.open("release"); Loading Loading @@ -538,7 +543,7 @@ public class Surface implements Parcelable { /** @hide */ public void setPosition(int x, int y) { nativeSetPosition((float)x, (float)y); nativeSetPosition(x, y); } /** @hide */ Loading @@ -548,9 +553,21 @@ public class Surface implements Parcelable { /** @hide */ public void setSize(int w, int h) { mWidth = w; mHeight = h; nativeSetSize(w, h); } /** @hide */ public int getWidth() { return mWidth; } /** @hide */ public int getHeight() { return mHeight; } /** @hide */ public void hide() { nativeSetFlags(SURFACE_HIDDEN, SURFACE_HIDDEN); Loading services/java/com/android/server/am/ActivityManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -12327,7 +12327,7 @@ public final class ActivityManagerService extends ActivityManagerNative } newConfig.seq = mConfigurationSeq; mConfiguration = newConfig; Slog.i(TAG, "Config changed: " + newConfig); Slog.i(TAG, "Config changes=" + Integer.toHexString(changes) + " " + newConfig); final Configuration configCopy = new Configuration(mConfiguration); Loading services/java/com/android/server/wm/WindowManagerService.java +52 −38 Original line number Diff line number Diff line Loading @@ -5800,6 +5800,8 @@ public class WindowManagerService extends IWindowManager.Stub // Figure out the part of the screen that is actually the app. boolean including = false; final WindowList windows = displayContent.getWindowList(); try { Surface.openTransaction(); for (int i = windows.size() - 1; i >= 0; i--) { WindowState ws = windows.get(i); if (!ws.mHasSurface) { Loading Loading @@ -5828,8 +5830,17 @@ public class WindowManagerService extends IWindowManager.Stub // window. including = !ws.mIsImWindow && !ws.isFullscreen(dw, dh); if (maxLayer < ws.mWinAnimator.mSurfaceLayer) { maxLayer = ws.mWinAnimator.mSurfaceLayer; final WindowStateAnimator winAnimator = ws.mWinAnimator; // The setSize() method causes all previous Surface transactions to sync to // the SurfaceFlinger. This will force any outstanding setLayer calls to be // synced as well for screen capture. Without this we can get black bitmaps. Surface surface = winAnimator.mSurface; surface.setSize(surface.getWidth(), surface.getHeight()); if (maxLayer < winAnimator.mSurfaceLayer) { maxLayer = winAnimator.mSurfaceLayer; } // Don't include wallpaper in bounds calculation Loading @@ -5843,7 +5854,10 @@ public class WindowManagerService extends IWindowManager.Stub frame.union(left, top, right, bottom); } } } finally { Surface.closeTransaction(); Binder.restoreCallingIdentity(ident); } // Constrain frame to the screen size. frame.intersect(0, 0, dw, dh); Loading Loading
core/java/android/view/Surface.java +18 −1 Original line number Diff line number Diff line Loading @@ -225,6 +225,9 @@ public class Surface implements Parcelable { // non compatibility mode. private Matrix mCompatibleMatrix; private int mWidth; private int mHeight; private native void nativeCreate(SurfaceSession session, String name, int w, int h, int format, int flags) throws OutOfResourcesException; Loading Loading @@ -330,6 +333,8 @@ public class Surface implements Parcelable { checkHeadless(); mName = name; mWidth = w; mHeight = h; nativeCreate(session, name, w, h, format, flags); mCloseGuard.open("release"); Loading Loading @@ -538,7 +543,7 @@ public class Surface implements Parcelable { /** @hide */ public void setPosition(int x, int y) { nativeSetPosition((float)x, (float)y); nativeSetPosition(x, y); } /** @hide */ Loading @@ -548,9 +553,21 @@ public class Surface implements Parcelable { /** @hide */ public void setSize(int w, int h) { mWidth = w; mHeight = h; nativeSetSize(w, h); } /** @hide */ public int getWidth() { return mWidth; } /** @hide */ public int getHeight() { return mHeight; } /** @hide */ public void hide() { nativeSetFlags(SURFACE_HIDDEN, SURFACE_HIDDEN); Loading
services/java/com/android/server/am/ActivityManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -12327,7 +12327,7 @@ public final class ActivityManagerService extends ActivityManagerNative } newConfig.seq = mConfigurationSeq; mConfiguration = newConfig; Slog.i(TAG, "Config changed: " + newConfig); Slog.i(TAG, "Config changes=" + Integer.toHexString(changes) + " " + newConfig); final Configuration configCopy = new Configuration(mConfiguration); Loading
services/java/com/android/server/wm/WindowManagerService.java +52 −38 Original line number Diff line number Diff line Loading @@ -5800,6 +5800,8 @@ public class WindowManagerService extends IWindowManager.Stub // Figure out the part of the screen that is actually the app. boolean including = false; final WindowList windows = displayContent.getWindowList(); try { Surface.openTransaction(); for (int i = windows.size() - 1; i >= 0; i--) { WindowState ws = windows.get(i); if (!ws.mHasSurface) { Loading Loading @@ -5828,8 +5830,17 @@ public class WindowManagerService extends IWindowManager.Stub // window. including = !ws.mIsImWindow && !ws.isFullscreen(dw, dh); if (maxLayer < ws.mWinAnimator.mSurfaceLayer) { maxLayer = ws.mWinAnimator.mSurfaceLayer; final WindowStateAnimator winAnimator = ws.mWinAnimator; // The setSize() method causes all previous Surface transactions to sync to // the SurfaceFlinger. This will force any outstanding setLayer calls to be // synced as well for screen capture. Without this we can get black bitmaps. Surface surface = winAnimator.mSurface; surface.setSize(surface.getWidth(), surface.getHeight()); if (maxLayer < winAnimator.mSurfaceLayer) { maxLayer = winAnimator.mSurfaceLayer; } // Don't include wallpaper in bounds calculation Loading @@ -5843,7 +5854,10 @@ public class WindowManagerService extends IWindowManager.Stub frame.union(left, top, right, bottom); } } } finally { Surface.closeTransaction(); Binder.restoreCallingIdentity(ident); } // Constrain frame to the screen size. frame.intersect(0, 0, dw, dh); Loading