Loading core/java/android/view/SurfaceView.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -483,7 +483,8 @@ public class SurfaceView extends View { | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE ; ; if (!getContext().getResources().getCompatibilityInfo().supportsScreen()) { if (!getContext().getResources().getCompatibilityInfo().supportsScreen()) { mLayout.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; mLayout.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; } } mLayout.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; mLayout.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; Loading core/java/android/view/ViewRootImpl.java +6 −6 Original line number Original line Diff line number Diff line Loading @@ -467,7 +467,7 @@ public final class ViewRootImpl implements ViewParent, if (DEBUG_LAYOUT) Log.d(TAG, "WindowLayout in setView:" + attrs); if (DEBUG_LAYOUT) Log.d(TAG, "WindowLayout in setView:" + attrs); if (!compatibilityInfo.supportsScreen()) { if (!compatibilityInfo.supportsScreen()) { attrs.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; attrs.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; mLastInCompatMode = true; mLastInCompatMode = true; } } Loading Loading @@ -748,8 +748,8 @@ public final class ViewRootImpl implements ViewParent, // Keep track of the actual window flags supplied by the client. // Keep track of the actual window flags supplied by the client. mClientWindowLayoutFlags = attrs.flags; mClientWindowLayoutFlags = attrs.flags; // preserve compatible window flag if exists. // preserve compatible window flag if exists. int compatibleWindowFlag = int compatibleWindowFlag = mWindowAttributes.privateFlags mWindowAttributes.flags & WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; & WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; // transfer over system UI visibility values as they carry current state. // transfer over system UI visibility values as they carry current state. attrs.systemUiVisibility = mWindowAttributes.systemUiVisibility; attrs.systemUiVisibility = mWindowAttributes.systemUiVisibility; attrs.subtreeSystemUiVisibility = mWindowAttributes.subtreeSystemUiVisibility; attrs.subtreeSystemUiVisibility = mWindowAttributes.subtreeSystemUiVisibility; Loading @@ -757,7 +757,7 @@ public final class ViewRootImpl implements ViewParent, if (mWindowAttributes.packageName == null) { if (mWindowAttributes.packageName == null) { mWindowAttributes.packageName = mBasePackageName; mWindowAttributes.packageName = mBasePackageName; } } mWindowAttributes.flags |= compatibleWindowFlag; mWindowAttributes.privateFlags |= compatibleWindowFlag; applyKeepScreenOnFlag(mWindowAttributes); applyKeepScreenOnFlag(mWindowAttributes); Loading Loading @@ -1146,10 +1146,10 @@ public final class ViewRootImpl implements ViewParent, mFullRedrawNeeded = true; mFullRedrawNeeded = true; mLayoutRequested = true; mLayoutRequested = true; if (mLastInCompatMode) { if (mLastInCompatMode) { params.flags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; params.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; mLastInCompatMode = false; mLastInCompatMode = false; } else { } else { params.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; params.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; mLastInCompatMode = true; mLastInCompatMode = true; } } } } Loading core/java/android/view/Window.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -713,6 +713,11 @@ public abstract class Window { setFlags(flags, flags); setFlags(flags, flags); } } /** @hide */ public void addPrivateFlags(int flags) { setPrivateFlags(flags, flags); } /** /** * Convenience function to clear the flag bits as specified in flags, as * Convenience function to clear the flag bits as specified in flags, as * per {@link #setFlags}. * per {@link #setFlags}. Loading Loading @@ -755,6 +760,14 @@ public abstract class Window { } } } } private void setPrivateFlags(int flags, int mask) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.privateFlags = (attrs.privateFlags & ~mask) | (flags & mask); if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } } /** /** * Set the amount of dim behind the window when using * Set the amount of dim behind the window when using * {@link WindowManager.LayoutParams#FLAG_DIM_BEHIND}. This overrides * {@link WindowManager.LayoutParams#FLAG_DIM_BEHIND}. This overrides Loading core/java/android/view/WindowManager.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -1754,6 +1754,9 @@ public interface WindowManager extends ViewManager { sb.append(" fl=#"); sb.append(" fl=#"); sb.append(Integer.toHexString(flags)); sb.append(Integer.toHexString(flags)); if (privateFlags != 0) { if (privateFlags != 0) { if ((privateFlags & PRIVATE_FLAG_COMPATIBLE_WINDOW) != 0) { sb.append(" compatible=true"); } sb.append(" pfl=0x").append(Integer.toHexString(privateFlags)); sb.append(" pfl=0x").append(Integer.toHexString(privateFlags)); } } if (format != PixelFormat.OPAQUE) { if (format != PixelFormat.OPAQUE) { Loading Loading @@ -1784,9 +1787,6 @@ public interface WindowManager extends ViewManager { sb.append(" rotAnim="); sb.append(" rotAnim="); sb.append(rotationAnimation); sb.append(rotationAnimation); } } if ((flags & PRIVATE_FLAG_COMPATIBLE_WINDOW) != 0) { sb.append(" compatible=true"); } if (systemUiVisibility != 0) { if (systemUiVisibility != 0) { sb.append(" sysui=0x"); sb.append(" sysui=0x"); sb.append(Integer.toHexString(systemUiVisibility)); sb.append(Integer.toHexString(systemUiVisibility)); Loading core/java/android/view/WindowManagerPolicy.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -403,8 +403,8 @@ public interface WindowManagerPolicy { */ */ public FakeWindow addFakeWindow(Looper looper, public FakeWindow addFakeWindow(Looper looper, InputEventReceiver.Factory inputEventReceiverFactory, InputEventReceiver.Factory inputEventReceiverFactory, String name, int windowType, int layoutParamsFlags, boolean canReceiveKeys, String name, int windowType, int layoutParamsFlags, int layoutParamsPrivateFlags, boolean hasFocus, boolean touchFullscreen); boolean canReceiveKeys, boolean hasFocus, boolean touchFullscreen); /** /** * Returns a code that describes the current state of the lid switch. * Returns a code that describes the current state of the lid switch. Loading Loading
core/java/android/view/SurfaceView.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -483,7 +483,8 @@ public class SurfaceView extends View { | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE ; ; if (!getContext().getResources().getCompatibilityInfo().supportsScreen()) { if (!getContext().getResources().getCompatibilityInfo().supportsScreen()) { mLayout.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; mLayout.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; } } mLayout.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; mLayout.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; Loading
core/java/android/view/ViewRootImpl.java +6 −6 Original line number Original line Diff line number Diff line Loading @@ -467,7 +467,7 @@ public final class ViewRootImpl implements ViewParent, if (DEBUG_LAYOUT) Log.d(TAG, "WindowLayout in setView:" + attrs); if (DEBUG_LAYOUT) Log.d(TAG, "WindowLayout in setView:" + attrs); if (!compatibilityInfo.supportsScreen()) { if (!compatibilityInfo.supportsScreen()) { attrs.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; attrs.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; mLastInCompatMode = true; mLastInCompatMode = true; } } Loading Loading @@ -748,8 +748,8 @@ public final class ViewRootImpl implements ViewParent, // Keep track of the actual window flags supplied by the client. // Keep track of the actual window flags supplied by the client. mClientWindowLayoutFlags = attrs.flags; mClientWindowLayoutFlags = attrs.flags; // preserve compatible window flag if exists. // preserve compatible window flag if exists. int compatibleWindowFlag = int compatibleWindowFlag = mWindowAttributes.privateFlags mWindowAttributes.flags & WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; & WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; // transfer over system UI visibility values as they carry current state. // transfer over system UI visibility values as they carry current state. attrs.systemUiVisibility = mWindowAttributes.systemUiVisibility; attrs.systemUiVisibility = mWindowAttributes.systemUiVisibility; attrs.subtreeSystemUiVisibility = mWindowAttributes.subtreeSystemUiVisibility; attrs.subtreeSystemUiVisibility = mWindowAttributes.subtreeSystemUiVisibility; Loading @@ -757,7 +757,7 @@ public final class ViewRootImpl implements ViewParent, if (mWindowAttributes.packageName == null) { if (mWindowAttributes.packageName == null) { mWindowAttributes.packageName = mBasePackageName; mWindowAttributes.packageName = mBasePackageName; } } mWindowAttributes.flags |= compatibleWindowFlag; mWindowAttributes.privateFlags |= compatibleWindowFlag; applyKeepScreenOnFlag(mWindowAttributes); applyKeepScreenOnFlag(mWindowAttributes); Loading Loading @@ -1146,10 +1146,10 @@ public final class ViewRootImpl implements ViewParent, mFullRedrawNeeded = true; mFullRedrawNeeded = true; mLayoutRequested = true; mLayoutRequested = true; if (mLastInCompatMode) { if (mLastInCompatMode) { params.flags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; params.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; mLastInCompatMode = false; mLastInCompatMode = false; } else { } else { params.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; params.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; mLastInCompatMode = true; mLastInCompatMode = true; } } } } Loading
core/java/android/view/Window.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -713,6 +713,11 @@ public abstract class Window { setFlags(flags, flags); setFlags(flags, flags); } } /** @hide */ public void addPrivateFlags(int flags) { setPrivateFlags(flags, flags); } /** /** * Convenience function to clear the flag bits as specified in flags, as * Convenience function to clear the flag bits as specified in flags, as * per {@link #setFlags}. * per {@link #setFlags}. Loading Loading @@ -755,6 +760,14 @@ public abstract class Window { } } } } private void setPrivateFlags(int flags, int mask) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.privateFlags = (attrs.privateFlags & ~mask) | (flags & mask); if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } } /** /** * Set the amount of dim behind the window when using * Set the amount of dim behind the window when using * {@link WindowManager.LayoutParams#FLAG_DIM_BEHIND}. This overrides * {@link WindowManager.LayoutParams#FLAG_DIM_BEHIND}. This overrides Loading
core/java/android/view/WindowManager.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -1754,6 +1754,9 @@ public interface WindowManager extends ViewManager { sb.append(" fl=#"); sb.append(" fl=#"); sb.append(Integer.toHexString(flags)); sb.append(Integer.toHexString(flags)); if (privateFlags != 0) { if (privateFlags != 0) { if ((privateFlags & PRIVATE_FLAG_COMPATIBLE_WINDOW) != 0) { sb.append(" compatible=true"); } sb.append(" pfl=0x").append(Integer.toHexString(privateFlags)); sb.append(" pfl=0x").append(Integer.toHexString(privateFlags)); } } if (format != PixelFormat.OPAQUE) { if (format != PixelFormat.OPAQUE) { Loading Loading @@ -1784,9 +1787,6 @@ public interface WindowManager extends ViewManager { sb.append(" rotAnim="); sb.append(" rotAnim="); sb.append(rotationAnimation); sb.append(rotationAnimation); } } if ((flags & PRIVATE_FLAG_COMPATIBLE_WINDOW) != 0) { sb.append(" compatible=true"); } if (systemUiVisibility != 0) { if (systemUiVisibility != 0) { sb.append(" sysui=0x"); sb.append(" sysui=0x"); sb.append(Integer.toHexString(systemUiVisibility)); sb.append(Integer.toHexString(systemUiVisibility)); Loading
core/java/android/view/WindowManagerPolicy.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -403,8 +403,8 @@ public interface WindowManagerPolicy { */ */ public FakeWindow addFakeWindow(Looper looper, public FakeWindow addFakeWindow(Looper looper, InputEventReceiver.Factory inputEventReceiverFactory, InputEventReceiver.Factory inputEventReceiverFactory, String name, int windowType, int layoutParamsFlags, boolean canReceiveKeys, String name, int windowType, int layoutParamsFlags, int layoutParamsPrivateFlags, boolean hasFocus, boolean touchFullscreen); boolean canReceiveKeys, boolean hasFocus, boolean touchFullscreen); /** /** * Returns a code that describes the current state of the lid switch. * Returns a code that describes the current state of the lid switch. Loading