Merge "Inform SurfaceFlinger of which Surface is the RoundedCorners overlay." into oc-dr1-dev
am: 48ed8aa4d0
Change-Id: I3030c64c30f6c16dc9c8a01e21a5dc6b58cbd273
This commit is contained in:
@@ -271,6 +271,15 @@ public class SurfaceControl {
|
|||||||
*/
|
*/
|
||||||
public static final int POWER_MODE_DOZE_SUSPEND = 3;
|
public static final int POWER_MODE_DOZE_SUSPEND = 3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A value for windowType used to indicate that the window should be omitted from screenshots
|
||||||
|
* and display mirroring. A temporary workaround until we express such things with
|
||||||
|
* the hierarchy.
|
||||||
|
* TODO: b/64227542
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final int WINDOW_TYPE_DONT_SCREENSHOT = 441731;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a surface with a name.
|
* Create a surface with a name.
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
@@ -1413,11 +1413,12 @@ public interface WindowManager extends ViewManager {
|
|||||||
public static final int PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS = 0x00080000;
|
public static final int PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS = 0x00080000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to indicate that this window should be ignored when determining what parts of the
|
* Indicates that this window is the rounded corners overlay present on some
|
||||||
* screen can be magnified.
|
* devices this means that it will be excluded from: screenshots,
|
||||||
|
* screen magnification, and mirroring.
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public static final int PRIVATE_FLAG_NO_MAGNIFICATION_REGION_EFFECT = 0x00100000;
|
public static final int PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY = 0x00100000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Control flags that are private to the platform.
|
* Control flags that are private to the platform.
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ public class RoundedCorners extends SystemUI implements Tunable {
|
|||||||
| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
|
| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
|
||||||
PixelFormat.TRANSLUCENT);
|
PixelFormat.TRANSLUCENT);
|
||||||
lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS
|
lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS
|
||||||
| WindowManager.LayoutParams.PRIVATE_FLAG_NO_MAGNIFICATION_REGION_EFFECT;
|
| WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY;
|
||||||
lp.setTitle("RoundedOverlay");
|
lp.setTitle("RoundedOverlay");
|
||||||
lp.gravity = Gravity.TOP;
|
lp.gravity = Gravity.TOP;
|
||||||
return lp;
|
return lp;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
package com.android.server.wm;
|
package com.android.server.wm;
|
||||||
|
|
||||||
import static android.view.WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY;
|
import static android.view.WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY;
|
||||||
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MAGNIFICATION_REGION_EFFECT;
|
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY;
|
||||||
|
|
||||||
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
|
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
|
||||||
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
|
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
|
||||||
@@ -539,7 +539,7 @@ final class AccessibilityController {
|
|||||||
WindowState windowState = visibleWindows.valueAt(i);
|
WindowState windowState = visibleWindows.valueAt(i);
|
||||||
if ((windowState.mAttrs.type == TYPE_MAGNIFICATION_OVERLAY)
|
if ((windowState.mAttrs.type == TYPE_MAGNIFICATION_OVERLAY)
|
||||||
|| ((windowState.mAttrs.privateFlags
|
|| ((windowState.mAttrs.privateFlags
|
||||||
& PRIVATE_FLAG_NO_MAGNIFICATION_REGION_EFFECT) != 0)) {
|
& PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY) != 0)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import static android.app.ActivityManager.StackId;
|
|||||||
import static android.view.Display.DEFAULT_DISPLAY;
|
import static android.view.Display.DEFAULT_DISPLAY;
|
||||||
import static android.view.WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
|
import static android.view.WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
|
||||||
import static android.view.WindowManager.LayoutParams.FLAG_SCALED;
|
import static android.view.WindowManager.LayoutParams.FLAG_SCALED;
|
||||||
|
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY;
|
||||||
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
|
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
|
||||||
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
|
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
|
||||||
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
|
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
|
||||||
@@ -631,6 +632,10 @@ class WindowStateAnimator {
|
|||||||
return mSurfaceController;
|
return mSurfaceController;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((mWin.mAttrs.privateFlags & PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY) != 0) {
|
||||||
|
windowType = SurfaceControl.WINDOW_TYPE_DONT_SCREENSHOT;
|
||||||
|
}
|
||||||
|
|
||||||
w.setHasSurface(false);
|
w.setHasSurface(false);
|
||||||
|
|
||||||
if (DEBUG_ANIM || DEBUG_ORIENTATION) Slog.i(TAG,
|
if (DEBUG_ANIM || DEBUG_ORIENTATION) Slog.i(TAG,
|
||||||
|
|||||||
Reference in New Issue
Block a user